Actions
Issue #3965
closedCreated Resource schema generated incorrectly
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 42
Quarter:
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
Actions
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