Bringg · API Governance Rules

Bringg API Rules

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

5 Rules error 2 warn 3
View Rules File View on GitHub

Rule Categories

bringg

Rules

error
bringg-operation-summary-required
Every operation must have a summary in Title Case.
$.paths.*[get,post,put,patch,delete]
warn
bringg-operation-id-camelcase
operationId must be camelCase.
$.paths.*[get,post,put,patch,delete].operationId
error
bringg-oauth-required
All operations must be secured with OAuth 2.0 Client Credentials.
$
warn
bringg-region-server
At least one region-specific Bringg server URL must be declared.
$.servers
warn
bringg-info-contact
info.contact must be present with developer support URL.
$.info

Spectral Ruleset

Raw ↑
extends:
- spectral:oas
rules:
  bringg-operation-summary-required:
    description: Every operation must have a summary in Title Case.
    severity: error
    given: $.paths.*[get,post,put,patch,delete]
    then:
    - field: summary
      function: truthy
  bringg-operation-id-camelcase:
    description: operationId must be camelCase.
    severity: warn
    given: $.paths.*[get,post,put,patch,delete].operationId
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-zA-Z0-9]*$'
  bringg-oauth-required:
    description: All operations must be secured with OAuth 2.0 Client Credentials.
    severity: error
    given: $
    then:
    - field: security
      function: truthy
  bringg-region-server:
    description: At least one region-specific Bringg server URL must be declared.
    severity: warn
    given: $.servers
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          minItems: 1
  bringg-info-contact:
    description: info.contact must be present with developer support URL.
    severity: warn
    given: $.info
    then:
    - field: contact
      function: truthy