All Projects → sanic-org → Sanic Openapi

sanic-org / Sanic Openapi

Licence: mit
Easily document your Sanic API with a UI

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sanic Openapi

Django Rest Swagger
Swagger Documentation Generator for Django REST Framework: deprecated
Stars: ✭ 2,553 (+471.14%)
Mutual labels:  openapi, swagger-ui
sanic-ext
Extended Sanic functionality
Stars: ✭ 26 (-94.18%)
Mutual labels:  sanic, openapi
OpenAPI-Viewer
OpenApi viewer Implemented using Vue
Stars: ✭ 93 (-79.19%)
Mutual labels:  openapi, swagger-ui
Gradle Swagger Generator Plugin
Gradle plugin for OpenAPI YAML validation, code generation and API document publishing
Stars: ✭ 197 (-55.93%)
Mutual labels:  openapi, swagger-ui
crud
Swagger/OpenAPI builder and input validation for Go APIs
Stars: ✭ 34 (-92.39%)
Mutual labels:  openapi, swagger-ui
Restrserve
R web API framework for building high-performance microservices and app backends
Stars: ✭ 207 (-53.69%)
Mutual labels:  openapi, swagger-ui
cakephp-swagger-bake
Automatically generate OpenAPI, Swagger, and Redoc documentation from your existing CakePHP code.
Stars: ✭ 48 (-89.26%)
Mutual labels:  openapi, swagger-ui
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (-70.69%)
Mutual labels:  openapi, swagger-ui
vim-swagger-preview
A Vim plugin for previewing swagger/openAPI spec in Chrome with swagger-ui.
Stars: ✭ 19 (-95.75%)
Mutual labels:  openapi, swagger-ui
Swiftgger
OpenAPI support for server side Swift projects.
Stars: ✭ 97 (-78.3%)
Mutual labels:  openapi, swagger-ui
Drf Yasg
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
Stars: ✭ 2,523 (+464.43%)
Mutual labels:  openapi, swagger-ui
apiflask
A lightweight Python web API framework.
Stars: ✭ 442 (-1.12%)
Mutual labels:  openapi, swagger-ui
Express Oas Generator
OpenAPI (Swagger) specification generator for ExpressJS applications
Stars: ✭ 138 (-69.13%)
Mutual labels:  openapi, swagger-ui
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+531.99%)
Mutual labels:  openapi, swagger-ui
Rapipdf
PDF generation from OpenAPI / Swagger Spec
Stars: ✭ 132 (-70.47%)
Mutual labels:  openapi, swagger-ui
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (-80.98%)
Mutual labels:  openapi, swagger-ui
Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-81.66%)
Mutual labels:  openapi, swagger-ui
L5 Swagger
OpenApi or Swagger integration to Laravel
Stars: ✭ 1,781 (+298.43%)
Mutual labels:  openapi, swagger-ui
Ktor-OpenAPI-Generator
Ktor OpenAPI/Swagger 3 Generator
Stars: ✭ 203 (-54.59%)
Mutual labels:  openapi, swagger-ui
asymmetric
Ridiculously fast and easy module-to-API transformations. Learn in minutes, implement in seconds. Batteries included.
Stars: ✭ 35 (-92.17%)
Mutual labels:  openapi, swagger-ui

Sanic OpenAPI

Build Status PyPI PyPI Code style: black codecov

Give your Sanic API a UI and OpenAPI documentation, all for the price of free!

Example Swagger UI

Sponsor

Try CodeStream

Manage pull requests and conduct code reviews in your IDE with full source-tree context. Comment on any line, not just the diffs. Use jump-to-definition, your favorite keybindings, and code intelligence with more of your workflow.

Learn More

Thank you to our sponsor. Check out open collective to learn more about helping to fund Sanic.

Installation

pip install sanic-openapi

Add Swagger UI with the OpenAPI spec:

from sanic_openapi import swagger_blueprint

app.blueprint(swagger_blueprint)

You'll now have a Swagger UI at the URL /swagger/ and an OpenAPI 2.0 spec at /swagger/swagger.json. Your routes will be automatically categorized by their blueprints.

Example

Here is an example to use Sanic-OpenAPI:

from sanic import Sanic
from sanic.response import json
from sanic_openapi import swagger_blueprint

app = Sanic(name="AwesomeApi")
app.blueprint(swagger_blueprint)


@app.route("/")
async def test(request):
    return json({"hello": "world"})


if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

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

Documentation

Please check the documentation on Readthedocs

Contribution

Any contribution is welcome. If you don't know how to getting started, please check issues first and check our Contributing Guide to start you contribution.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].