Task #2299
closedAdd serializer for the content models.
100%
Description
Write a serializer for each model in content.py.
Related issues
Updated by jortel@redhat.com about 8 years ago
- Copied from Task #2298: Add serializer for the repository models. added
Updated by jortel@redhat.com about 8 years ago
- Copied to Task #2300: Add serializer for the task models. added
Updated by amacdona@redhat.com about 8 years ago
- Related to Task #2311: Add a RepositoryContent ViewSet added
Updated by amacdona@redhat.com about 8 years ago
- Related to deleted (Task #2311: Add a RepositoryContent ViewSet)
Updated by amacdona@redhat.com about 8 years ago
- Blocks Task #2311: Add a RepositoryContent ViewSet added
Updated by amacdona@redhat.com about 8 years ago
- Blocks Task #2305: Add a Artifact ViewSet added
Updated by amacdona@redhat.com about 8 years ago
- Blocks Task #2304: Add a Content ViewSet added
Updated by semyers about 8 years ago
This task cannot be started until the documentation written in #1873 is merged to 3.0-dev.
Updated by semyers about 8 years ago
This task should be considered complete when all serializers for a given models module are defined in a corresponding serializers module.
The serializers defined should expose fields "native" (defined directly on a model or in its superclasses) to the model being represented, including Generic Key/Value types (Config/Notes/Scratchpad). Relations to other models should be included where possible, but the available serializer base classes and fields may be insufficient, so only the "native" fields should be required.
This task is among several similar tasks to stub out serializers for our existing models. Please spread the work around so we gain more team-wide knowledge around these serializers. If you have any questions, ask me. Common issues and their resolutions will be added to the pulp 3.0 rest-api development guide.
Updated by bmbouter about 8 years ago
I don't think we'll be porting code from the old serializers in Pulp 2, but if we do...
There is an error in the Pulp 2 content serializer where 'children' is 'hildren'. Here is a snipped from the e-mail chain. I'm not filing a bug on this because we can't change it due to backwards compatibility and it won't be an issue in Pulp 3.
The "hildren" key appears on responses due to this logic in
server/pulp/server/webservices/views/serializers/content.py
content_unit_child_link_objs method:
# look for children fields
if not key.endswith('children'):
continue
child_keys.append(key)
# child field key format: _<child type>_children
child_type = key.rsplit('_', 1)[0][1:]
# ...
<pre>
Updated by ttereshc about 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ttereshc
Updated by ttereshc about 8 years ago
- Status changed from ASSIGNED to POST
Updated by ttereshc about 8 years ago
- Blocks deleted (Task #2305: Add a Artifact ViewSet)
Added by ttereshc about 8 years ago
Added by ttereshc about 8 years ago
Revision e1c05ddd | View on GitHub
Finish content serializer and add one for artifact
Updated by ttereshc about 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|e1c05ddd31090e2ddd4b04a720e54cb6be73f879.
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Finish content serializer and add one for artifact
closes #2299 https://pulp.plan.io/issues/2299