PlaceKitten · API Governance Rules

PlaceKitten API Rules

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

6 Rules error 3 warn 3
View Rules File View on GitHub

Rule Categories

placekitten

Rules

error
placekitten-path-shape
PlaceKitten paths must include {width} and {height} path parameters.
$.paths[*]
error
placekitten-width-parameter
width path parameter must be a positive integer in pixels.
$..parameters[?(@.name=='width')]
error
placekitten-height-parameter
height path parameter must be a positive integer in pixels.
$..parameters[?(@.name=='height')]
warn
placekitten-image-response
Successful responses must return image/jpeg payloads.
$.paths[*].get.responses['200'].content
warn
placekitten-operation-summary-title-case
Operation summaries should use Title Case.
$.paths[*][get,put,post,delete,patch,options,head].summary
warn
placekitten-deprecation-notice
The info block must carry x-status and x-deprecation-notice while the service is offline.
$.info

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  # PlaceKitten URL contract is: /{width}/{height} for color, /g/{width}/{height} for grayscale.
  # Width and height path parameters must remain positive integers.
  placekitten-path-shape:
    description: PlaceKitten paths must include {width} and {height} path parameters.
    severity: error
    given: $.paths[*]
    then:
      function: schema
      functionOptions:
        schema:
          type: object
    formats:
      - oas3
  placekitten-width-parameter:
    description: width path parameter must be a positive integer in pixels.
    severity: error
    given: $..parameters[?(@.name=='width')]
    then:
      - field: schema.type
        function: enumeration
        functionOptions:
          values: [integer]
      - field: schema.minimum
        function: truthy
  placekitten-height-parameter:
    description: height path parameter must be a positive integer in pixels.
    severity: error
    given: $..parameters[?(@.name=='height')]
    then:
      - field: schema.type
        function: enumeration
        functionOptions:
          values: [integer]
      - field: schema.minimum
        function: truthy
  placekitten-image-response:
    description: Successful responses must return image/jpeg payloads.
    severity: warn
    given: $.paths[*].get.responses['200'].content
    then:
      field: image/jpeg
      function: truthy
  placekitten-operation-summary-title-case:
    description: Operation summaries should use Title Case.
    severity: warn
    given: $.paths[*][get,put,post,delete,patch,options,head].summary
    then:
      function: pattern
      functionOptions:
        match: '^([A-Z][A-Za-z0-9]*)(\s[A-Z][A-Za-z0-9]*)*$'
  placekitten-deprecation-notice:
    description: The info block must carry x-status and x-deprecation-notice while the service is offline.
    severity: warn
    given: $.info
    then:
      - field: x-status
        function: truthy
      - field: x-deprecation-notice
        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/placekitten-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.