Enable users to interact with your API
docs.json
.
We recommend generating your API playground from an OpenAPI specification. See OpenAPI Setup for more information on creating your OpenAPI document.
Add your OpenAPI specification file.
Configure `docs.json`.
docs.json
to reference your OpenAPI specification. Add an openapi
property to any navigation element to auto-populate your docs with pages for each endpoint specified in your OpenAPI document.This example generates a page for each endpoint specified in openapi.json
and organize them under the “API reference” group in your navigation.docs.json
.
x-mint
extension in your OpenAPI specification or create individual MDX
pages for your endpoints.
Both options allow you to:
x-mint
extension is recommended so that all of your API documentation is automatically generated from your OpenAPI specification and maintained in one file.
Individual MDX
pages are recommended for small APIs or when you want to experiment with changes on a per-page basis.
For more information, see x-mint extension and MDX Setup.