Rainbow.AI · API Governance Rules

Rainbow.AI API Rules

Spectral linting rules defining API design standards and conventions for Rainbow.AI.

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

Rule Categories

rainbow

Rules

error
rainbow-ai-api-key-auth
Rainbow.AI APIs must use Ocp-Apim-Subscription-Key header or token query parameter for authentication
$.components.securitySchemes[*]
warn
rainbow-ai-coordinate-params
Geolocation endpoints must include lat and lon query parameters
$.paths[*].get.parameters[*]
warn
rainbow-ai-tile-path-format
Map tile paths must follow XYZ tiling scheme {z}/{x}/{y}
$.paths
warn
rainbow-ai-response-updated-at
Weather data responses should include an updated_at timestamp
$.components.schemas[*].properties
warn
rainbow-ai-weather-tags
All operations must have appropriate weather-domain tags
$.paths[*][*].tags
error
rainbow-ai-operation-ids
All operations must have unique operationId in camelCase
$.paths[*][*]
warn
rainbow-ai-rate-limit-response
All endpoints must document a 429 Too Many Requests response
$.paths[*].get.responses
hint
rainbow-ai-pagination-not-required
Rainbow.AI weather endpoints return bounded data sets and do not require pagination
$.paths[*]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  rainbow-ai-api-key-auth:
    description: Rainbow.AI APIs must use Ocp-Apim-Subscription-Key header or token query parameter for authentication
    message: Security scheme must use apiKey type with Ocp-Apim-Subscription-Key header or token query param
    severity: error
    given: "$.components.securitySchemes[*]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          properties:
            type:
              enum: [apiKey]
          required: [type]

  rainbow-ai-coordinate-params:
    description: Geolocation endpoints must include lat and lon query parameters
    message: Endpoint accepting coordinates must have lat and lon query parameters
    severity: warn
    given: "$.paths[*].get.parameters[*]"
    then:
      function: truthy

  rainbow-ai-tile-path-format:
    description: Map tile paths must follow XYZ tiling scheme {z}/{x}/{y}
    message: Tile paths must use {z}/{x}/{y} path parameter pattern
    severity: warn
    given: "$.paths"
    then:
      function: truthy

  rainbow-ai-response-updated-at:
    description: Weather data responses should include an updated_at timestamp
    message: Weather response schemas should have an updated_at field
    severity: warn
    given: "$.components.schemas[*].properties"
    then:
      function: truthy

  rainbow-ai-weather-tags:
    description: All operations must have appropriate weather-domain tags
    message: Operation must be tagged with at least one weather-domain tag
    severity: warn
    given: "$.paths[*][*].tags"
    then:
      function: truthy

  rainbow-ai-operation-ids:
    description: All operations must have unique operationId in camelCase
    message: Operation must have an operationId
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy

  rainbow-ai-rate-limit-response:
    description: All endpoints must document a 429 Too Many Requests response
    message: API endpoint must include 429 response code
    severity: warn
    given: "$.paths[*].get.responses"
    then:
      field: "429"
      function: truthy

  rainbow-ai-pagination-not-required:
    description: Rainbow.AI weather endpoints return bounded data sets and do not require pagination
    message: Note - no pagination required for weather endpoints
    severity: hint
    given: "$.paths[*]"
    then:
      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/rainbow-ai-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.