Seamless.AI · API Governance Rules

Seamless.AI API Rules

Spectral linting rules defining API design standards and conventions for Seamless.AI.

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

Rule Categories

seamless

Rules

warn
seamless-ai-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
error
seamless-ai-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
seamless-ai-summaries-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
info
seamless-ai-rate-limit-docs
API operations should document rate limiting behavior in description
$.paths[*][post]
error
seamless-ai-request-body-required
POST endpoints must have a requestBody defined
$.paths[*][post]
warn
seamless-ai-response-200-schema
Successful responses must define a schema
$.paths[*][*].responses['200'].content['application/json']
error
seamless-ai-security-defined
All operations should have security defined
$.paths[*][*]
warn
seamless-ai-api-versioned-paths
API paths should include version prefix (/v1/)
$.paths

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  seamless-ai-operation-ids-camel-case:
    description: Operation IDs must use camelCase
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  seamless-ai-tags-required:
    description: All operations must have at least one tag
    severity: error
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  seamless-ai-summaries-title-case:
    description: Operation summaries must use Title Case
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9]*(\\s[A-Z][a-zA-Z0-9]*)*$"

  seamless-ai-rate-limit-docs:
    description: API operations should document rate limiting behavior in description
    severity: info
    given: "$.paths[*][post]"
    then:
      field: description
      function: truthy

  seamless-ai-request-body-required:
    description: POST endpoints must have a requestBody defined
    severity: error
    given: "$.paths[*][post]"
    then:
      field: requestBody
      function: truthy

  seamless-ai-response-200-schema:
    description: Successful responses must define a schema
    severity: warn
    given: "$.paths[*][*].responses['200'].content['application/json']"
    then:
      field: schema
      function: truthy

  seamless-ai-security-defined:
    description: All operations should have security defined
    severity: error
    given: "$.paths[*][*]"
    then:
      field: security
      function: truthy

  seamless-ai-api-versioned-paths:
    description: API paths should include version prefix (/v1/)
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^/v[0-9]+/"