Viewer OpenAPI & Swagger
Dokumentasi interaktif untuk OpenAPI 3.x dan Swagger 2.0 dengan salin snippet cURL/Fetch.
OpenAPI / Swagger Spec (JSON or YAML)
Petstore API
v1.0.0A sample Petstore API spec for demonstrating OpenAPI / Swagger rendering
https://petstore.swagger.io/v2Apa itu Viewer OpenAPI & Swagger?
Viewer OpenAPI & Swagger (Versi Bahasa Indonesia) — The OpenAPI & Swagger Spec Viewer lets you paste or upload any OpenAPI 3.0, 3.1, or Swagger 2.0 specification in JSON or YAML format and instantly transforms it into an interactive, visual API documentation interface. Endpoints are automatically grouped by tags, HTTP method badges (GET, POST, PUT, DELETE, PATCH), parameter tables, request body definitions, and status code response schemas. It also displays header authentication requirements (Bearer JWT, API Keys, Basic Auth) and provides one-click cURL and JavaScript Fetch code snippet generation for testing endpoints.
Cara menggunakan Viewer OpenAPI & Swagger
- Paste your OpenAPI 3.x or Swagger 2.0 specification (JSON or YAML) into the left panel editor.
- The interactive viewer on the right parses your spec instantly and renders all API endpoints.
- Use the method filters (GET, POST, PUT, etc.) or search bar to filter endpoints by path, summary, or tag.
- Click any endpoint accordion to view required parameters, request bodies, and response schemas.
- Click 'cURL' or 'Fetch' to copy ready-to-run terminal or browser request code snippets.
Contoh
Inspecting an OpenAPI 3.0 spec
Masukan
openapi: 3.0.3 info: title: My API version: 1.0.0 paths: /users: get: summary: List Users
Keluaran
Interactive documentation showing GET /users endpoint with status codes and parameter schemas
Generating cURL for a POST endpoint
Masukan
openapi: 3.0.0 info: title: Orders API version: 1.0.0 paths: /orders: post: summary: Create Order
Keluaran
One-click copy cURL command with JSON payload headers and authorization Bearer token
Kesalahan umum
- Pasting invalid YAML or JSON with syntax errors — ensure your document is valid before viewing.
- Forgetting to define securitySchemes in components — without security definitions, default bearer tokens are generated for authorization.
- Expecting real network requests to execute inside the viewer — this tool is designed for specification rendering and code snippet generation.
Mengapa menggunakan alat ini
- Runs 100% client-side — your API contracts, internal endpoints, and tokens stay private.
- Instant cURL and Fetch code generation for fast testing.
- Supports both OpenAPI 3.x and Swagger 2.0 in JSON and YAML.