Skip to main content

non-empty-paths-key

Overview

This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:

An empty path key in OpenAPI is discouraged as it may lead to confusion and ambiguity in identifying the targeted resource in the server. Therefore, it is recommended to use non-empty path keys that accurately point to the intended resource in the server. This improves the clarity, readability, and maintainability of the API documentation, and ensures that the server responds appropriately to client requests.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEmpty path key found.
CodeOPENAPI3APIMATIC_L180
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Paths
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting path empty key

Suggested Fixes

  • Ensure that there is no empty path keys.
  • Enusre that path keys point to valid server locations

For More Information