boaviztapi
boaviztapi copied to clipboard
Fix/issues #41 Swagger ui with mult examples
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?