You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works, but the problem is the generated openapi.json also pulls in some other schema info from the request body, which ends up looking very strange in swagger.
Hello,
Thank you for this repo.
Discovered a bug when trying to add some documentation to route parameters.
In our use case we want to document an enumerated list of possible values for a url path parameter like so:
/<any(\"enum1\", \"enum2\", \"enum3\"):parameter_name>
This works, but the problem is the generated openapi.json also pulls in some other schema info from the request body, which ends up looking very strange in swagger.
The cause of this bug is the
schema
dictionary variable is reused from the above code. See https://github.com/pgjones/quart-schema/blob/main/src/quart_schema/extension.py#L590I am attaching a patch file. Tried to submit a PR but couldn't
Note: should also consider setting the type at line 590 like so:
params_schema.update({"type": "string", "enum": list(converter.items)})
Patch file:
fix_bug_-_do_not_reuse_schema_dictionary_from_above_logic_Improve_the_decorator_typing.patch
The text was updated successfully, but these errors were encountered: