Swagger: Validate API
swagger_validate_apiValidate OpenAPI or AsyncAPI definitions to find structural errors, with structured diagnostics by line, severity, and message from server-side linting.
Instructions
Validate an OpenAPI or AsyncAPI definition using server-side apidom-ls. Returns structured diagnostics with line number, severity, and message for each finding. Supports OpenAPI 2.0, 3.0, 3.1, and AsyncAPI. Provide either the raw definition (JSON or YAML) OR an existing API by owner, apiName, and version. Use this tool when the user asks to validate, lint, or check an API spec for structural errors matching the Studio Validation tab.
Toolset: Registry API
Parameters:
definition (string): API definition content (OpenAPI/AsyncAPI in JSON or YAML). Provide this or owner/apiName/version, not both.
owner (string): API owner (organization or user). Use with apiName and version to fetch an existing API from the registry.
apiName (string): API name
version (string): Version identifier
maxProblems (number): Cap on the number of findings returned (default 100, max 1000)
uri (string): Optional pseudo-URI hint for the parser (e.g. inmemory://spec.yaml)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | Optional pseudo-URI hint for the parser (e.g. inmemory://spec.yaml) | |
| owner | No | API owner (organization or user). Use with apiName and version to fetch an existing API from the registry. | |
| apiName | No | API name | |
| version | No | Version identifier | |
| definition | No | API definition content (OpenAPI/AsyncAPI in JSON or YAML). Provide this or owner/apiName/version, not both. | |
| maxProblems | No | Cap on the number of findings returned (default 100, max 1000) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Detected specification info | |
| valid | No | True if the spec has no error findings | |
| summary | No | ||
| findings | No | List of validation findings | |
| recognized | No | True if the spec was recognized as OpenAPI/AsyncAPI |