University of York · API Governance Rules

University of York API Rules

Spectral linting rules defining API design standards and conventions for University of York.

14 Rules error 9 warn 5
View Rules File View on GitHub

Rule Categories

error info keyless operation operator provenance servers

Rules

error
info-title-present
API must declare a title.
$.info
error
info-version-present
API must declare a version.
$.info
error
info-description-present
API must carry a description. For an institution with no developer portal, the contract is the only documentation that exists.
$.info
error
operator-declared
Every contract in a university repository must declare x-operator, so an institution is never silently credited with a vendor's engineering.
$.info
error
provenance-declared
Every contract must declare how it was obtained (x-provenance.method).
$.info
error
servers-absolute
servers[].url must be absolute. A relative or missing server is how vendor contracts pass an ownership audit unexamined.
$.servers[*]
error
servers-institution-host
Every server in this repository must be under york.ac.uk. Anything else is a tenant or vendor surface and belongs in apis.yml as a relationship, not here as a contract.
$.servers[*]
error
operation-id-present
Every operation should declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-present
Every operation should carry a summary.
$.paths[*][get,post,put,patch,delete]
error
operation-tagged
Every operation must be tagged, so refine-openapis can split cleanly.
$.paths[*][get,post,put,patch,delete]
warn
keyless-declared-explicitly
These surfaces are keyless. Say so with an explicit empty security array rather than by omission, so an agent can tell "no auth needed" from "auth undocumented".
$.paths[*][get]
warn
error-response-documented
Every operation should document at least one non-2xx response. Measured gap: the University publishes no error model, so the contract has to carry it.
$.paths[*][get]
warn
info-license-present
MEASURED GAP, not a style preference. No University of York API surface states a licence or terms of use, and the IIIF manifests carry no rights property. Reuse conditions are unstated.
$.info
warn
info-contact-present
MEASURED GAP. There is no developer contact for any of these APIs; the contact recorded in these contracts is the nearest responsible team, not an API support channel.
$.info

Spectral Ruleset

Raw ↑
# generated: 2026-08-30
# method: derived
# source: openapi/university-of-york-digital-collections-search-openapi.yml,
#         openapi/university-of-york-digital-collections-iiif-openapi.yml,
#         openapi/university-of-york-research-portal-oai-pmh-openapi.yml
#
# Spectral ruleset for the University of York's INSTITUTION-OPERATED API contracts. It replaces a
# ruleset whose documentationUrl pointed at the White Rose EPrints consortium — a shared surface no
# longer attributed to this institution. The rules below encode the conventions these three
# contracts actually hold to, plus the two gaps the profiling run found (no licence, no terms), so
# a future harvest is measured against what is real here.
extends: []
formats:
  - oas3
documentationUrl: https://discover.york.ac.uk/about/
rules:
  info-title-present:
    description: API must declare a title.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  info-version-present:
    description: API must declare a version.
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  info-description-present:
    description: >-
      API must carry a description. For an institution with no developer portal, the contract is the
      only documentation that exists.
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  operator-declared:
    description: >-
      Every contract in a university repository must declare x-operator, so an institution is never
      silently credited with a vendor's engineering.
    severity: error
    given: $.info
    then:
      field: x-operator
      function: truthy
  provenance-declared:
    description: Every contract must declare how it was obtained (x-provenance.method).
    severity: error
    given: $.info
    then:
      field: x-provenance
      function: truthy
  servers-absolute:
    description: >-
      servers[].url must be absolute. A relative or missing server is how vendor contracts pass an
      ownership audit unexamined.
    severity: error
    given: $.servers[*]
    then:
      field: url
      function: pattern
      functionOptions:
        match: '^https://'
  servers-institution-host:
    description: >-
      Every server in this repository must be under york.ac.uk. Anything else is a tenant or vendor
      surface and belongs in apis.yml as a relationship, not here as a contract.
    severity: error
    given: $.servers[*]
    then:
      field: url
      function: pattern
      functionOptions:
        match: '^https://[a-z0-9.-]*york\.ac\.uk'
  operation-id-present:
    description: Every operation should declare an operationId.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: operationId
      function: truthy
  operation-summary-present:
    description: Every operation should carry a summary.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: summary
      function: truthy
  operation-tagged:
    description: Every operation must be tagged, so refine-openapis can split cleanly.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: tags
      function: truthy
  keyless-declared-explicitly:
    description: >-
      These surfaces are keyless. Say so with an explicit empty security array rather than by
      omission, so an agent can tell "no auth needed" from "auth undocumented".
    severity: warn
    given: $.paths[*][get]
    then:
      field: security
      function: defined
  error-response-documented:
    description: >-
      Every operation should document at least one non-2xx response. Measured gap: the University
      publishes no error model, so the contract has to carry it.
    severity: warn
    given: $.paths[*][get]
    then:
      field: responses
      function: truthy
  info-license-present:
    description: >-
      MEASURED GAP, not a style preference. No University of York API surface states a licence or
      terms of use, and the IIIF manifests carry no rights property. Reuse conditions are unstated.
    severity: warn
    given: $.info
    then:
      field: license
      function: truthy
  info-contact-present:
    description: >-
      MEASURED GAP. There is no developer contact for any of these APIs; the contact recorded in
      these contracts is the nearest responsible team, not an API support channel.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/university-of-york-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.