Charles University · API Governance Rules

Charles University API Rules

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

6 Rules error 2 warn 3 info 1
View Rules File View on GitHub

Rule Categories

charles

Rules

error
charles-info-title-required
API must declare an info title.
$.info
error
charles-server-https
Servers must use HTTPS as observed on LINDAT.
$.servers[*].url
warn
charles-operation-id-required
Every operation must have an operationId (LINDAT uses snake_case ids like get_model_collection).
$.paths[*][get,post,put,delete,patch]
warn
charles-operation-id-snake-case
operationIds follow snake_case convention.
$.paths[*][get,post,put,delete,patch].operationId
warn
charles-operation-tagged
Operations are grouped under root, languages, or models tags.
$.paths[*][get,post,put,delete,patch]
info
charles-hal-links-property
Resource schemas expose HAL-style _links navigation.
$.components.schemas[?(@property.match(/Resource$/))].properties

Spectral Ruleset

Raw ↑
# Provenance: Spectral ruleset derived from the LINDAT Translation OpenAPI held in this repo.
# method: derived
# x-source-url: https://lindat.mff.cuni.cz/services/translation/api/v2/swagger.json
# x-operator: institution (UFAL, Faculty of Mathematics and Physics, Charles University)
extends: []
formats:
  - oas3
documentationUrl: https://lindat.mff.cuni.cz/services/translation/docs
rules:
  charles-info-title-required:
    description: API must declare an info title.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  charles-server-https:
    description: Servers must use HTTPS as observed on LINDAT.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://"
  charles-operation-id-required:
    description: Every operation must have an operationId (LINDAT uses snake_case ids like get_model_collection).
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy
  charles-operation-id-snake-case:
    description: operationIds follow snake_case convention.
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].operationId
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-z0-9_]*$"
  charles-operation-tagged:
    description: Operations are grouped under root, languages, or models tags.
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: tags
      function: truthy
  charles-hal-links-property:
    description: Resource schemas expose HAL-style _links navigation.
    severity: info
    given: $.components.schemas[?(@property.match(/Resource$/))].properties
    then:
      field: _links
      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/charles-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.