ETH Zurich – Swiss Federal Institute of Technology API Rules

Spectral linting rules defining API design standards and conventions for ETH Zurich – Swiss Federal Institute of Technology.

5 Rules error 1 warn 3 info 1
View Rules File View on GitHub

Rule Categories

eth

Rules

error
eth-info-title-required
API must declare an info.title.
$.info
warn
eth-server-on-library-host
Production server URL should be on the api.library.ethz.ch host.
$.servers[*].url
warn
eth-apikey-query-security-scheme
The platform authenticates with an apiKey security scheme passed in the query string as "apikey". Specs should define this scheme.
$.components.securitySchemes[*]
warn
eth-operations-have-200-response
GET operations should document a 200 response.
$.paths[*].get.responses
info
eth-operation-has-summary-or-description
Each operation should have a summary or description.
$.paths[*][get,post,put,delete]

Spectral Ruleset

Raw ↑
---
# Spectral ruleset for the ETH Library API Platform.
# Encodes patterns observed across the six published OpenAPI 3.0 specs
# (discovery, ethorama, geo, persons, research-collection, vector).
formats:
  - oas3
rules:
  eth-info-title-required:
    description: API must declare an info.title.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy

  eth-server-on-library-host:
    description: Production server URL should be on the api.library.ethz.ch host.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://api\\.library\\.ethz\\.ch/"

  eth-apikey-query-security-scheme:
    description: >-
      The platform authenticates with an apiKey security scheme passed in the
      query string as "apikey". Specs should define this scheme.
    severity: warn
    given: $.components.securitySchemes[*]
    then:
      - field: type
        function: pattern
        functionOptions:
          match: "^apiKey$"
      - field: in
        function: pattern
        functionOptions:
          match: "^query$"
      - field: name
        function: pattern
        functionOptions:
          match: "^apikey$"

  eth-operations-have-200-response:
    description: GET operations should document a 200 response.
    severity: warn
    given: $.paths[*].get.responses
    then:
      field: "200"
      function: truthy

  eth-operation-has-summary-or-description:
    description: Each operation should have a summary or description.
    severity: info
    given: $.paths[*][get,post,put,delete]
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          anyOf:
            - required: [summary]
            - required: [description]

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/eth-zurich-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.