University of Helsinki · API Governance Rules
University of Helsinki — openapi rules
Spectral linting rules defining API design standards and conventions for University of Helsinki.
13 Rules
error 5
warn 8
Derived by API Evangelist
Measured from the API contracts University of Helsinki publishes — the conventions those documents already follow, written down as rules. University of Helsinki did not publish this file.
Rule Categories
api
info
no
oauth2
operation
path
security
server
Rules
error
server-url-absolute
Every server URL must be absolute. All thirteen University of Helsinki specs already do this, which is why none of them fell into the audit's `hostless` class — a relative or missing servers block is exactly how a vendor's contract passes as an institution's.
$.servers[*].url
error
server-on-institution-host
Server URLs must resolve to a host the University of Helsinki operates — gw.api.helsinki.fi for the gateway estate, api.laji.fi for the Finnish Museum of Natural History. A spec whose server points anywhere else does not belong in this repository.
$.servers[*].url
warn
operation-summary
Every operation should carry a summary. Met at 93%.
$.paths[*][get,put,post,delete,patch]
warn
operation-tags
Every operation should be tagged. Met at 91%.
$.paths[*][get,put,post,delete,patch]
warn
operation-operation-id
Every operation should carry an operationId. Met at 73%; the gap is concentrated in the older gateway APIs.
$.paths[*][get,put,post,delete,patch]
warn
operation-description
Every operation should carry a description as well as a summary. Met at only 25% — the largest single documentation gap in the estate, and the cheapest to close.
$.paths[*][get,put,post,delete,patch]
warn
info-description
Every spec should describe itself. Met by 5 of 13.
$.info
warn
info-contact
Every spec should name a contact. Met by 4 of 13, and where it is present the convention is a functional group address at helsinki.fi (tike-integraatiopalvelu@, grp-nxstage-devs@) rather than a named individual — that is the right convention and should be the rule.
$.info
error
security-scheme-declared
Every spec must declare at least one security scheme. The gateway has keyless access disabled, so a spec with no scheme cannot be called as written — two currently are in that state (Dawa Sync, Sovellussalkku).
$.components
warn
api-key-header-canonical
The gateway's own configuration names `X-Api-Key` as the credential header. Specs should use that exact spelling; one currently declares `X-API-Key`.
$.components.securitySchemes[?(@.type=='apiKey' && @.in=='header')].name
error
oauth2-flows-declared
An oauth2 security scheme must declare its flows. The one oauth2 scheme in the estate declares none and links a third-party CRM vendor's documentation, which is boilerplate that escaped into a published contract.
$.components.securitySchemes[?(@.type=='oauth2')]
warn
path-segment-lowercase
Path segments should be lowercase or kebab-case, the estate's dominant convention (466 of 541 segments).
$.paths
error
no-server-variables-unset
Server variables must carry a default so the URL is resolvable without out-of-band knowledge.
$.servers[*].variables[*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.