Project

Profile

Help

Issue #3965

Created Resource schema generated incorrectly

Added by dkliban@redhat.com about 1 year ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 42

Description

I noticed that the JSON returned has a list of HREFs for created resources. However, the OpenAPI schema states that this should be a list of 'Created Resource' objects that have multiple fields.

>>> api.tasks_read('/pulp/api/v3/tasks/487f9f07-5056-413f-a7f6-1a59117e2b66/')
{'created': datetime.datetime(2018, 9, 2, 16, 55, 46, 464597, tzinfo=tzlocal()),
 'created_resources': [{'created': None, 'href': None, 'id': None}],
 'error': None,

....
}

$ http :8000/pulp/api/v3/tasks/487f9f07-5056-413f-a7f6-1a59117e2b66/

{
    "_href": "/pulp/api/v3/tasks/487f9f07-5056-413f-a7f6-1a59117e2b66/",
    "created": "2018-09-02T16:55:46.464597Z",
    "created_resources": [
        "/pulp/api/v3/repositories/9/versions/1/" 
    ],
...
}

Related issues

Related to Pulp - Test #4123: Test the generated API binds MODIFIED Actions

Associated revisions

Revision f9d6a287 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: OpenAPI schema for created resource contains fields

Solution: remove the non-existing fields from the serializer

closes: #3965
https://pulp.plan.io/issues/3965

Revision f9d6a287 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: OpenAPI schema for created resource contains fields

Solution: remove the non-existing fields from the serializer

closes: #3965
https://pulp.plan.io/issues/3965

Revision f9d6a287 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: OpenAPI schema for created resource contains fields

Solution: remove the non-existing fields from the serializer

closes: #3965
https://pulp.plan.io/issues/3965

History

#1 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from ASSIGNED to POST

#2 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from POST to MODIFIED

#3 Updated by kersom 12 months ago

  • Related to Test #4123: Test the generated API binds added

#4 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#5 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)

Please register to edit this issue

Also available in: Atom PDF