OpenAPI Path Generator
Build OpenAPI 3.x path definitions in YAML or JSON format.
Configure HTTP method, path and query parameters, request body schema, and response codes —
then copy directly into your openapi.yaml.
Frequently Asked Questions
What is an OpenAPI path definition?▼
An OpenAPI path definition describes a single HTTP endpoint in your API. It lives under the top-level 'paths' key in your openapi.yaml or openapi.json file and specifies the HTTP method (GET, POST, etc.), input parameters, request body schema, and all possible response codes. The OpenAPI 3.x specification is maintained by the OpenAPI Initiative and is the industry standard for describing REST APIs in a language-agnostic way.
What is the difference between OpenAPI 3.0 and 3.1?▼
OpenAPI 3.1 (released 2021) aligns fully with JSON Schema Draft 2020-12, removing several OpenAPI-specific keywords in favour of standard JSON Schema equivalents. Key changes: 'nullable' is replaced by adding 'null' to the 'type' array (e.g. type: [string, null]), 'exclusiveMinimum'/'exclusiveMaximum' are now numeric values, and 'discriminator' works with any schema combiner. Most tooling (Swagger UI, Redoc, code generators) supports both versions. The output from this tool is compatible with both 3.0 and 3.1.
What is an operationId and why does it matter?▼
The operationId is a unique string identifier for an operation across the entire API. It must be unique within the document. It is used by code generators (openapi-generator, swagger-codegen, Kiota) to name the generated client methods — so 'getUser' becomes client.getUser(). A missing or duplicate operationId breaks most code-gen tools. Best practice: use camelCase, follow the pattern verbResource (e.g. listUsers, createOrder, deleteComment).
When should I use 'in: path' vs 'in: query' parameters?▼
Use 'in: path' for resource identifiers that are part of the URL structure, such as /users/{id} or /orders/{orderId}/items/{itemId}. Path parameters are always required. Use 'in: query' for filtering, sorting, pagination, and optional modifiers: /users?role=admin&page=2&limit=20. Use 'in: header' for technical metadata like API versions (X-API-Version), idempotency keys (Idempotency-Key), or correlation IDs. Never put sensitive data like API keys in path or query params — use 'in: header' or a security scheme.
How do I reference reusable schemas instead of inlining them?▼
OpenAPI supports $ref pointers to avoid repeating schemas. Define shared schemas under components/schemas in your openapi.yaml: components: schemas: User: type: object properties: id: { type: string } Then reference them anywhere: $ref: '#/components/schemas/User'. This tool generates inline schemas for quick starts — for production APIs, extract schemas to components/schemas and replace inline definitions with $refs.
How do I validate my OpenAPI document?▼
Several free tools can validate your OpenAPI YAML or JSON: (1) Swagger Editor at editor.swagger.io — paste your document for instant feedback. (2) Redocly CLI: npm install -g @redocly/cli && redocly lint openapi.yaml — strict linting with opinionated rules. (3) Spectral by Stoplight: npm install -g @stoplight/spectral-cli — highly configurable rule sets including custom rules. (4) openapi-generator validate — validates before generating client SDKs. For CI/CD, Redocly and Spectral both support config files and exit codes for pipeline gates.
Related Products
on GumroadDevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →TypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
OpenAPI Validator
Paste your OpenAPI 3.x spec (YAML or JSON) to validate structure, find missing required fields, detect duplicate paths, check for missing operationIds, and get errors and warnings with path references.
Open free tool →
OpenAPI Schema Validator
Paste OpenAPI 3.x YAML or JSON and get instant validation errors and warnings. Checks required fields, paths, operations, response codes, and components. Runs entirely in your browser.
Open free tool →
OpenAPI Mock Generator
Paste an OpenAPI spec and get mock response data for testing. Generates realistic sample JSON from your API schema definitions.
Open free tool →
More Free Tools
Related Articles
Best API Documentation Tools for Developers in 2025 (Swagger, Redoc, Scalar, and More)
A practical comparison of API documentation tools in 2025 — Swagger UI, Redoc, Scalar, Stoplight, and Mintlify — covering OpenAPI support, customization, hosting options, and developer experience.
Top 10 Free API Documentation Tools for Developers in 2026
The best free API documentation tools in 2026. Compare Swagger UI, Redoc, Stoplight, Scalar, and more—with practical guidance on which to choose for your project.
How to Use curl for API Testing
Master curl for API testing: GET, POST, auth tokens, JSON payloads, debugging flags, and practical real-world examples every backend developer needs daily.
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
GraphQL Federation vs REST Microservices: Which Architecture in 2026?
Compare GraphQL Federation vs REST microservices — Apollo Federation, schema stitching, performance, team scaling, migration paths, and when to choose each in 2026.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →