Task #5550
closedRemove "_type" / "pulp_type" as a public-facing field, and MasterModelSerializer
100%
Description
Rationale:
"_type" / "pulp_type" is a field that shows up on models using master-detail inheritance. However, there is no way to query these types generically. In order to query these types, you have to provide the app name and the type name, which are the two components of that field. Therefore it doesn't really provide the end user any valuable information.
This is probably a leftover relic from when the /content/ endpoint existed and returned content of all types.
Pulpcore still needs this information for various things, but, the user doesn't. Therefore we can remove it from the serializers.
"_type" / "pulp_type" is the only thing provided by MasterModelSerializer, so the whole thing can go. Everything inheriting from MasterModelSerializer can inherit from ModelSerializer instead.
https://github.com/pulp/pulpcore/blob/master/pulpcore/app/serializers/base.py#L81-L110
Related issues
Updated by bmbouter about 5 years ago
+1 I agree this information isn't valuable to users, and it likely restricts improvements we can make for them in the future.
Updated by fao89 about 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fao89
Updated by fao89 about 5 years ago
- Related to Task #5454: rename _type to pulp_type added
Updated by fao89 about 5 years ago
Docker uses _type:
https://github.com/pulp/pulp_docker/pull/424/commits/b4e3aed646d8e99c27a35a9a41586bcdcef88ed3
I'm wondering if I should remove _type on core and add it on docker serializers
Updated by fao89 about 5 years ago
- Status changed from ASSIGNED to POST
pulpcore: https://github.com/pulp/pulpcore/pull/317
pulp_file: https://github.com/pulp/pulp_file/pull/284
pulp_ansible: https://github.com/pulp/pulp_ansible/pull/218
pulp_docker: https://github.com/pulp/pulp_docker/pull/424
pulp_deb: https://github.com/pulp/pulp_deb/pull/125
pulp_python: https://github.com/pulp/pulp_python/pull/259
Added by Fabricio Aguiar about 5 years ago
Updated by Anonymous about 5 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulpcore|2a62d16b537757a951d41cfafa32c5a5a2d63c52.
Added by Fabricio Aguiar about 5 years ago
Revision dd03135d | View on GitHub
Removing _type field
ref #5550 https://pulp.plan.io/issues/5550
Required PR: https://github.com/pulp/pulpcore-plugin/pull/137 Required PR: https://github.com/pulp/pulpcore/pull/317 Required PR: https://github.com/PulpQE/pulp-smash/pull/1220
Updated by bmbouter about 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Removing _type field
closes #5550 https://pulp.plan.io/issues/5550
Required PR: https://github.com/pulp/pulp_file/pull/284 Required PR: https://github.com/pulp/pulpcore-plugin/pull/137 Required PR: https://github.com/PulpQE/pulp-smash/pull/1220 Required PR: https://github.com/pulp/pulp-certguard/pull/31