Plugin url patterns allow an arbitrary base path (not just /pulp/api/v3/)
In each of their generated docs I noticed the endpoints all looked like
. Also, when doing DockerRecursiveAddApi.create I get a 404 and
No route matches [POST] "/docker/recursive-add"
However, it looks like the schema is actually correct, but the urlmatching is not strict enough.
All of these are valid and routed to the same view:
http POST localhost:24817/docker/recursive-add/ repository=/pulp/api/v3/repositories/597c2209-2ff2-4eec-b476-3740ff2879de/ http POST localhost:24817/pulp/api/v3/docker/recursive-add/ repository=/pulp/api/v3/repositories/597c2209-2ff2-4eec-b476-3740ff2879de/ http POST localhost:24817/thanks/for/reading/the/details/docker/recursive-add/ repository=/pulp/api/v3/repositories/597c2209-2ff2-4eec-b476-3740ff2879de/
IIRC, this is actually a deliberate feature of the plugin api, so they can register non-prefixed endpoints like /v2/ for Docker.
This might just be as simple as adding "^pulp/api/v3/" to the start of the urlpatterns, but it will need to be done for any plugins that have implemented custom urls.
#1 Updated by email@example.com 5 months ago
- Project changed from Docker Support to Pulp
- Subject changed from DockerRecursiveAdd, DockerRecursiveRemove, and DockerCopy ruby bindings go to the wrong url to Plugin url patterns allow an arbitrary base path (not just /pulp/api/v3/)
- Description updated (diff)
Please register to edit this issue