UtilityAPI · API Governance Rules

UtilityAPI API Rules

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

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

Rule Categories

utilityapi

Rules

error
utilityapi-bearer-auth-required
All operations must use bearerAuth security
$.paths[*][*]
warn
utilityapi-uid-path-parameters
Path parameters for resource IDs should be named 'uid'
$.paths[*][*].parameters[*]
warn
utilityapi-pagination-next-cursor
List endpoints should support 'next' cursor pagination
$.paths[*].get
warn
utilityapi-list-response-envelope
List responses should use plural noun envelope
$.paths[*].get.responses.200.content.application/json.schema
error
utilityapi-operations-must-have-summaries
All operations must have a summary
$.paths[*][get,post,put,delete,patch]
warn
utilityapi-operations-must-have-tags
All operations must have at least one tag
$.paths[*][get,post,put,delete,patch]
warn
utilityapi-error-response-defined
Operations should define 401 error responses
$.paths[*][get,post,put,delete,patch].responses
warn
utilityapi-operation-ids-camel-case
Operation IDs should use camelCase
$.paths[*][*].operationId

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  utilityapi-bearer-auth-required:
    description: All operations must use bearerAuth security
    message: Operation must use bearerAuth security scheme
    severity: error
    given: "$.paths[*][*]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          properties:
            security:
              type: array
          required:
            - security

  utilityapi-uid-path-parameters:
    description: Path parameters for resource IDs should be named 'uid'
    message: Resource identifier path parameters should be named 'uid'
    severity: warn
    given: "$.paths[*][*].parameters[*]"
    then:
      function: pattern
      field: name
      functionOptions:
        match: "^(uid|username|name|provider|architecture|version)$"

  utilityapi-pagination-next-cursor:
    description: List endpoints should support 'next' cursor pagination
    message: List operations should include 'next' cursor parameter
    severity: warn
    given: "$.paths[*].get"
    then:
      function: truthy
      field: parameters

  utilityapi-list-response-envelope:
    description: List responses should use plural noun envelope
    message: List responses should wrap items in a plural noun envelope
    severity: warn
    given: "$.paths[*].get.responses.200.content.application/json.schema"
    then:
      function: truthy
      field: properties

  utilityapi-operations-must-have-summaries:
    description: All operations must have a summary
    message: Operations must have a summary field
    severity: error
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      function: truthy
      field: summary

  utilityapi-operations-must-have-tags:
    description: All operations must have at least one tag
    message: Operations should be tagged for organization
    severity: warn
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      function: truthy
      field: tags

  utilityapi-error-response-defined:
    description: Operations should define 401 error responses
    message: Operations should document 401 Unauthorized responses
    severity: warn
    given: "$.paths[*][get,post,put,delete,patch].responses"
    then:
      function: truthy
      field: '401'

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

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