Use OpenAPI features to enhance your documentation
/users/{id}
, or maybe simply /
. To specify the base URL to which these paths should be appended, OpenAPI provides the servers
field. This field is necessary to use some Mintlify features like the API Playground. Read how to configure the servers
field in the Swagger documentation.
The API Playground will use these server URLs to determine where to send requests. If multiple servers are specified, a dropdown will appear to allow toggling between servers. If no server is supplied, the API Playground will use simple mode, as there is no way to send a request.
If different endpoints within your API exist at different URLs, you can override the server field for a given path or operation.
securitySchemes
field for defining the methods of authentication used throughout your API, with simple configuration for the most common authentication types - Basic, Bearer, and API Keys. To apply these authentication methods to your endpoints, OpenAPI uses the security
field. The syntax for defining and applying authentication is a bit unintuitive, so definitely check out Swagger’s documentation and examples on the topic.
The API descriptions and API Playground will add authentication fields based on the security configurations in your OpenAPI document.
If different endpoints within your API require different methods of authentication, you can override the security field for a given operation.