Couchbase · API Governance Rules

Couchbase API Rules

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

4 Rules error 3 warn 1
View Rules File View on GitHub

Rule Categories

couchbase

Rules

error
couchbase-query-info-title
API title must mention Query Service.
$.info.title
warn
couchbase-query-default-server
Servers must reference port 8093 by default.
$.servers[*].url
error
couchbase-query-operation-id
Every operation must define an operationId.
$.paths.*.*
error
couchbase-query-operation-tags
Every operation must define at least one tag.
$.paths.*.*

Spectral Ruleset

Raw ↑
extends: ["spectral:oas"]
documentationUrl: https://docs.couchbase.com/server/current/n1ql/n1ql-rest-api/index.html
rules:
  couchbase-query-info-title:
    description: API title must mention Query Service.
    given: "$.info.title"
    severity: error
    then:
      function: pattern
      functionOptions:
        match: "Query"
  couchbase-query-default-server:
    description: Servers must reference port 8093 by default.
    given: "$.servers[*].url"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "8093"
  couchbase-query-operation-id:
    description: Every operation must define an operationId.
    given: "$.paths.*.*"
    severity: error
    then:
      field: operationId
      function: truthy
  couchbase-query-operation-tags:
    description: Every operation must define at least one tag.
    given: "$.paths.*.*"
    severity: error
    then:
      field: tags
      function: truthy