University of St Andrews · API Governance Rules
University of St Andrews API Rules
Spectral linting rules defining API design standards and conventions for University of St Andrews.
7 Rules
error 2
warn 5
Rule Categories
staandrews
Rules
warn
staandrews-info-contact
API info object should include contact details.
$.info
error
staandrews-server-https
Servers must use HTTPS.
$.servers[*].url
error
staandrews-operation-id
Every operation must declare an operationId.
$.paths[*][get,post,put,delete,patch]
warn
staandrews-snake-case-properties
Response property names follow snake_case, as used across the Sorry status platform.
$.components.schemas[*].properties[*]~
warn
staandrews-timestamps-date-time
created_at and updated_at properties should use date-time format.
$.components.schemas[*].properties[?(@property === 'created_at' || @property === 'updated_at')]
warn
staandrews-collection-meta
Collection responses should expose pagination meta (count, total_count, next_page).
$.components.schemas[?(@property === 'ComponentsResponse' || @property === 'NoticesResponse')].properties
warn
staandrews-state-enum
Component and page state must be constrained to the platform's known values.
$.components.schemas[?(@property === 'Page' || @property === 'Component')].properties.state