Smithsonian Institution · API Governance Rules

Smithsonian Institution API Rules

Spectral linting rules defining API design standards and conventions for Smithsonian Institution.

8 Rules error 2 warn 6
View Rules File View on GitHub

Rule Categories

smithsonian

Rules

error
smithsonian-operation-ids
All operations must have an operationId in camelCase
$.paths[*][*]
warn
smithsonian-operation-tags
All operations must have at least one tag
$.paths[*][*]
warn
smithsonian-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
error
smithsonian-api-key-required
All operations must require an api_key query parameter
$.paths[*].get
warn
smithsonian-pagination-support
Search endpoints should support start/rows pagination
$.paths[*search*].get
warn
smithsonian-json-response
All successful responses should return application/json
$.paths[*][*].responses.200.content
warn
smithsonian-no-trailing-slashes
API paths must not have trailing slashes
$.paths
warn
smithsonian-error-401
All operations must document 401 Unauthorized response
$.paths[*][*].responses

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  smithsonian-operation-ids:
    description: All operations must have an operationId in camelCase
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy

  smithsonian-operation-tags:
    description: All operations must have at least one tag
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  smithsonian-summary-title-case:
    description: Operation summaries must use Title Case
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9 ]*$"

  smithsonian-api-key-required:
    description: All operations must require an api_key query parameter
    severity: error
    given: "$.paths[*].get"
    then:
      field: parameters
      function: truthy

  smithsonian-pagination-support:
    description: Search endpoints should support start/rows pagination
    severity: warn
    given: "$.paths[*search*].get"
    then:
      field: parameters
      function: truthy

  smithsonian-json-response:
    description: All successful responses should return application/json
    severity: warn
    given: "$.paths[*][*].responses.200.content"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - 'application/json'

  smithsonian-no-trailing-slashes:
    description: API paths must not have trailing slashes
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        notMatch: "/$"

  smithsonian-error-401:
    description: All operations must document 401 Unauthorized response
    severity: warn
    given: "$.paths[*][*].responses"
    then:
      field: '401'
      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/smithsonian-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.