Free tool
OpenAPI Linter
Paste an OpenAPI or Swagger spec. The linter lists what a valid spec can still get wrong: missing operationIds, missing summaries, no error responses, no tags. It runs in your browser.
Linting is not validating
The OpenAPI Validator checks that a document is legal OpenAPI. The linter checks that it is useful. A spec can pass validation and still generate an SDK full of functions named after method and path, because no operation has an operationId.
The rules
Each finding shows its severity, a message, where it is, and the rule name in brackets.
| Feature | Rule | Severity | Fires when |
|---|---|---|---|
| missing-openapi-version | error | No openapi or swagger field. | |
| missing-info-title | error | info.title is missing. | |
| missing-info-version | error | info.version is missing. | |
| no-paths | error | paths is empty. | |
| duplicate-operation-id | error | Two operations share an operationId. | |
| no-responses | error | An operation has no responses. | |
| missing-info-description | warn | info.description is missing. | |
| missing-operation-id | warn | An operation has no operationId. | |
| missing-summary | warn | An operation has neither summary nor description. | |
| no-success-response | warn | An operation has no 2xx response. | |
| missing-info-contact | info | info.contact is missing. | |
| missing-tags | info | An operation has no tags. | |
| no-error-response | info | An operation has no 4xx response. |
Why these matter
- operationId
- Code generators use it as the function name. Without it they fall back to method and path, and the names change whenever a path does.
- Summary and description
- They are the text people read in the docs. An endpoint without them is a path and nothing else.
- Tags
- Docs renderers group endpoints by tag. Specway uses them for the sidebar. Without tags you get one long list.
- 4xx responses
- They tell clients what an error looks like. Without them, every client learns your error format from production.
Linting in CI
This tool runs a fixed set of rules. For your own rules on every pull request, use Spectral (@stoplight/spectral-cli) with a .spectral.yaml in the repo.
Lint is clean. Ship the docs.
Specway builds reference docs from the spec you just linted. The summaries, descriptions and tags you added are what readers see. Free for one API: create an account.
- A page per endpoint
- Parameters, request body and responses read from the spec, grouped by tag in the sidebar.
- Update now
- Re-reads the spec URL and lists the endpoints that were added, changed and removed. Keep in sync does the same once a day.
- Public changelog
- Every applied sync is written to a changelog on the docs site.
Questions
How is linting different from validating?+
Validation checks that the spec follows the OpenAPI standard. Linting checks things the standard leaves optional but tools and readers need: operationIds, summaries, error responses, tags.
What rules does the linter check?+
Thirteen. At the top level: the openapi or swagger version, info.title, info.version, info.description, info.contact, and a non-empty paths. Per operation: operationId present and unique, a summary or description, tags, at least one response, a 2xx response and a 4xx response.
Why does 'missing operationId' matter?+
SDK generators such as openapi-generator use operationId as the function name. Without it they build a name from the method and path, which is long and changes when the path changes.
Why do I need a 4xx response if my API works?+
It is for the people calling your API. When they get a 400, the documented error response tells them where the message is and what shape the body has.
How do I run lint rules in CI?+
Use Spectral. Install @stoplight/spectral-cli, add a .spectral.yaml with the rules you want, and run it on every pull request. It has many more rules than this tool.
Why are some findings errors and some info?+
Errors break tools: no responses, duplicate operationIds, no version. Warnings hurt the docs: no operationId, no summary, no success response. Info is worth fixing when you can: no contact, no tags, no 4xx response. Work from errors down.
See your docs in a minute
Paste the link to your OpenAPI file. Free for one API, no card needed.