extract_openapi_endpoints
Extract specific endpoints from a large OpenAPI definition file to create a smaller, focused API specification. Input the path to the original file, list endpoints to keep, and save the condensed output for targeted use.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
endpointsToKeep | Yes | List of exact endpoint paths to keep (e.g., ['/users', '/users/{id}']). | |
inputApiPath | Yes | Absolute path to the large input OpenAPI definition file. | |
outputApiPath | Yes | Absolute path where the final, smaller bundled OpenAPI file should be saved. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"endpointsToKeep": {
"description": "List of exact endpoint paths to keep (e.g., ['/users', '/users/{id}']).",
"items": {
"type": "string"
},
"type": "array"
},
"inputApiPath": {
"description": "Absolute path to the large input OpenAPI definition file.",
"type": "string"
},
"outputApiPath": {
"description": "Absolute path where the final, smaller bundled OpenAPI file should be saved.",
"type": "string"
}
},
"required": [
"inputApiPath",
"endpointsToKeep",
"outputApiPath"
],
"type": "object"
}