sphinx-contrib / redoc

ReDoc powered OpenAPI (fka Swagger) spec renderer for Sphinx.
https://sphinxcontrib-redoc.readthedocs.io/
BSD 2-Clause "Simplified" License
34 stars 20 forks source link

The generated doc don't show any exemple of request and response #30

Closed kadogo closed 5 years ago

kadogo commented 5 years ago

Hello

I see that I have examples in my openapi.yaml (https://gitlab.fusiondirectory.org/fusiondirectory/fd-plugins/raw/1.4-dev/webservice/html/openapi.yaml) but nothing is shown in the generated documentation.

I also set in my conf.py the following opts

'expand-responses': [ "200", "201" ],

Cheers.

kadogo commented 5 years ago

At end it work now that I use the latest standalone version of redoc

redoc_uri = 'https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js'
ikalnytskyi commented 5 years ago

Looks like you use OpenAPI v3, and latest stable ReDoc is only OpenAPI v2 compatible. The latest unstable version (i.e. redoc@next) works with OpenAPI v3. I'll the this plugin once ReDoc v2 that supports OpenAPI v3 is released.