CloudAlly · API Governance Rules

CloudAlly API Rules

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

6 Rules error 4 warn 2
View Rules File View on GitHub

Rule Categories

cloudally

Rules

warn
cloudally-info-contact
API info MUST contain a contact email or URL.
$.info
error
cloudally-https-only
All CloudAlly API servers MUST use HTTPS.
$.servers[*].url
error
cloudally-operation-id
Operations MUST have an operationId.
$.paths[*][get,post,put,delete,patch]
warn
cloudally-tag-required
Operations MUST be tagged for resource grouping (Authentication, Partners, Users, Backups, Restore, Billing, Tasks).
$.paths[*][get,post,put,delete,patch].tags
error
cloudally-bearer-auth-required
API MUST define a bearer-token security scheme since CloudAlly authenticates with access tokens issued via /auth or /auth/partner.
$.components.securitySchemes
error
cloudally-server-url
API MUST declare at least one server URL pointing at api.cloudally.com.
$.servers

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  cloudally-info-contact:
    description: API info MUST contain a contact email or URL.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy
  cloudally-https-only:
    description: All CloudAlly API servers MUST use HTTPS.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: '^https://'
  cloudally-operation-id:
    description: Operations MUST have an operationId.
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy
  cloudally-tag-required:
    description: Operations MUST be tagged for resource grouping (Authentication, Partners, Users, Backups, Restore, Billing, Tasks).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].tags
    then:
      function: truthy
  cloudally-bearer-auth-required:
    description: API MUST define a bearer-token security scheme since CloudAlly authenticates with access tokens issued via /auth or /auth/partner.
    severity: error
    given: $.components.securitySchemes
    then:
      function: truthy
  cloudally-server-url:
    description: API MUST declare at least one server URL pointing at api.cloudally.com.
    severity: error
    given: $.servers
    then:
      function: truthy