University of Illinois Urbana-Champaign · API Governance Rules

University of Illinois Urbana-Champaign API Rules

Spectral linting rules defining API design standards and conventions for University of Illinois Urbana-Champaign.

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

Rule Categories

uiuc

Rules

error
uiuc-info-title
API must declare an info.title.
$.info
error
uiuc-info-version
API must declare an info.version (Rokwire building blocks are semver-tagged).
$.info
warn
uiuc-server-rokwire-host
Servers should point at the api.rokwire.illinois.edu host as observed in the Rokwire specs.
$.servers[*].url
warn
uiuc-operation-tags
Every operation should carry at least one tag (Services, Admin, BBs, TPS, System, Client).
$.paths[*][get,post,put,delete,patch]
warn
uiuc-operation-summary
Operations should provide a human-readable summary.
$.paths[*][get,post,put,delete,patch]
warn
uiuc-schema-object-type
Component schemas should declare a type.
$.components.schemas[*]

Spectral Ruleset

Raw ↑
formats:
  - oas3
rules:
  uiuc-info-title:
    description: API must declare an info.title.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  uiuc-info-version:
    description: API must declare an info.version (Rokwire building blocks are semver-tagged).
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  uiuc-server-rokwire-host:
    description: Servers should point at the api.rokwire.illinois.edu host as observed in the Rokwire specs.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://api\\.rokwire\\.illinois\\.edu/"
  uiuc-operation-tags:
    description: Every operation should carry at least one tag (Services, Admin, BBs, TPS, System, Client).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: tags
      function: truthy
  uiuc-operation-summary:
    description: Operations should provide a human-readable summary.
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: summary
      function: truthy
  uiuc-schema-object-type:
    description: Component schemas should declare a type.
    severity: warn
    given: $.components.schemas[*]
    then:
      field: type
      function: truthy