University of Macau · API Governance Rules
University of Macau API Rules
Spectral linting rules defining API design standards and conventions for University of Macau.
15 Rules
error 6
warn 9
Rule Categories
api
documents
info
operation
parameter
path
query
read
success
Rules
warn
read-only-surface
Every operation on this platform is a GET. A non-GET operation would be a change in kind for an open-data publication surface and should be deliberate.
$.paths[*]
error
operation-has-tag
Every operation must carry at least one tag naming its data set.
$.paths[*][get]
error
operation-has-operation-id
Every operation must declare an operationId.
$.paths[*][get]
warn
operation-id-snake-case
operationId follows this API's snake_case convention.
$.paths[*][get].operationId
warn
operation-has-description
Every operation must describe what the data set contains.
$.paths[*][get]
warn
path-segment-snake-case
Path segments use lower snake_case (service/facilities/car_park_availability/all).
$.paths
warn
query-param-snake-case
Query parameter names use lower snake_case (date_from, course_code, sort_by). Path template parameters inherited from the gateway are camelCase and are deliberately out of scope.
$.paths[*][get].parameters[?(@.in == 'query')].name
warn
parameter-has-description
Every declared parameter should say what it filters or controls.
$.paths[*][get].parameters[?(@.name)]
error
documents-401
Every operation is subscription-key protected and must document the 401 the gateway returns without one.
$.paths[*][get].responses
warn
documents-403-quota
Every operation must document the 403 quota-exhaustion response.
$.paths[*][get].responses
warn
documents-429-rate-limit
Every operation must document the 429 rate-limit response.
$.paths[*][get].responses
error
success-returns-json
A 200 must declare an application/json body.
$.paths[*][get].responses.200.content
error
api-key-scheme-declared
The Authorization header subscription key must be declared as a security scheme, not left implicit in prose.
$.components.securitySchemes
error
info-has-contact
The publishing office must be reachable from the contract.
$.info
warn
info-has-terms-of-service
Use of this data is governed by published terms; the contract must point at them.
$.info
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.