SeatGeek · API Governance Rules

SeatGeek API Rules

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

8 Rules error 2 warn 4 info 2
View Rules File View on GitHub

Rule Categories

seatgeek

Rules

warn
seatgeek-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
error
seatgeek-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
seatgeek-summaries-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
warn
seatgeek-pagination-parameters
Collection endpoints should support per_page and page parameters
$.paths[*][get]
info
seatgeek-get-only-read-api
Platform API is read-only and should only use GET methods
$.paths[*]
info
seatgeek-response-meta
Collection responses should include meta pagination object
$.paths[*][get].responses['200'].content['application/json'].schema.properties
error
seatgeek-client-id-security
All endpoints require client_id authentication
$.paths[*][*]
warn
seatgeek-path-plural-nouns
Collection paths should use plural nouns
$.paths

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  seatgeek-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]*$"

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

  seatgeek-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]*)*$"

  seatgeek-pagination-parameters:
    description: Collection endpoints should support per_page and page parameters
    severity: warn
    given: "$.paths[*][get]"
    then:
      field: parameters
      function: truthy

  seatgeek-get-only-read-api:
    description: Platform API is read-only and should only use GET methods
    severity: info
    given: "$.paths[*]"
    then:
      function: pattern
      functionOptions:
        notMatch: "^(post|put|patch|delete)$"

  seatgeek-response-meta:
    description: Collection responses should include meta pagination object
    severity: info
    given: "$.paths[*][get].responses['200'].content['application/json'].schema.properties"
    then:
      field: meta
      function: truthy

  seatgeek-client-id-security:
    description: All endpoints require client_id authentication
    severity: error
    given: "$.paths[*][*]"
    then:
      field: security
      function: truthy

  seatgeek-path-plural-nouns:
    description: Collection paths should use plural nouns
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^/(events|performers|venues|taxonomies|recommendations)"