OpenAPI v3 Standards Linting
Overview
Linting checks performed on provided OpenAPI v3 file to check its conformance to recommended practices defined in the OpenAPI standard document.
Property | Value |
---|---|
Id | openapi-v3-standards-linting |
Code | OPENAPI3STANDARDS_L |
Ruleset Type | Linting |
Default Severity of All Rules | Warning |
Rule System | Semantic |
Tags | openapi3 openapi standards semantic linting |
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/
Categories of Rules
- OpenAPI Root Information (OPENAPI3STANDARDS_L001 - OPENAPI3STANDARDS_L009)
- Server Variables (OPENAPI3STANDARDS_L010 - OPENAPI3STANDARDS_L019)
- Paths (OPENAPI3STANDARDS_L020 - OPENAPI3STANDARDS_L029)
- Path Items (OPENAPI3STANDARDS_L030 - OPENAPI3STANDARDS_L039)
- Operations (OPENAPI3STANDARDS_L040 - OPENAPI3STANDARDS_L059)
- Parameters (OPENAPI3STANDARDS_L060 - OPENAPI3STANDARDS_L079)
- Media Types (OPENAPI3STANDARDS_L080 - OPENAPI3STANDARDS_L089)
- Encoding (OPENAPI3STANDARDS_L090 - OPENAPI3STANDARDS_L099)
- Responses (OPENAPI3STANDARDS_L100 - OPENAPI3STANDARDS_L119)
- Examples (OPENAPI3STANDARDS_L120 - OPENAPI3STANDARDS_L129)
- Headers (OPENAPI3STANDARDS_L130 - OPENAPI3STANDARDS_L139)
- References (OPENAPI3STANDARDS_L140 - OPENAPI3STANDARDS_L149)
- Schemas (OPENAPI3STANDARDS_L150 - OPENAPI3STANDARDS_L249)
- Discriminators (OPENAPI3STANDARDS_L250 - OPENAPI3STANDARDS_L259)
- XML (OPENAPI3STANDARDS_L260 - OPENAPI3STANDARDS_L269)
- Security Schemes (OPENAPI3STANDARDS_L270 - OPENAPI3STANDARDS_L279)
OpenAPI Root Information Rules
Server Variables Rules
- at-least-one-item-in-server-variable-enum-list (OPENAPI3STANDARDS_L010)
- valid-server-variable-default-value-for-enum (OPENAPI3STANDARDS_L011)
Paths Rules
Path Items Rules
Operations Rules
- operation-parameter-redefines-path-object-parameter (OPENAPI3STANDARDS_L040)
- operation-security-overrides-root-security (OPENAPI3STANDARDS_L041)
- operation-servers-redefine-root-and-path-servers (OPENAPI3STANDARDS_L042)
- get-operation-cannot-have-request-body (OPENAPI3STANDARDS_L043)
- delete-operation-cannot-have-request-body (OPENAPI3STANDARDS_L044)
- head-operation-cannot-have-request-body (OPENAPI3STANDARDS_L045)
Parameters Rules
- unique-case-insensitive-header-parameter-names (OPENAPI3STANDARDS_L060)
- no-allow-empty-value-usage (OPENAPI3STANDARDS_L061)
- allow-empty-value-only-for-query-parameter (OPENAPI3STANDARDS_L062)
- parameter-explode-only-for-array-or-object-types (OPENAPI3STANDARDS_L063)
- allow-reserved-only-for-query-parameter (OPENAPI3STANDARDS_L064)
- valid-parameter-example (OPENAPI3STANDARDS_L065)
Media Types Rules
- valid-media-type-example (OPENAPI3STANDARDS_L080)
- multipart-property-content-media-type-only-with-content-encoding (OPENAPI3STANDARDS_L081)
Encoding Rules
Responses Rules
- response-code-overrides-response-range (OPENAPI3STANDARDS_L100)
- at-least-one-success-response-exists (OPENAPI3STANDARDS_L101)
- unique-case-insensitive-response-header-names (OPENAPI3STANDARDS_L102)
Examples Rules
Headers Rules
- no-allow-empty-value-in-header (OPENAPI3STANDARDS_L130)
- header-explode-only-for-array-or-object-types (OPENAPI3STANDARDS_L131)
- no-allow-reserved-in-header (OPENAPI3STANDARDS_L132)
- valid-header-example (OPENAPI3STANDARDS_L133)
References Rules
- resolvable-reference (OPENAPI3STANDARDS_L140)
- reference-object-summary-overrides-referenced-object-summary (OPENAPI3STANDARDS_L141)
- referenced-object-allows-summary-override (OPENAPI3STANDARDS_L142)
- reference-object-description-overrides-referenced-object-description (OPENAPI3STANDARDS_L143)
- referenced-object-allows-description-override (OPENAPI3STANDARDS_L144)
Schemas Rules
- at-least-one-item-in-schema-enum-list (OPENAPI3STANDARDS_L150)
- unique-schema-enum-list-items (OPENAPI3STANDARDS_L151)
- valid-schema-example (OPENAPI3STANDARDS_L152)
- read-only-for-properties-schema-only (OPENAPI3STANDARDS_L153)
- write-only-for-properties-schema-only (OPENAPI3STANDARDS_L154)
- no-schema-xml-in-root-schema (OPENAPI3STANDARDS_L155)
- required-dollar-id-in-root-schema (OPENAPI3STANDARDS_L156)
- dollar-schema-overrides-default-oas-schema-dialect (OPENAPI3STANDARDS_L157)
- schema-prefix-items-only-for-arrays (OPENAPI3STANDARDS_L158)
- schema-items-only-for-arrays (OPENAPI3STANDARDS_L159)
- schema-unevaluated-items-only-for-arrays (OPENAPI3STANDARDS_L160)
- schema-max-items-only-for-arrays (OPENAPI3STANDARDS_L161)
- schema-min-items-only-for-arrays (OPENAPI3STANDARDS_L162)
- schema-unique-items-only-for-arrays (OPENAPI3STANDARDS_L163)
- schema-contains-only-for-arrays (OPENAPI3STANDARDS_L164)
- schema-max-contains-only-for-arrays (OPENAPI3STANDARDS_L165)
- schema-contains-exists-for-max-contains (OPENAPI3STANDARDS_L166)
- schema-min-contains-only-for-arrays (OPENAPI3STANDARDS_L167)
- schema-contains-exists-for-min-contains (OPENAPI3STANDARDS_L168)
- schema-properties-only-for-objects (OPENAPI3STANDARDS_L169)
- schema-pattern-properties-only-for-objects (OPENAPI3STANDARDS_L170)
- schema-additional-properties-only-for-objects (OPENAPI3STANDARDS_L171)
- schema-property-names-only-for-objects (OPENAPI3STANDARDS_L172)
- schema-unevaluated-properties-only-for-objects (OPENAPI3STANDARDS_L173)
- schema-max-properties-only-for-objects (OPENAPI3STANDARDS_L174)
- schema-min-properties-only-for-objects (OPENAPI3STANDARDS_L175)
- schema-required-only-for-objects (OPENAPI3STANDARDS_L176)
- schema-dependent-required-only-for-objects (OPENAPI3STANDARDS_L177)
- schema-multiple-of-only-for-numbers (OPENAPI3STANDARDS_L178)
- schema-maximum-only-for-numbers (OPENAPI3STANDARDS_L179)
- schema-exclusive-maximum-only-for-numbers (OPENAPI3STANDARDS_L180)
- schema-minimum-only-for-numbers (OPENAPI3STANDARDS_L181)
- schema-exclusive-minimum-only-for-numbers (OPENAPI3STANDARDS_L182)
- schema-max-length-only-for-strings (OPENAPI3STANDARDS_L183)
- schema-min-length-only-for-strings (OPENAPI3STANDARDS_L184)
- schema-pattern-only-for-strings (OPENAPI3STANDARDS_L185)
- schema-content-encoding-only-for-strings (OPENAPI3STANDARDS_L186)
- schema-content-media-type-only-for-strings (OPENAPI3STANDARDS_L187)
- schema-content-schema-only-for-strings (OPENAPI3STANDARDS_L188)
- schema-content-media-type-exists-for-content-schema (OPENAPI3STANDARDS_L189)
- valid-schema-default-value (OPENAPI3STANDARDS_L190)
- valid-schema-examples (OPENAPI3STANDARDS_L191)
- no-schema-example-usage (OPENAPI3STANDARDS_L192)
Discriminators Rules
XML Rules
- required-xml-name-for-arrays (OPENAPI3STANDARDS_L260)
- array-level-xml-name-for-wrapped-schemas-only (OPENAPI3STANDARDS_L261)
- xml-wrapped-only-for-arrays (OPENAPI3STANDARDS_L262)