Aklivity · API Governance Rules

Aklivity API Rules

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

11 Rules error 8 warn 2 info 1
View Rules File View on GitHub

Rule Categories

get info operation paths response schema servers

Rules

error
info-title-required
$.info
error
info-description-required
$.info
error
info-version-required
$.info
error
servers-defined
$
error
operation-summary-required
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
$.paths[*][get,post,put,patch,delete]
error
response-description-required
$.paths[*][*].responses[*]
error
get-no-request-body
$.paths[*].get
info
paths-kebab-case
$.paths[*]~
warn
schema-type-defined
$.components.schemas[*].properties[*]

Spectral Ruleset

Raw ↑
# Aklivity / Zilla AsyncAPI and OpenAPI Spectral Ruleset

rules:
  info-title-required:
    message: "API info must have a title"
    severity: error
    given: "$.info"
    then:
      field: title
      function: truthy

  info-description-required:
    message: "API info must have a description"
    severity: error
    given: "$.info"
    then:
      field: description
      function: truthy

  info-version-required:
    message: "API info must have a version"
    severity: error
    given: "$.info"
    then:
      field: version
      function: truthy

  servers-defined:
    message: "Servers must be defined"
    severity: error
    given: "$"
    then:
      field: servers
      function: truthy

  operation-summary-required:
    message: "Every operation must have a summary"
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: summary
      function: truthy

  operation-id-required:
    message: "Every operation must have an operationId"
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  operation-tags-required:
    message: "Every operation must have at least one tag"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: tags
      function: truthy

  response-description-required:
    message: "All responses must have a description"
    severity: error
    given: "$.paths[*][*].responses[*]"
    then:
      field: description
      function: truthy

  get-no-request-body:
    message: "GET operations must not have a request body"
    severity: error
    given: "$.paths[*].get"
    then:
      field: requestBody
      function: falsy

  paths-kebab-case:
    message: "Path segments should use kebab-case"
    severity: info
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^(\\/([a-z0-9][a-z0-9\\-]*|\\{[a-zA-Z][a-zA-Z0-9_]*\\}))*$"

  schema-type-defined:
    message: "Schema properties should have a type"
    severity: warn
    given: "$.components.schemas[*].properties[*]"
    then:
      field: type
      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/aklivity-spectral-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.