SingularityNET · API Governance Rules

SingularityNET API Rules

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

7 Rules error 1 warn 5 info 1
View Rules File View on GitHub

Rule Categories

singularitynet

Rules

warn
singularitynet-operation-summary-title-case
All operation summaries must use Title Case.
$.paths[*][*].summary
warn
singularitynet-operation-ids-camel-case
Operation IDs should use camelCase.
$.paths[*][*].operationId
warn
singularitynet-tags-required
All operations must include at least one tag.
$.paths[*][*]
warn
singularitynet-description-required
All operations must have a description.
$.paths[*][*]
error
singularitynet-response-200-required
Successful operations must define a 200 response.
$.paths[*][*].responses
info
singularitynet-data-envelope
Response bodies should use a data envelope wrapper.
$.paths[*][*].responses['200'].content['application/json'].schema.properties
warn
singularitynet-path-params-described
All path parameters must have descriptions.
$.paths[*][*].parameters[?(@.in == "path")]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  singularitynet-operation-summary-title-case:
    description: All operation summaries must use Title Case.
    message: 'Summary "{{value}}" must use Title Case.'
    severity: warn
    given: '$.paths[*][*].summary'
    then:
      function: pattern
      functionOptions:
        match: '^[A-Z][a-z]+(\s[A-Z][a-z]+)*$'

  singularitynet-operation-ids-camel-case:
    description: Operation IDs should use camelCase.
    message: 'OperationId "{{value}}" should be camelCase.'
    severity: warn
    given: '$.paths[*][*].operationId'
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-zA-Z0-9]+$'

  singularitynet-tags-required:
    description: All operations must include at least one tag.
    message: Operation must include at least one tag.
    severity: warn
    given: '$.paths[*][*]'
    then:
      field: tags
      function: defined

  singularitynet-description-required:
    description: All operations must have a description.
    message: Operation must include a description.
    severity: warn
    given: '$.paths[*][*]'
    then:
      field: description
      function: defined

  singularitynet-response-200-required:
    description: Successful operations must define a 200 response.
    message: Operation must define a 200 success response.
    severity: error
    given: '$.paths[*][*].responses'
    then:
      field: '200'
      function: defined

  singularitynet-data-envelope:
    description: Response bodies should use a data envelope wrapper.
    message: Response body should wrap content in a data property.
    severity: info
    given: "$.paths[*][*].responses['200'].content['application/json'].schema.properties"
    then:
      field: data
      function: defined

  singularitynet-path-params-described:
    description: All path parameters must have descriptions.
    message: Path parameter must have a description.
    severity: warn
    given: '$.paths[*][*].parameters[?(@.in == "path")]'
    then:
      field: description
      function: defined

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/singularitynet-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.