extends: - spectral:oas rules: chat-https-only: description: Chat APIs must use HTTPS. severity: error given: $.servers[*].url then: function: pattern functionOptions: match: '^https://' chat-info-contact: description: Definitions must declare contact information. severity: error given: $.info then: field: contact function: truthy chat-pagination-cursor: description: List endpoints should support cursor-based pagination via cursor and limit query parameters. severity: warn given: $.paths[?(@property.match(/conversations$|messages$/))].get.parameters then: function: truthy chat-message-content-type: description: Messages should declare a contentType enumeration. severity: warn given: $.components.schemas.Message.properties.contentType then: field: enum function: truthy chat-operation-tags: description: Operations must declare at least one tag. severity: warn given: $.paths[*][get,post,put,delete,patch] then: field: tags function: truthy