University of Hong Kong · API Governance Rules
University of Hong Kong API Rules
Spectral linting rules defining API design standards and conventions for University of Hong Kong.
11 Rules
error 6
warn 5
Rule Categories
hku
Rules
error
hku-info-title
The document must carry a title.
$.info
warn
hku-info-description-length
The description must explain what the surface is and who operates it.
$.info
error
hku-operator-declared
Every HKU document must declare x-operator, because attribution is the whole point of the university profile.
$
error
hku-provenance-block
Every derived document must carry x-provenance with a method.
$.x-provenance
error
hku-servers-institution-host
Servers must be on an hku.hk host; anything else belongs in a tenant record, not here.
$.servers[*].url
error
hku-operation-id
Every operation needs an operationId.
$.paths[*][get,post,put,patch,delete]
warn
hku-operation-probe
Every operation must record the status code actually observed when probed.
$.paths[*][get,post,put,patch,delete]
warn
hku-probe-status
A probe record must carry a numeric status.
$.paths[*][*].x-probe
warn
hku-operation-tags
Every operation must be tagged so the document can be split cleanly.
$.paths[*][get,post,put,patch,delete]
warn
hku-security-schemes-defined
Security schemes must be declared.
$.components
error
hku-no-vendor-servers
A vendor host must never appear as a server on an institution document.
$.servers[*].url