Australian National University · API Governance Rules
Australian National University API Rules
Spectral linting rules defining API design standards and conventions for Australian National University.
13 Rules
error 10
warn 3
Rule Categories
anu
Rules
error
anu-info-operator-declared
Every contract in a university repository must declare who operates the thing it describes. A university is a federation of buyers; without x-operator an artifact is silently credited to the institution.
$.info
error
anu-info-operator-is-institution
Only institution-operated surfaces belong in this repository as saved contracts. A tenant relationship is recorded in apis.yml, not saved as a spec here.
$.info.x-operator
error
anu-server-under-anu-domain
Every server URL must sit under anu.edu.au. A host outside it is a vendor's, and a vendor's contract does not belong in this repository.
$.servers[*].url
error
anu-provenance-declared
ANU publishes no OpenAPI. Every document here is derived or probed by API Evangelist and must say so, or it reads as something ANU published.
$.info.x-provenance
error
anu-ambiguous-200-documented
Two of ANU's three surfaces return HTTP 200 for failures — the legacy QRNG endpoint returns a plain-text rate-limit refusal, and OAI-PMH returns protocol errors inside a 200 envelope. Any operation on those surfaces must document the 200 response so a client is warned not to trust the status code.
$.paths[*][get,post,put,patch,delete].responses
warn
anu-response-has-content-type
Because status is not a reliable success signal on ANU surfaces, Content-Type is the discriminator. Every documented response must declare its content.
$.paths[*][get,post,put,patch,delete].responses[?(@property != '204')]
error
anu-operation-id-required
Every operation needs a stable operationId for client generation.
$.paths[*][get,post,put,patch,delete]
error
anu-operation-tagged
Every operation must carry at least one tag so the surface can be split and navigated.
$.paths[*][get,post,put,patch,delete].tags
warn
anu-parameter-described
ANU's parameters carry hard numeric bounds (length 1-1024, size 1-10) that are only discoverable from prose today. Every parameter must be described.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
anu-parameter-bounded
Numeric parameters on ANU surfaces are range-limited by the service. Declare the schema so the bound is machine-readable rather than documented in a sentence.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
anu-deprecated-needs-successor
The legacy QRNG endpoint is deprecated with no sunset date. Any operation marked deprecated must at minimum describe what replaces it.
$.paths[*][get,post,put,patch,delete][?(@.deprecated == true)]
error
anu-contact-is-institutional
info.contact must resolve to an anu.edu.au address. A vendor contact address is the clearest single signal that a contract has been misattributed to the institution.
$.info.contact
warn
anu-security-declared-or-explicitly-open
ANU has one keyed surface and two open ones. Both cases must be explicit — an absent security block is indistinguishable from an undocumented one.
$.paths[*][get,post,put,patch,delete]