Skip to main content

at-least-one-path-item-operation

Overview

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

Each path defined in an OpenAPI specification must include one or more operation objects. An operation object defines an API operation, such as GET, POST, PUT, DELETE, etc., and contains information such as the request and response schema, parameters, and security requirements.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEach path must include at least one operation object.
CodeOPENAPI3CODEGEN_L170
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Path Items
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagscode generation sdks openapi3 openapi semantic linting apimatic path operation

Suggested Fixes

  • Review the OpenAPI specification and ensure that defined path includes at least one operation object.
  • If any path is missing an operation object, add at least one operation object to the path with the appropriate HTTP method and other relevant properties.
  • Ensure that each new operation object is well-defined and follows the OpenAPI specification conventions, including the use of parameters, responses, and other relevant properties.

For More Information