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-search-info-title
API title must mention Search Service.
$.info.title
warn
couchbase-search-default-server
Servers must reference port 8094 by default.
$.servers[*].url
error
couchbase-search-operation-id
Every operation must define an operationId.
$.paths.*.*
error
couchbase-search-operation-tags
Every operation must define at least one tag.
$.paths.*.*

Spectral Ruleset

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