API documentation providers
liblab offers native integrations with popular API documentation platforms like Mintlify, Redocly, and ReadMe. By using the enhancedApiSpec
output, which includes your API spec enhanced with SDK code snippets, you can seamlessly integrate these enriched specifications directly into your GitHub repository.
This integration simplifies the process of generating comprehensive, developer-friendly documentation for your APIs and ensures that it is always updated.
To use this feature, you must have an existing Mintlify, ReDoc, or ReadMe repository. The integration will push the updated API spec, including the SDK code snippets, into this repository.
Configuration Options
Below are the configuration options required to set up the integration:
Option | Type | Required | Default | Description |
---|---|---|---|---|
provider | string | ✅ | N/A | The API documentation provider (mintlify , readmeIO , or redocly ). |
githubRepoName | string | ✅ | N/A | The name of the GitHub repository where your API documentation is hosted. |
targetBranch | string | ❌ | main | The branch from which the PR will be created to update your documentation. |
mintlify.codeSamplesLanguages | array | ❌ | N/A | An array of strings that defines the programming languages available for code samples. If specified, liblab will exclude auto-generated languages from Mintlify, except for cURL, and include only the provided languages. |
redocly.openapiPath | string | ❌ | N/A | Specifies the path to the OpenAPI specification. If provided, liblab’s CLI will use the OpenAPI spec from this path instead of the one in the redocly.yaml file within the GitHub repository. If you provide the openapiPath , the repository does not need a redocly.yaml file. |
readmeIO.openapiPath | string | ❌ | N/A | Defines the file path where the OpenAPI specification should be stored. If this path is provided, liblab's CLI will save the enhanced OpenAPI specification to the specified location instead of the root directory of the target repository (githubRepoName ). |
You can integrate with either Mintlify or Redocly, depending on the API documentation platform you are using. Here are the supported values for the provider
field and their corresponding requirements:
Value | Description | Dependencies |
---|---|---|
mintlify | Integrates with an existing Mintlify project. | Requires mint.json in the root of your project. |
redocly | Integrates with an existing Redocly project. | Requires redocly.yaml in the root of your project. |
readmeIO | Integrates with an existing ReadMe project. |
The following example shows how to integrate liblab with Mintlify. By adding the following configuration, liblab will update the api-docs
repository with the enhanced API spec when you build your SDKs.
"integrations": {
"enhancedApiSpec": {
"provider": "mintlify",
"githubRepoName": "api-docs"
}
}
...
Once you've set up the integration, liblab will automatically handle the updates to your API documentation in the specified GitHub repository. You can configure which branch to use or allow liblab to default to the main
branch.
Check out the Redocly API docs integration tutorial to follow a step-by-step guide on integrating liblab with Redocly.