PWZER / swagger-ui-py

Swagger UI for Python web framework, such Tornado, Flask and Sanic. https://pwzer.github.io/swagger-ui-py/
https://pypi.org/project/swagger-ui-py
Apache License 2.0
68 stars 31 forks source link

examples not working on requestBody #5

Closed tamarmot closed 4 years ago

tamarmot commented 4 years ago

Per the api specification, requestBody should support example OR examples: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#requestBodyObject

If I include example, it works and shows up in the ui.

If I include examples, it does NOT show up in the ui. However, I can verify the examples work in this swagger editor:

https://editor.swagger.io/

tamarmot commented 4 years ago

If I check out your source code and update the ui and the editor, it works. Time for an updated release? I had pulled the library from pip initially.

PWZER commented 4 years ago

@tamarmot Thank you for all your contributions. a release version has been updated.