boaviztapi icon indicating copy to clipboard operation
boaviztapi copied to clipboard

Fix/issues #41 Swagger ui with mult examples

Open ju3ouz4n opened this issue 2 weeks ago • 0 comments

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?

ju3ouz4n avatar Feb 10 '25 16:02 ju3ouz4n