extends: ["spectral:oas"] documentationUrl: https://docs.cribl.io/cribl-as-code/api/ rules: cribl-as-code-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-as-code-server-gateway: description: Server URL should reference gateway.cribl.cloud. given: "$.servers[*].url" severity: warn then: function: pattern functionOptions: match: "gateway\\.cribl\\.cloud" cribl-as-code-bearer-auth: description: API must declare bearerAuth security scheme. given: "$.components.securitySchemes" severity: error then: field: bearerAuth function: truthy cribl-as-code-config-paths: description: As Code API must define export and import configuration paths. given: "$.paths" severity: error then: function: schema functionOptions: schema: type: object required: - /export - /import cribl-as-code-operation-id: description: All operations must define an operationId. given: "$.paths.*.*" severity: error then: field: operationId function: truthy cribl-as-code-tags: description: All operations must define tags. given: "$.paths.*.*" severity: error then: field: tags function: truthy