University of Auckland · API Governance Rules
University of Auckland API Rules
Spectral linting rules defining API design standards and conventions for University of Auckland.
15 Rules
error 6
warn 9
Rule Categories
uoa
Rules
error
uoa-info-title-present
Every University of Auckland API must declare info.title.
$.info
error
uoa-info-version-present
Every University of Auckland API must declare info.version.
$.info
warn
uoa-info-contact-present
Both published University documents name a contact (Student Recruitment). Keep it — it is the only support channel a caller has before registering in the portal.
$.info
warn
uoa-info-contact-email-institutional
info.contact.email should be an auckland.ac.nz address.
$.info.contact
error
uoa-server-scheme
servers[].url must begin with https:// — the published Course Catalog Api V3 document says "httpss://apis.auckland.ac.nz/courses/v3", which no client can resolve.
$.servers[*].url
error
uoa-server-institution-host
servers[].url must be under an auckland.ac.nz host. A server on a vendor host means the contract is the vendor's, not the University's.
$.servers[*].url
error
uoa-operation-id-present
Every operation must carry an operationId.
$.paths[*][get,put,post,delete,patch]
warn
uoa-operation-id-camel-case
operationIds are camelCase across both documents (classesGet, coursesGetBySubject).
$.paths[*][get,put,post,delete,patch].operationId
warn
uoa-operation-description-present
Every operation carries a description in both published documents. Keep it.
$.paths[*][get,put,post,delete,patch]
warn
uoa-operation-summary-present
Only 1 of 13 published operations carries a summary. A summary is what a catalogue, an SDK generator and an agent read first.
$.paths[*][get,put,post,delete,patch]
warn
uoa-response-media-type-json
Both documents declare "*/*" as the response media type. Declare application/json — the gateway returns JSON and "*/*" tells a generated client nothing.
$.paths[*][get,put,post,delete,patch].responses[*].content
warn
uoa-security-scheme-declared
The gateway returns 401 on every route, so a security requirement belongs in the contract. Neither document declares a root-level `security`.
$
error
uoa-api-key-scheme-complete
An apiKey security scheme must state `name` and `in`. Both published documents declare components.securitySchemes.apikey with neither.
$.components.securitySchemes[?(@.type=='apiKey')]
warn
uoa-error-response-not-success-schema
A 4xx/5xx response must not reuse the success schema. Classes Api V2 returns ClassesList for 200, 400 and 500 alike, so a client cannot tell them apart.
$.paths[*][get,put,post,delete,patch].responses[?(@property.match(/^[45]/))].content[*]
warn
uoa-tag-declared-at-root
Tags used by operations must be declared in the root tags[]. Classes Api V2 tags its only operation "classes" while root tags[] declares only "api".
$.tags[*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.