格式化与代码
OpenAPI / Swagger 验证器
Validate OpenAPI 3 specs against the spec rules.
Runs in your browser
编辑注
Understanding · A spec for the spec.
本深度章节目前仅有英文版本。上方的转换工具支持您的语言;长篇说明文章尚未翻译。
常见问题
Quick answers.
›Which versions of OpenAPI are supported?
The validator supports OpenAPI 3.0 and 3.1, as well as legacy Swagger 2.0 definitions in both YAML and JSON formats.
›Is my API specification private?
Yes. Validation happens locally within your browser using JavaScript. Your API keys, endpoints, and schema details are never uploaded to our servers.
›How do I fix validation errors?
The tool provides the specific line and column number for each error alongside a description of the rule violation. Correct these values in your editor and the validator will refresh the status.
›Does this tool lint for best practices?
This tool focuses on structural validity against the official specification. For custom style guides or naming conventions, a dedicated linter like Spectral is typically required.
大家也在搜索
相关工具
More in this room.
- OpenAPI 3.1 YAML ⇄ JSON在 YAML 和 JSON 之间转换 OpenAPI 规范。
- OpenAPI → TypeScript Axios 客户端从任何 OpenAPI 规范生成类型化的 Axios 客户端。
- OpenAPI → React Query Hooks为每个端点自动生成 useQuery + useMutation hook。
- OpenAPI → Postman Collection从任何 OpenAPI 规范生成 Postman v2.1 collection。
- GraphQL SDL ⇄ TypeScript 类型遍历 schema,发出类型化接口,然后反向操作。
- JSON Schema → Zod / Valibot / ArkType从一个 JSON Schema 中生成三种运行时验证器。