Zestful · API Governance Rules

Zestful API Rules

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

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

Rule Categories

zestful

Rules

warn
zestful-operation-id-camel-case
Operation IDs must use camelCase (Zestful convention)
$.paths[*][*].operationId
error
zestful-request-body-required
POST endpoints must define a required request body
$.paths[*].post
warn
zestful-ingredients-array-limits
Ingredients array must enforce min/maxItems limits
$.paths[*].post.requestBody.content.application/json.schema.properties.ingredients
error
zestful-response-200-defined
All operations must define a 200 response
$.paths[*][*].responses
warn
zestful-tags-defined
All operations must have tags
$.paths[*][*].tags
warn
zestful-security-defined
Operations should define security requirements
$.paths[*][*].security
warn
zestful-info-contact
API info must include contact details
$.info

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  zestful-operation-id-camel-case:
    description: Operation IDs must use camelCase (Zestful convention)
    message: "Operation ID '{{value}}' must be camelCase"
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  zestful-request-body-required:
    description: POST endpoints must define a required request body
    message: POST operation must have a required requestBody
    severity: error
    given: "$.paths[*].post"
    then:
      - field: requestBody
        function: defined
      - field: requestBody.required
        function: truthy

  zestful-ingredients-array-limits:
    description: Ingredients array must enforce min/maxItems limits
    message: Ingredients array must define minItems and maxItems
    severity: warn
    given: "$.paths[*].post.requestBody.content.application/json.schema.properties.ingredients"
    then:
      - field: minItems
        function: defined
      - field: maxItems
        function: defined

  zestful-response-200-defined:
    description: All operations must define a 200 response
    message: Operation must define a 200 success response
    severity: error
    given: "$.paths[*][*].responses"
    then:
      field: "200"
      function: defined

  zestful-tags-defined:
    description: All operations must have tags
    message: Operation must have at least one tag
    severity: warn
    given: "$.paths[*][*].tags"
    then:
      function: length
      functionOptions:
        min: 1

  zestful-security-defined:
    description: Operations should define security requirements
    message: Operation should define security requirements
    severity: warn
    given: "$.paths[*][*].security"
    then:
      function: defined

  zestful-info-contact:
    description: API info must include contact details
    message: API info must include a contact object
    severity: warn
    given: "$.info"
    then:
      field: contact
      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/zestful-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.