rules: info-title-prefix: description: API title must start with "Amazon" or "AWS" severity: warn given: "$.info.title" then: function: pattern functionOptions: match: "^(Amazon|AWS) " info-description-required: description: Info must have description severity: error given: "$.info" then: field: description function: truthy info-version-required: description: Info must have version severity: error given: "$.info" then: field: version function: truthy openapi-version: description: Must use OpenAPI 3.x severity: error given: "$" then: field: openapi function: pattern functionOptions: match: "^3\\." servers-required: description: Servers must be defined severity: error given: "$" then: field: servers function: truthy operation-summary-required: description: Every operation must have a summary severity: error given: "$.paths[*][get,post,put,delete,patch]" then: field: summary function: truthy operation-summary-amazon-prefix: description: Summary must start with "Amazon" or "AWS" severity: warn given: "$.paths[*][get,post,put,delete,patch].summary" then: function: pattern functionOptions: match: "^(Amazon|AWS) " operation-id-required: description: Every operation must have operationId severity: error given: "$.paths[*][get,post,put,delete,patch]" then: field: operationId function: truthy operation-id-pascal-case: description: OperationId must use PascalCase severity: warn given: "$.paths[*][get,post,put,delete,patch].operationId" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9]+$" operation-tags-required: description: Operations must have tags severity: warn given: "$.paths[*][get,post,put,delete,patch]" then: field: tags function: truthy response-success-required: description: Operations must have 2xx response severity: error given: "$.paths[*][get,post,put,delete,patch].responses" then: function: schema functionOptions: schema: type: object anyOf: - required: ["200"] - required: ["201"] - required: ["204"] response-description-required: description: Responses must have descriptions severity: error given: "$.paths[*][get,post,put,delete,patch].responses[*]" then: field: description function: truthy security-schemes-defined: description: Security schemes must be defined severity: error given: "$" then: field: "components.securitySchemes" function: truthy get-no-request-body: description: GET must not have request body severity: error given: "$.paths[*].get" then: field: requestBody function: falsy paths-kebab-case: description: Path segments should use kebab-case severity: info given: "$.paths" then: function: pattern functionOptions: match: "^(/[a-z0-9{}-]+)+$" tags-title-case: description: Tags should use Title Case severity: warn given: "$.tags[*].name" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9 ]+$" no-empty-descriptions: description: Descriptions must not be empty severity: error given: "$..description" then: function: pattern functionOptions: match: ".+" schema-description-on-objects: description: Object schemas should have descriptions severity: info given: "$.components.schemas[?(@.type == 'object')]" then: field: description function: truthy