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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Each path must include at least one operation object. |
Code | OPENAPI3CODEGEN_L170 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Path Items |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | code 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.