diff --git a/api-playground/openapi-setup.mdx b/api-playground/openapi-setup.mdx index 665d9024c..c13f27b7b 100644 --- a/api-playground/openapi-setup.mdx +++ b/api-playground/openapi-setup.mdx @@ -45,6 +45,29 @@ Reference any number of OpenAPI specifications in the navigation element of your Mintlify supports `$ref` for **internal references only** within a single OpenAPI document. Mintlify does not support external references. +### Use a localhost specification + +During local development, you can generate an OpenAPI document from a service running on your machine and reference its localhost URL: + +```json +"navigation": { + "tabs": [ + { + "tab": "API Reference", + "openapi": "http://localhost:8000/openapi.json" + } + ] +} +``` + +Pass `--local-schema` to allow the CLI to fetch the specification over HTTP: + +```bash +mint dev --local-schema +``` + +To validate the same configuration without starting a preview, run `mint validate --local-schema`. Production deployments require OpenAPI URLs to use HTTPS. + ### Describe your API Use the following resources to learn about and construct your OpenAPI specification.