Reference OpenAPI endpoints in your docs pages
mint openapi-check <openapiFilenameOrUrl>
.servers
field to your OpenAPI document with your API’s base URL.
/users/{id}
or simply /
. The base URL defines where these paths should be appended. For more information on how to configure the servers
field, see API Server and Base Path in the OpenAPI documentation.
The API playground uses these server URLs to determine where to send requests. If you specify multiple servers, a dropdown will allow users to toggle between servers. If you do not specify a server, the API playground will use simple mode since it cannot send requests without a base URL.
If your API has endpoints that exist at different URLs, you can override the server field for a given path or operation.
securitySchemes
and security
fields in your OpenAPI document. The API descriptions and API Playground will add authentication fields based on the security configurations in your OpenAPI document.
Define your authentication method.
securitySchemes
field to define how users authenticate.This example shows a configuration for bearer authentication.Apply authentication to your endpoints.
security
field to require authentication.openapi
field to any navigation element in your docs.json
to auto-populate your docs with a page for each specified endpoint. The openapi
field can contain the path to an OpenAPI document in your docs repo or the URL of a hosted OpenAPI document.
The metadata for the generated pages will have the following default values:
title
: The summary
field from the OpenAPI operation, if present. Otherwise a title generated from the HTTP method and endpoint.description
: The description
field from the OpenAPI operation, if present.version
: The version
value from the anchor or tab, if present.deprecated
: The deprecated
field from the OpenAPI operation, if present. If true
, a deprecated label will appear next to the endpoint title in the side navigation and on the endpoint page.api-reference
directory of the docs repo.MDX
files for API pagesMDX
pages for each operation. See an example MDX OpenAPI page from MindsDB and how it appears in their live documentation.
MDX
page for each endpoint and specify which OpenAPI operation to display using the openapi
field in the frontmatter.
When you reference an OpenAPI operation this way, the name, description, parameters, responses, and API playground are automatically generated from your OpenAPI document.
If you have multiple OpenAPI files, include the file path in your reference to ensure Mintlify finds the correct OpenAPI document. If you have only one OpenAPI file, Mintlify will detect it automatically.
If you want to reference an external OpenAPI file, add the file’s URL to your docs.json
.
webhook
(case insensitive) instead of the HTTP method (like GET
or POST
) in your reference.MDX
filesMDX
pages for large OpenAPI documents.
MDX
page for each operation in the paths
field of your OpenAPI document.MDX
page for each operation in the webhooks
field of your OpenAPI document.docs.json
.Generate `MDX` files.
Specify an output folder.
-o
flag to specify a folder to populate the files into. If a folder is not specified, the files will populate in the working directory.MDX
files for OpenAPI schemascomponents.schema
field: