extends: spectral:oas rules: aws-backup-operation-summary-title-case: description: All operation summaries must use Title Case message: "Operation summary '{{value}}' must be in Title Case" severity: warn given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^([A-Z][a-z0-9]*(\\s[A-Z][a-z0-9]*)*|[A-Z]+)$" aws-backup-operation-tags: description: All operations must have at least one tag message: Operation must have at least one tag severity: error given: "$.paths[*][*]" then: field: tags function: truthy aws-backup-operation-id: description: All operations must have an operationId message: Operation must have an operationId severity: error given: "$.paths[*][*]" then: field: operationId function: truthy aws-backup-operation-description: description: All operations must have a description message: Operation must have a description severity: warn given: "$.paths[*][*]" then: field: description function: truthy aws-backup-path-param-required: description: All path parameters must be marked as required message: Path parameter must be marked as required severity: error given: "$.paths[*][*].parameters[?(@.in == 'path')]" then: field: required function: truthy aws-backup-error-responses: description: All operations must define at least one error response message: Operation must define 4xx or 5xx error responses severity: warn given: "$.paths[*][*]" then: function: schema functionOptions: schema: type: object properties: responses: type: object minProperties: 2 aws-backup-pagination-next-token: description: List operations should support nextToken pagination message: List operation responses should include a nextToken field severity: info given: "$.paths[*].get.responses.200.content.application/json.schema.properties" then: function: schema functionOptions: schema: oneOf: - required: - NextToken - not: required: - NextToken