University of Warwick · API Governance Rules

University of Warwick API Rules

Spectral linting rules defining API design standards and conventions for University of Warwick.

9 Rules error 1 warn 6 info 2
View Rules File View on GitHub

Rule Categories

envelope info operation property server

Rules

warn
operation-operationId-exists
Every operation should declare an operationId (100% in this API).
$.paths[*][get,post,put,delete,patch]
warn
operation-operationId-casing
operationId should be camelCase (this API's convention, 15/15).
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-summary-exists
Every operation should declare a summary (100% in this API).
$.paths[*][get,post,put,delete,patch]
warn
operation-tag-exists
Every operation should be tagged (100% in this API).
$.paths[*][get,post,put,delete,patch]
info
property-name-casing
Schema properties should be camelCase (34/34 in this API).
$.components.schemas..properties
info
envelope-declares-success
Every Tabula response schema is wrapped in the success/status envelope. Response schemas should compose it rather than returning a bare payload.
$.components.schemas.Envelope.properties
error
server-is-warwick-operated
Operator guard. Every server URL in this provider's contracts must sit under warwick.ac.uk. A server on a vendor host means the contract belongs in the vendor's own repository, not this institution's — this is the check the June 2026 university cohort did not have.
$.servers[*].url
warn
info-contact-exists
info.contact should name the operating team.
$.info
warn
info-description-exists
info.description should state what the API is and who runs it.
$.info

Spectral Ruleset

Raw ↑
# authorship: generated by API Evangelist tooling. Stamped 2026-08-19.
# An unmarked file is NOT assumed to be ours.
x-generated: '2026-08-19'
x-method: generated
x-source: openapi/university-of-warwick-tabula-openapi.yml
x-operator: institution
# University of Warwick — OpenAPI Spectral ruleset.
#
# IMPORTANT PROVENANCE NOTE: Warwick publishes no OpenAPI of its own. These rules are measured
# from the contract API Evangelist DERIVED from Warwick's published documentation and live
# probes. They encode the conventions Warwick's API actually follows on the wire — they are not
# a Warwick governance standard and must not be represented as one.
#
# Plain Spectral, built-in functions only.
#
# Conventions measured (n=15 operations, 34 schema properties):
#   - operation-operationId-exists   : 15/15
#   - operation-summary-exists       : 15/15
#   - operation-tag-exists           : 15/15
#   - operationId-casing camel       : 15/15
#   - property-name-casing camel     : 34/34
#   - gated ops declare 401          : 8/8 of the credentialed operations
rules:
  operation-operationId-exists:
    description: Every operation should declare an operationId (100% in this API).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy
  operation-operationId-casing:
    description: operationId should be camelCase (this API's convention, 15/15).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].operationId
    then:
      function: casing
      functionOptions:
        type: camel
  operation-summary-exists:
    description: Every operation should declare a summary (100% in this API).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: summary
      function: truthy
  operation-tag-exists:
    description: Every operation should be tagged (100% in this API).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: tags
      function: truthy
  property-name-casing:
    description: Schema properties should be camelCase (34/34 in this API).
    severity: info
    given: $.components.schemas..properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: camel
  envelope-declares-success:
    description: >-
      Every Tabula response schema is wrapped in the success/status envelope. Response schemas
      should compose it rather than returning a bare payload.
    severity: info
    given: $.components.schemas.Envelope.properties
    then:
      field: success
      function: truthy
  server-is-warwick-operated:
    description: >-
      Operator guard. Every server URL in this provider's contracts must sit under
      warwick.ac.uk. A server on a vendor host means the contract belongs in the vendor's own
      repository, not this institution's — this is the check the June 2026 university cohort
      did not have.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: '^https://[a-z0-9.-]*warwick\.ac\.uk'
  info-contact-exists:
    description: info.contact should name the operating team.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy
  info-description-exists:
    description: info.description should state what the API is and who runs it.
    severity: warn
    given: $.info
    then:
      field: description
      function: truthy