Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
swagger-ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I believe drf-yasg what you need. You can create a schema manually and define request and response types for your small API.
I did this in one of my projects: https://gitlab.com/mrswats/config-server/-/commit/b5dac490bc3e12a6d4f2090b11b3616b82aaf300
I would suggest drf-spectacular instead because https://github.com/axnsan12/drf-yasg#openapi-30-note
Then you need a html file that loads swagger-ui and points towards your openapi.json file from the previous step. Look at the unpkg example here for the easiest way to set one up. Either hard code the url in the file or serve it as a django template that fills in the correct value.
Sure. You can use the editor from here for instance to define your endpoints and the data received and returned. By looking at the preloaded example you can figure out most of what you need to know about openapi. But if you need more info, the official documentation is pretty good.