Cribl · API Governance Rules

Cribl API Rules

Spectral linting rules defining API design standards and conventions for Cribl.

5 Rules error 5
View Rules File View on GitHub

Rule Categories

cribl

Rules

error
cribl-lake-info-contact
API info object should reference Cribl support contact.
$.info.contact
error
cribl-lake-bearer-auth
API must declare bearerAuth security scheme.
$.components.securitySchemes
error
cribl-lake-dataset-paths
Lake API must define dataset management paths.
$.paths
error
cribl-lake-operation-id
All operations must define an operationId.
$.paths.*.*
error
cribl-lake-tags
All operations must define tags.
$.paths.*.*

Spectral Ruleset

Raw ↑
extends: ["spectral:oas"]
documentationUrl: https://docs.cribl.io/lake/
rules:
  cribl-lake-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-lake-bearer-auth:
    description: API must declare bearerAuth security scheme.
    given: "$.components.securitySchemes"
    severity: error
    then:
      field: bearerAuth
      function: truthy
  cribl-lake-dataset-paths:
    description: Lake API must define dataset management paths.
    given: "$.paths"
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - /lake/datasets
  cribl-lake-operation-id:
    description: All operations must define an operationId.
    given: "$.paths.*.*"
    severity: error
    then:
      field: operationId
      function: truthy
  cribl-lake-tags:
    description: All operations must define tags.
    given: "$.paths.*.*"
    severity: error
    then:
      field: tags
      function: truthy