extends: ["spectral:oas"] documentationUrl: https://docs.cribl.io/api-reference/ rules: cribl-cloud-info-contact: description: API info object should reference Cribl support contact. given: "$.info.contact" severity: error then: field: url function: pattern functionOptions: match: "cribl" cribl-cloud-server-cribl-cloud: description: Server URL should reference cribl.cloud workspace pattern or on-prem deployment. given: "$.servers[*].url" severity: warn then: function: pattern functionOptions: match: "(cribl\\.cloud|api/v1)" cribl-cloud-bearer-auth: description: API must declare bearerAuth security scheme for Bearer tokens. given: "$.components.securitySchemes" severity: error then: field: bearerAuth function: truthy cribl-cloud-required-paths: description: Cloud API must define authentication, health, and core resource paths. given: "$.paths" severity: error then: function: schema functionOptions: schema: type: object required: - /auth/login - /health - /system/sources cribl-cloud-operation-id: description: All operations must define an operationId. given: "$.paths.*.*" severity: error then: field: operationId function: truthy cribl-cloud-tags: description: All operations must define tags. given: "$.paths.*.*" severity: error then: field: tags function: truthy