OpenAPI Updater
This skill helps you add new API endpoints to an OpenAPI 3.0.3 specification and automatically update the associated Mintlify documentation structure.When to use this skill
Use this skill when the user wants to:- Add new API endpoints to existing documentation
- Update
openapi.jsonwith new paths and schemas - Create endpoint documentation files
- Update navigation in
docs.json - Add new enumerations or resources
Input format
The user will provide API documentation in various formats:- cURL examples with request/response examples
- API specification fragments
- Structured descriptions of endpoints
Project structure assumptions
This skill assumes a Mintlify documentation project with this structure:Workflow
Step 1: Understand the API endpoints
First, gather this information for each new endpoint:- HTTP method: GET, POST, PUT, DELETE, PATCH
- Path: e.g.,
/api/v1/tracker/address/blacklist - Summary: Short description
- Parameters: Query parameters, headers
- Request body: Structure for POST/PUT/PATCH
- Responses: 200, 400, 401, etc. with examples
- Tags: Which API group (e.g., “KYA”, “KYT”, “Address Management”)
Step 2: Update openapi.json
Read the existingapi-reference/openapi.json and add:
- Add to
tagsif a new category is needed - Add to
pathsthe new endpoints with:- Method (get/post/put/delete/patch)
- Summary and description
- Parameters (query, header)
- Request body (for non-GET requests)
- Responses with examples
- Add to
components/schemasany new schemas needed:- Request/response bodies
- Nested objects
- Enumerations
- Use
$refto reference existing schemas when possible - Follow existing naming conventions (PascalCase for schemas)
- Include
examplefields in responses for documentation - Reuse common response types like
BaseResponse,Error,Pagination - Reference shared schemas like
Network,RiskType,RiskLevel
Step 3: Create endpoint documentation files
For each endpoint, create a.md file in api-reference/endpoints/[category]/:
GET /api/v1/tracker/kya/entities→retrieve-entity.mdPOST /api/v1/tracker/address/blacklist→add-blacklist-addresses.md
[verb]-[noun].md using lowercase with hyphens.
Step 4: Update docs.json navigation
Readdocs.json and add the new endpoints to the appropriate group under the “API Reference” tab.
Structure:
Step 5: Update resources if needed
If the new endpoints introduce new enumerations or types, updateapi-reference/resources/enumerations.md.
Add new sections following the existing format with tables showing:
- Code/Name values
- Descriptions in multiple languages (if applicable)
Field descriptions
When writing schema descriptions, be precise:- Timestamps: Use “A unix timestamp” (not milliseconds)
- Optional fields: Mark with
descriptionbut don’t userequired: [] - Array limits: Use
maxItemswith explanation - Defaults: Use
defaultin parameter schemas
Error handling
Always include standard error responses:- 400:
$ref: "#/components/responses/BadRequest" - 401:
$ref: "#/components/responses/Unauthorized" - 429:
$ref: "#/components/responses/RateLimit" - 500:
$ref: "#/components/responses/InternalServerError"
Verification
After making changes:- The JSON files should be valid (you can validate with python/json.tool)
- The structure should match existing patterns
- All new paths should be referenced in docs.json
- All schemas referenced should exist
Common schemas to reference
Before creating new schemas, check if these existing ones can be used:BaseResponse- Standard response wrapperError- Error response structureNetwork- Blockchain network enumNetworkCore- Core networks (ethereum, eth, tron, btc, bsc)RiskType- Risk category enumRiskLevel- Risk level enumEntity- Entity informationRisk- Risk assessment with riskLevel, riskType, riskSourcePagination- Pagination metadata (current_page, per_page, total_pages, total_items)AsyncTaskStatus- Async task status codes
Example workflow
When the user provides new API documentation:- Parse the documentation to extract endpoints
- Read
api-reference/openapi.json - For each endpoint:
- Add the path with method
- Add schemas for request/response (reusing existing schemas when possible)
- Create endpoint
.mdfiles in appropriate category folder - Update
docs.jsonwith navigation entries - Update
api-reference/resources/enumerations.mdif new enums are added