# OpenAPI Validator API
> Validate and summarise an OpenAPI / Swagger API definition. Supply the spec inline (?spec=), as a request body, or fetched from a URL (?url=, SSRF-guarded) — in JSON or YAML. The validator detects the version (Swagger 2.0, OpenAPI 3.0.x or 3.1.x), checks the required structure (info.title and info.version, the presence of paths/components, and every operation's responses), and lints for common problems — duplicate or missing operationIds, operations without a summary or description, tags used but not declared, and malformed paths — returning a valid flag, counts of paths, operations, schemas, tags and servers, and separate error and warning lists. A summary endpoint inventories the whole API: every endpoint with its method, path, operationId, summary and tags, plus the declared servers, tags and component schemas. Built for CI gates on API contracts, API-catalogue ingestion, documentation pipelines and design review. An OpenAPI definition validator and linter — distinct from the JSON-Schema validator (jsonschema), the JSON/YAML/XML converters and the on-page HTML/SEO tools. No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/openapi-api/..."
```

## Pricing
- **Free** (Free) — 2,360 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 47,000 calls/Mo, 8 req/s
- **Pro** ($22/Mo) — 240,000 calls/Mo, 20 req/s
- **Mega** ($57/Mo) — 880,000 calls/Mo, 50 req/s

## Endpoints

### OpenAPI

#### `GET /v1/summary` — Inventory a spec's endpoints

**Parameters:**
- `spec` (query, optional, string) — Inline OpenAPI/Swagger JSON or YAML Example: `{"openapi":"3.0.0","info":{"title":"Example API","version":"1.0.0"},"paths":{"\/ping":{"get":{"operationId":"ping","summary":"Ping","responses":{"200":{"description":"ok"}}}}}}`
- `url` (query, optional, string) — URL to fetch the spec from

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openapi-api/v1/summary?spec=%7B%22openapi%22%3A%223.0.0%22%2C%22info%22%3A%7B%22title%22%3A%22Example+API%22%2C%22version%22%3A%221.0.0%22%7D%2C%22paths%22%3A%7B%22%5C%2Fping%22%3A%7B%22get%22%3A%7B%22operationId%22%3A%22ping%22%2C%22summary%22%3A%22Ping%22%2C%22responses%22%3A%7B%22200%22%3A%7B%22description%22%3A%22ok%22%7D%7D%7D%7D%7D%7D"
```

#### `GET /v1/validate` — Validate & lint a spec

**Parameters:**
- `spec` (query, optional, string) — Inline OpenAPI/Swagger JSON or YAML Example: `{"openapi":"3.0.0","info":{"title":"Example API","version":"1.0.0"},"paths":{"\/ping":{"get":{"operationId":"ping","summary":"Ping","responses":{"200":{"description":"ok"}}}}}}`
- `url` (query, optional, string) — URL to fetch the spec from

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openapi-api/v1/validate?spec=%7B%22openapi%22%3A%223.0.0%22%2C%22info%22%3A%7B%22title%22%3A%22Example+API%22%2C%22version%22%3A%221.0.0%22%7D%2C%22paths%22%3A%7B%22%5C%2Fping%22%3A%7B%22get%22%3A%7B%22operationId%22%3A%22ping%22%2C%22summary%22%3A%22Ping%22%2C%22responses%22%3A%7B%22200%22%3A%7B%22description%22%3A%22ok%22%7D%7D%7D%7D%7D%7D"
```

### Meta

#### `GET /v1/meta` — Supported versions & inputs

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openapi-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/openapi-api
OpenAPI spec: https://www.oanor.com/api/openapi-api/openapi.json
