Uppsala University · API Governance Rules
Uppsala University API Rules
Spectral linting rules defining API design standards and conventions for Uppsala University.
7 Rules
error 3
warn 4
Rule Categories
ucdp
Rules
warn
ucdp-info-contact
API info should include a contact pointing to the UCDP docs.
$.info
error
ucdp-server-defined
A server URL must be defined (UCDP base is ucdpapi.pcr.uu.se).
$.servers
error
ucdp-version-path-param
Dataset paths are versioned and require a required {version} path parameter.
$.paths[?(@property.match(/\/api\//))].get.parameters[?(@.name == 'version')]
warn
ucdp-pagination-params
Dataset operations should expose pagesize and page query parameters.
$.paths[?(@property.match(/\/api\//))].get
error
ucdp-api-token-security
A header API token security scheme (x-ucdp-access-token) must be declared.
$.components.securitySchemes
warn
ucdp-response-envelope
Successful responses should use a paginated envelope (TotalCount, Result).
$.components.schemas[?(@property.match(/APIResponse$/))].properties
warn
ucdp-json-media-type
Operations should advertise an application/json response.
$.paths[?(@property.match(/\/api\//))].get.responses.200.content