Skip to content
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

Fix/issues #41 Swagger ui with mult examples #376

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ju3ouz4n
Copy link
Contributor

Fixes #41

As far as i can tell, looks like swaggerui does not compute "examples" attribute, but uses specific openapi_examples https://fastapi.tiangolo.com/tutorial/schema-extra-example/#using-the-openapi_examples-parameter ?

  • Added openapi_examples attributes to server_impact_from_configuration route
  • Added emptyserver exemple to see boaviztapi/routers/openapi_doc/examples.py
  • Added function convert_to_openapi_example to convert legacy example to openapi_examples format see boaviztapi/routers/openapi_doc/examples.py

Made these updates only with server route, other examples in boaviztapi/routers/openapi_doc/examples.py should be modified (with a label as "key"). Should i index all examples with a "default" label and update all other routes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Swagger don't handle multiple examples
1 participant