webdev_openapi_viewer
Parse an OpenAPI or Swagger specification to detect its version, count endpoints, and list component schemas. Use it to inspect or summarize an API contract from text.
Instructions
OpenAPI/Swagger Spec Parser And Summarizer. Parse a pasted OpenAPI or Swagger API specification (JSON, or a simple subset of YAML) and return its detected version, total operation count, and component/definition schemas. Use it to inspect or summarize an API contract you already have as text; use format_json_schema_generator instead to derive a JSON Schema from sample data, or format_json to pretty-print generic JSON. Does not fetch any URL — it only parses the string you send; pure local compute, read-only, non-destructive, contacts no external service, and is rate-limited (30 requests/min anonymous). Returns the normalized spec object, a version label, the endpoint count, and the schemas map.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| specification | Yes | Raw OpenAPI/Swagger document as text (aliases: spec, input). Parsed as JSON first, then as simple YAML if that fails. Must be non-empty and contain an "openapi" or "swagger" field plus an "info" object, or the request is rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | The normalized specification object parsed from the input. | |
| version | No | Detected version label, e.g. "OpenAPI 3.0.0", "Swagger 2.0", or "Unknown". | |
| endpointCount | No | Total number of HTTP operations (get/post/put/delete/patch/options/head) across all paths. | |
| schemas | No | Component schemas (OpenAPI components.schemas) or Swagger definitions; empty object if none. |