Project

Profile

Help

Story #4279

Updated by ttereshc about 5 years ago

Plugins currently write out the plugin name or some identifier to namespace their endpoints manually as part of 'endpoint_name' when they write their viewsets, 
 e.g. for @PackageViewSet@: @endpoint_name = 'rpm/packages'@, for @UpdateRecordViewSet@: @endpoint_name = 'rpm/errata'@, etc. 

 Currently it's mostly a problem for ContentViewSets    and less of a problem for Remotes, Publishers, etc, since it's common for a single plugin to support multiple content types. 

 The suggestion is to prepend endpoint_name of a viewset of any detail model automagically automatigically with a plugin name, e.g.: For @PackageViewSet@: @endpoint_name@ will be @'packages'@ 
 And endpoint will change this way: 
 <pre> 
 /api/v3/content/rpm/packages/ --> /api/v3/content/pulp_rpm/packages/ 
 </pre> 

 Remotes'/Publishers'/other "detail" endpoints will change as well, for consistency: 
 <pre> 
 /api/v3/remotes/rpm/ --> /api/v3/content/remotes/pulp_rpm/rpm/ 
 /api/v3/publishers/rpm/ --> /api/v3/content/publishers/pulp_rpm/rpm/ 
 </pre>

Back