Rithum · API Governance Rules

Rithum API Rules

Spectral linting rules defining API design standards and conventions for Rithum.

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

Rule Categories

dsco

Rules

warn
dsco-operation-has-tag
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
dsco-operation-has-summary
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
dsco-operation-has-description
All operations should have a description
$.paths[*][get,post,put,patch,delete]
error
dsco-operation-has-operation-id
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
dsco-operation-id-camel-case
OperationIds should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
dsco-responses-have-error-schema
Error responses should reference a schema
$.paths[*][*].responses[4*,5*].content[*]
warn
dsco-post-has-request-body
POST operations should have a requestBody
$.paths[*].post
warn
dsco-bearer-auth-defined
Security scheme should be BearerAuth
$.components.securitySchemes[*]
info
dsco-batch-request-has-array
Batch request schemas should contain array properties
$.components.schemas[*BatchRequest]
warn
dsco-path-uses-kebab-case
API paths should use kebab-case
$.paths[*]~
info
dsco-schema-has-description
Schema properties should have descriptions
$.components.schemas[*].properties[*]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  # Rithum / Dsco API Conventions

  dsco-operation-has-tag:
    description: All operations must have at least one tag
    message: Operation {{path}} is missing a tag
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: tags
      function: truthy

  dsco-operation-has-summary:
    description: All operations must have a summary
    message: Operation {{path}} is missing a summary
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: summary
      function: truthy

  dsco-operation-has-description:
    description: All operations should have a description
    message: Operation {{path}} is missing a description
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: description
      function: truthy

  dsco-operation-has-operation-id:
    description: All operations must have an operationId
    message: Operation {{path}} is missing an operationId
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  dsco-operation-id-camel-case:
    description: OperationIds should use camelCase
    message: OperationId {{value}} should use camelCase
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  dsco-responses-have-error-schema:
    description: Error responses should reference a schema
    message: Response {{path}} should define a schema
    severity: warn
    given: "$.paths[*][*].responses[4*,5*].content[*]"
    then:
      field: schema
      function: truthy

  dsco-post-has-request-body:
    description: POST operations should have a requestBody
    message: POST operation {{path}} is missing a requestBody
    severity: warn
    given: "$.paths[*].post"
    then:
      field: requestBody
      function: truthy

  dsco-bearer-auth-defined:
    description: Security scheme should be BearerAuth
    message: Security scheme {{path}} should use bearer authentication
    severity: warn
    given: "$.components.securitySchemes[*]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          properties:
            type:
              type: string
              enum:
                - http
          required:
            - type

  dsco-batch-request-has-array:
    description: Batch request schemas should contain array properties
    message: Batch request {{path}} should include array fields
    severity: info
    given: "$.components.schemas[*BatchRequest]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object

  dsco-path-uses-kebab-case:
    description: API paths should use kebab-case
    message: Path {{path}} should use kebab-case segments
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^(/[a-z0-9][a-z0-9-]*({[a-zA-Z]+})?)*$"

  dsco-schema-has-description:
    description: Schema properties should have descriptions
    message: Schema {{path}} is missing a description
    severity: info
    given: "$.components.schemas[*].properties[*]"
    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/dsco-platform-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.