OpenAPI Validation

Validate an OpenAPI 3.x specification: required fields, endpoint definitions and schema references.

Pay by wallet (x402) openapi-validate

Example

Example answer
{
  "valid": true,
  "errors": [],
  "warnings": [
    {
      "path": "/servers",
      "message": "No 'servers' defined — consumers won't know the base URL"
    }
  ],
  "error_count": 0,
  "schema_count": 0,
  "warning_count": 1,
  "endpoint_count": 0,
  "version_detected": "3.0.0"
}

Inputs

FieldTypeRequiredWhat it is
specanyYesOpenAPI spec as JSON string or object

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
validbooleanAlways (present in every successful answer)
errorsarrayAlways (present in every successful answer)
warningsarrayAlways (present in every successful answer)
error_countintegerAlways (present in every successful answer)
schema_countintegerAlways (present in every successful answer)
warning_countintegerAlways (present in every successful answer)
endpoint_countintegerAlways (present in every successful answer)
version_detectedstringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "openapi-validate",
    "inputs": {
      "spec": "{\"openapi\":\"3.0.0\",\"info\":{\"title\":\"Test API\",\"version\":\"1.0\"},\"paths\":{}}"
    },
    "max_price_cents": 5
  }'

Limitations

  • Custom OpenAPI extensions are not checked

    Validates against OpenAPI 3.0/3.1 specification — custom extensions and vendor-specific annotations are not checked

    What to do instead: For vendor extensions (x- prefixed), add your own validation rules in a post-processing step

Bundled checks that include it