Open pulpbot opened 2 years ago
From: alikins (alikins) Date: 2021-05-07T00:06:33Z
I forgot to mention this is observed with the pulpcore 3.11 branch.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
This issue is no longer marked for closure.
Author: alikins (alikins)
Redmine Issue: 8715, https://pulp.plan.io/issues/8715
For example:
/api/automation-hub/v3/namespaces/{name}/
gets transformed to
{galaxy_namespace_href}
This happens for any urls with a path param unless they bound to 'list' or 'create' actions. ie, except for POST and GET list'y things, all the endpoint urls in the generated spec get replaced.
I think the reason why the generated openapi schema is so weird and wrong (like for the spec generated for galaxy namespaces mentioned in https://issues.redhat.com/browse/AAH-450). If a url path has any path param in it,
pulpcore.openapi.PulpSchemaGenerator.convert_endpoint_path_params()
replaces it with some variation of{blah_href}
.For ex,
GET /api/automation-hub/v3/namespaces/{name}/
is mogrified intoGET {galaxy_namespace_href}
. But 'list' and 'create' actions dont get modifiedSo except for 'list' and 'create' actions all of the galaxy_ng endpoint urls in the spec are broken. For galaxy_ng, this can be confirmed by looking at
/api/automation-hub/v3/swagger-ui/
Some output from logging the spec generation for the
/api/automation-hub/v3/namespaces/
endpoints: