OpenAPI & Swagger Viewer & Validator
Preview interactive REST documentation, validate OpenAPI 3.0 / 3.1 and Swagger 2.0 contracts, resolve $ref schemas, and export cURL commands 100% locally.
Modern Commerce REST API
v1.4.0OpenAPI 3.0.3Production REST endpoints for managing product catalogs, shopping carts, and Stripe checkouts.
https://api.example.com/v1/productsList all catalog productsReturns paginated catalog items filtered by category or availability.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Maximum items per page |
category | query | string | Filter by category slug |
Responses
#/components/schemas/ProductGenerated cURL Command
curl -X GET "https://api.example.com/v1/products"
/products/{productId}Get product details by ID/ordersCreate a new customer orderContract-First API Design with OpenAPI 3.0 & 3.1
Modern backend engineering teams increasingly adopt Contract-First API Development. Rather than writing controller handlers first and generating inconsistent documentation afterwards, frontend, mobile, and backend engineers agree on a single machine-readable OpenAPI Specification (formerly Swagger) before writing a single line of application code.
With a verified OpenAPI YAML or JSON contract, teams unlock massive parallel velocity: frontend engineers can generate strongly typed TypeScript interfaces and mock servers, QA teams can automate schema contract tests, and gateways like AWS API Gateway, Kong, and Cloudflare can enforce request validation directly at the edge.
The HiFi Toolkit OpenAPI Viewer validates your specification structure in real time inside your browser—ensuring proprietary endpoints, authentication schemes, and internal server hosts never touch third-party cloud servers.
Anatomy of an OpenAPI 3.1 Document
| Root Section | Required? | Purpose & Engineering Role |
|---|---|---|
openapi | Yes | Declares the semantic OpenAPI version (e.g., 3.0.3 or 3.1.0). |
info | Yes | Contains API title, semantic version, contact email, license, and overview description. |
servers | Recommended | Lists base URLs for Production, Staging, and Local environments with optional variables. |
paths | Yes | Defines URL routes (/orders), HTTP verbs, parameters, request bodies, and status responses. |
components | Optional | Reusable schemas, securitySchemes (JWT/OAuth2/API Keys), and shared responses referenced via $ref. |
OpenAPI 3.1 vs. OpenAPI 3.0 vs. Swagger 2.0 vs. GraphQL
| Feature | OpenAPI 3.1 | OpenAPI 3.0 | Swagger 2.0 |
|---|---|---|---|
| JSON Schema Alignment | Full JSON Schema Draft 2020-12 | Extended Draft-00 subset | Draft-04 subset |
| Multiple Server URLs | Supported (servers array) | Supported (servers array) | Single host + basePath |
| Webhooks Top-Level Key | Native webhooks support | Callbacks only | Not supported |
| Reusable Security | components.securitySchemes | components.securitySchemes | securityDefinitions |
Production API Contract Checklist
- Always tag endpoints logically: Grouping paths under tags such as
Authentication,Billing, andCatalogmakes large microservices navigable. - Eliminate duplication with
$ref: Define canonical models likeErrorResponseandPaginationMetaonce insidecomponents.schemas. - Document 4xx and 5xx error responses: Consumers need exact schemas for
400 Validation Error,401 Unauthorized, and429 Rate Limited, not just200 OK. - Provide realistic examples: Adding
examplefields inside schemas enables automatic mock servers and clearer onboarding for external integrators.
How to Use This Viewer
- Paste your YAML or JSON spec into the left editor—or click one of the 3 starter API templates.
- Inspect real-time validation badges for missing fields, broken syntax, or undocumented endpoints.
- Filter routes by HTTP method, path keyword, or API tag on the right pane.
- Expand any endpoint to view resolved
$refschemas and copy ready-to-use cURL commands. - Use Convert to JSON / Format YAML or Share Link to collaborate with teammates.
Related API & Schema Tools
Frequently Asked Questions
Explore Related Tools
Hand-picked utilities and calculators related to this tool.