Cornell University · API Governance Rules

Cornell University API Rules

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

7 Rules error 3 warn 4
View Rules File View on GitHub

Rule Categories

cornell

Rules

warn
cornell-info-contact
Every Cornell-operated API should declare an institutional contact.
$.info
warn
cornell-info-description
Every API must carry a description.
$.info
warn
cornell-operations-have-tags
Operations are grouped by tag (class-roster, library-catalog, cugir).
$.paths[*][get]
error
cornell-get-only
Cornell's public institution-operated APIs expose GET operations only.
$.paths[*]
error
cornell-operator-declared
Every Cornell OpenAPI must declare info.x-operator, so a vendor's contract can never be credited to the institution by accident (university pipeline, operator axis).
$.info
error
cornell-servers-on-institution-host
servers[] must sit under a host Cornell operates. A spec based on classes.cornell.edu while describing another host is the weld this repo was corrected for on 2026-08-19.
$.servers[*].url
warn
cornell-2xx-response
Each operation must document a success response.
$.paths[*][get].responses

Spectral Ruleset

Raw ↑
---
# authorship: API Evangelist tooling.
x-generated: '2026-08-19'
x-method: derived
x-source: >-
  openapi/cornell-class-roster-api-openapi.yml, openapi/cornell-library-catalog-api-openapi.yml,
  openapi/cugir-geospatial-api-openapi.yml
# Spectral ruleset encoding the conventions of the API surfaces Cornell University
# itself operates: the Class Roster API (classes.cornell.edu), the Library catalog
# (Blacklight) and CUGIR (GeoBlacklight). Rewritten 2026-08-19 — the 2026-06 version
# was framed around the five Cornell Open Data Initiative specs (classes, days,
# dining, events, map), four of which describe surfaces that are now dead or
# vendor-operated.
extends: [[spectral:oas, off]]
formats:
  - oas3
rules:
  cornell-info-contact:
    description: Every Cornell-operated API should declare an institutional contact.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy

  cornell-info-description:
    description: Every API must carry a description.
    severity: warn
    given: $.info
    then:
      field: description
      function: truthy

  cornell-operations-have-tags:
    description: Operations are grouped by tag (class-roster, library-catalog, cugir).
    severity: warn
    given: $.paths[*][get]
    then:
      field: tags
      function: truthy

  cornell-get-only:
    description: Cornell's public institution-operated APIs expose GET operations only.
    severity: error
    given: $.paths[*]
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^(get|parameters|summary|description|servers)$"

  cornell-operator-declared:
    description: >-
      Every Cornell OpenAPI must declare info.x-operator, so a vendor's contract can never be
      credited to the institution by accident (university pipeline, operator axis).
    severity: error
    given: $.info
    then:
      field: x-operator
      function: truthy

  cornell-servers-on-institution-host:
    description: >-
      servers[] must sit under a host Cornell operates. A spec based on classes.cornell.edu while
      describing another host is the weld this repo was corrected for on 2026-08-19.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://[a-z0-9.-]*cornell\\.edu(/|$)"

  cornell-2xx-response:
    description: Each operation must document a success response.
    severity: warn
    given: $.paths[*][get].responses
    then:
      field: "200"
      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/cornell-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.