Skip to content
gohacks.dev
APIs

OpenAPI Spec Viewer

Paste an OpenAPI 3 or Swagger 2 spec in YAML or JSON to list every operation with its parameters, body types and responses, and catch the mistakes that break code generators.

Free · No sign-up · Your inputs stay in your browser

Input

View and check an OpenAPI spec

Output

4 operations

TitleOrders API
Version2.3.0
Spec3.1.0
Servershttps://api.example.com/v2
SchemasOrder
MethodPathSummaryParametersBodyResponses
GET/ordersList ordersstatus (query), page (query)-200
POST/ordersCreate an order-application/json201 422
GET/orders/{id}Get one orderid* (path)-200 404
DELETE/orders/{id}deleteOrder--204

GET /orders/{id} has no operationId, so generated clients name it themselves. DELETE /orders/{id} does not declare the path parameter {id}.

Markdown summary

# Orders API 2.3.0 Server: `https://api.example.com/v2` | Method | Path | Summary | | --- | --- | --- | | GET | `/orders` | List orders | | POST | `/orders` | Create an order | | GET | `/orders/{id}` | Get one order | | DELETE | `/orders/{id}` | deleteOrder |

Lists every operation with its parameters (* marks required), request body types and response codes, and flags what breaks code generators: missing or duplicate operationIds, undeclared path parameters, operations without responses. Full schema validation needs the official JSON Schema for your OpenAPI version.

Runs in this browser. Nothing you paste is sent to a server.

Problems generators trip on

Client generators name methods after operationId, so a missing one produces names like getUsersIdPosts and a duplicate one produces a compile error. A path parameter that is not declared breaks request building. These are quick to fix in the spec and painful to work around in generated code. The OpenAPI 3.1 specification defines each object.

Rendering docs

Swagger UI, Redoc and Scalar render interactive documentation from the same file; Spectral lints it against style rules in CI.

Share

Frequently asked questions

What is the difference between OpenAPI and Swagger?
Swagger 2.0 was renamed OpenAPI when it moved to the OpenAPI Initiative. OpenAPI 3.0 and 3.1 are the newer versions; 3.1 aligns its schemas with JSON Schema 2020-12.
Can I validate requests against an OpenAPI spec?
Yes, with middleware such as express-openapi-validator in Node or league/openapi-psr7-validator in PHP, which check requests and responses against the spec at runtime or in tests.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools