This rule validates an OpenAPI specification against the OpenAPI 3.x JSON schema.
The rationale behind this rule is to enforce the compliance of the API specification with the OpenAPI 3.x standard.
The openapi-json-schema-validation
rule is designed to validate an OpenAPI
specification against the OpenAPI 3.x JSON schema. This ensures that the API
specification is compliant with the OpenAPI 3.x standard.
None.
This rule should be used whenever an OpenAPI schema is being defined.
Good. The following is a minimalistic but valid OpenAPI spec.
openapi: 3.0.0
info:
title: Sample API
version: 1.0.0
paths: {}
Bad. The following schema probably contains a typo. path
should really
be named paths
.
openapi: 3.0.0
info:
title: Sample API
version: 1.0.0
path: {}
We recommend to always enable this rule.
This rule is compatible with all OpenAPI 3.x versions.