-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path parameter is not overrided #39
Comments
Hello! This is indeed strange, but it seems to be a bug in ReDoc - I opened an issue there: Redocly/redoc#400 Meanwhile, you could use You could also add a description to the |
What seems to be happening that autogenerated path param is placed into path key and path parameters we override are placed in operation (get/post/etc), so we have two sample yaml:
|
Yes, that is correct. And the OpenAPI spec says that in this case, the operation (get/post/etc.) parameter wins and overrides the PathItem-level one. It is ReDoc that fails to honor that behavior, which should probably get fixed sometime in the future (see issue linked above). Meanwhile, as I said, |
Fixed in ReDoc 1.20.0 |
Hello!!! I'm new to all this... Currently, I'm trying to eliminate the id path parameter cause I have it in the body through Schema like show you below
But swagger-ui shows the id in parameters. When I add the field in manual_parameters, only change the attributes of this... but the field still is there |
In the viewset, I add swagger_auto_schema decorator to
destroy(self, request, pk=None)
method, to override the id path parameter and add descriptions. But in the swagger UI, both of them are showing as path parameters.@swagger_auto_schema(manual_parameters=[ openapi.Parameter('id', openapi.IN_PATH, description="Instrument Id to be removed from watchlist, if exist", type=openapi.TYPE_STRING, required=True), ])
The text was updated successfully, but these errors were encountered: