US Senate · API Governance Rules

US Senate API Rules

Spectral linting rules defining API design standards and conventions for US Senate.

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

Rule Categories

lda

Rules

info
lda-path-trailing-slash
LDA API paths end with a trailing slash
$.paths[*]~
info
lda-format-parameter
LDA API GET operations should support a format parameter
$.paths[*].get
error
lda-operation-summary-required
All operations must have a summary
$.paths[*][*]
warn
lda-list-endpoints-paginated
List endpoints must return paginated responses with count/next/previous
$.paths[*].get.responses.200.content.application/json.schema
warn
lda-operation-tags
Operations must have at least one tag
$.paths[*][*]
error
lda-get-200-response
All GET operations must define a 200 response
$.paths[*].get
warn
lda-path-params-documented
Path parameters must have description
$.paths[*][*].parameters[?(@.in == 'path')]

Spectral Ruleset

Raw ↑
extends: "spectral:oas"
rules:
  # LDA API-specific rules
  lda-path-trailing-slash:
    description: LDA API paths end with a trailing slash
    message: "Path '{{property}}' should end with a trailing slash"
    severity: info
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "/$"

  lda-format-parameter:
    description: LDA API GET operations should support a format parameter
    message: "GET operation should document the 'format' query parameter"
    severity: info
    given: "$.paths[*].get"
    then:
      function: truthy

  lda-operation-summary-required:
    description: All operations must have a summary
    message: "Operation is missing a summary"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: summary
      function: truthy

  lda-list-endpoints-paginated:
    description: List endpoints must return paginated responses with count/next/previous
    message: "List response schema should include count, next, previous, and results"
    severity: warn
    given: "$.paths[*].get.responses.200.content.application/json.schema"
    then:
      function: truthy

  lda-operation-tags:
    description: Operations must have at least one tag
    message: "Operation has no tags"
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  lda-get-200-response:
    description: All GET operations must define a 200 response
    message: "GET operation missing 200 response"
    severity: error
    given: "$.paths[*].get"
    then:
      field: responses.200
      function: truthy

  lda-path-params-documented:
    description: Path parameters must have description
    message: "Path parameter missing description"
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in == 'path')]"
    then:
      field: description
      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/us-senate-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.