Sanic OpenAPI 3

⚠️ Sanic OpenAPI 3 support is experimental. This feature may be subject to change in future releases.

Getting started

Here is an example to use Sanic-OpenAPI 2:

from sanic import Sanic
from sanic.response import json

from sanic_openapi import openapi3_blueprint

app = Sanic("Hello world")

async def test(request):
    return json({"hello": "world"})

if __name__ == "__main__":"", port=8000)

And you can get your Swagger document at http://localhost:8000/swagger like this: ../_images/hello_world_example1.png