University of Basel · API Governance Rules

University of Basel API Rules

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

7 Rules error 2 warn 3 info 2
View Rules File View on GitHub

Rule Categories

basel

Rules

warn
basel-info-contact
API info should declare a contact (DSP-API declares DaSCH as contact).
$.info
error
basel-info-version-present
API info must declare a version (DSP-API uses a vNN.NN.NN scheme).
$.info
error
basel-server-https
All servers must use HTTPS (DSP-API is served over TLS only).
$.servers[*].url
warn
basel-operation-tags
Every operation should be tagged (DSP-API groups by Admin/Management/API v2/API v3/Ontology Mappings).
$.paths[*][get,put,post,delete,patch]
warn
basel-operation-description
Operations should carry a human description (DSP-API documents each endpoint).
$.paths[*][get,put,post,delete,patch]
info
basel-known-tags
Tags should come from the DSP-API tag vocabulary.
$.paths[*][get,put,post,delete,patch].tags[*]
info
basel-error-response
Operations should document at least one non-2xx response (DSP-API returns typed error bodies).
$.paths[*][get,put,post,delete,patch].responses

Spectral Ruleset

Raw ↑
# Spectral ruleset for the University of Basel / DaSCH DSP-API.
# Encodes patterns observed in the live OpenAPI 3.1 description published at
# https://api.dasch.swiss/api/docs/docs.yaml (DSP-API v35.10.0).
formats:
  - oas3
rules:
  basel-info-contact:
    description: API info should declare a contact (DSP-API declares DaSCH as contact).
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy
  basel-info-version-present:
    description: API info must declare a version (DSP-API uses a vNN.NN.NN scheme).
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  basel-server-https:
    description: All servers must use HTTPS (DSP-API is served over TLS only).
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://"
  basel-operation-tags:
    description: Every operation should be tagged (DSP-API groups by Admin/Management/API v2/API v3/Ontology Mappings).
    severity: warn
    given: $.paths[*][get,put,post,delete,patch]
    then:
      field: tags
      function: truthy
  basel-operation-description:
    description: Operations should carry a human description (DSP-API documents each endpoint).
    severity: warn
    given: $.paths[*][get,put,post,delete,patch]
    then:
      field: description
      function: truthy
  basel-known-tags:
    description: Tags should come from the DSP-API tag vocabulary.
    severity: info
    given: $.paths[*][get,put,post,delete,patch].tags[*]
    then:
      function: enumeration
      functionOptions:
        values:
          - Admin API
          - Management API
          - API v2
          - API v3
          - Ontology Mappings
  basel-error-response:
    description: Operations should document at least one non-2xx response (DSP-API returns typed error bodies).
    severity: info
    given: $.paths[*][get,put,post,delete,patch].responses
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          minProperties: 1

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-basel-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 email required.

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