Prismatic · API Governance Rules

Prismatic API Rules

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

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

Rule Categories

prismatic

Rules

error
prismatic-operation-summary-required
Every operation MUST have a summary.
$.paths[*][get,post,put,patch,delete]
warn
prismatic-operation-summary-title-case
Operation summaries MUST be Title Case per the API Evangelist convention.
$.paths[*][get,post,put,patch,delete].summary
hint
prismatic-operation-summary-prefix
Operation summaries SHOULD begin with the brand prefix "Prismatic".
$.paths[*][get,post,put,patch,delete].summary
error
prismatic-operation-id-required
Every operation MUST have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
prismatic-operation-id-camel-case
operationId MUST be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
error
prismatic-operation-tags-required
Every operation MUST have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
prismatic-tags-title-case
Tags MUST be Title Case.
$.tags[*].name
error
prismatic-server-https
All server URLs MUST use HTTPS.
$.servers[*].url
warn
prismatic-server-host
All server URLs MUST be on the prismatic.io domain.
$.servers[*].url
error
prismatic-bearer-auth-defined
The bearerAuth security scheme MUST be defined.
$.components.securitySchemes
warn
prismatic-non-auth-operations-require-bearer
Non-auth operations SHOULD declare bearerAuth security.
$.paths[?(!@property.match(/^\/(auth|get_auth_token)/))][get,post,put,patch,delete]
hint
prismatic-response-401-on-protected
Protected operations SHOULD document a 401 response.
$.paths[?(!@property.match(/^\/(auth|get_auth_token)/))][get,post,put,patch,delete].responses
warn
prismatic-response-429-on-graphql
The GraphQL operation SHOULD document a 429 (rate limited) response.
$.paths[/api].post.responses
warn
prismatic-info-contact
info.contact MUST be present.
$.info
warn
prismatic-info-license
info.license MUST be present.
$.info
error
prismatic-graphql-request-has-query
GraphQLRequest schema MUST require a `query` string field.
$.components.schemas.GraphQLRequest

Spectral Ruleset

Raw ↑
extends:
- spectral:oas

rules:
  # Operation summaries should exist and be in Title Case
  prismatic-operation-summary-required:
    description: Every operation MUST have a summary.
    message: Operation must have a summary.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: summary
      function: truthy

  prismatic-operation-summary-title-case:
    description: Operation summaries MUST be Title Case per the API Evangelist convention.
    message: '{{property}} should be Title Case ({{value}}).'
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: '^[A-Z][A-Za-z0-9]*(\s+(?:[A-Z][A-Za-z0-9]*|[a-z]{1,3}|GraphQL|API|JWT|CLI|MCP|OAuth|REST|URL))*$'

  prismatic-operation-summary-prefix:
    description: Operation summaries SHOULD begin with the brand prefix "Prismatic".
    message: Operation summary should be prefixed with "Prismatic ".
    severity: hint
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: '^Prismatic '

  # Every operation must have an operationId, in camelCase
  prismatic-operation-id-required:
    description: Every operation MUST have an operationId.
    message: Operation must have an operationId.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: operationId
      function: truthy

  prismatic-operation-id-camel-case:
    description: operationId MUST be camelCase.
    message: 'operationId should be camelCase (got: {{value}}).'
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].operationId
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-zA-Z0-9]*$'

  # Every operation must declare at least one tag
  prismatic-operation-tags-required:
    description: Every operation MUST have at least one tag.
    message: Operation must have a tag.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: tags
      function: truthy

  prismatic-tags-title-case:
    description: Tags MUST be Title Case.
    message: '{{value}} should be Title Case.'
    severity: warn
    given: $.tags[*].name
    then:
      function: pattern
      functionOptions:
        match: '^[A-Z][A-Za-z0-9]*(\s+[A-Z][A-Za-z0-9]*)*$'

  # Servers
  prismatic-server-https:
    description: All server URLs MUST use HTTPS.
    message: 'Server URL must use https:// ({{value}}).'
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: '^https://'

  prismatic-server-host:
    description: All server URLs MUST be on the prismatic.io domain.
    message: 'Server URL must be on prismatic.io ({{value}}).'
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: 'prismatic\.io'

  # Security: bearerAuth must be defined and used
  prismatic-bearer-auth-defined:
    description: The bearerAuth security scheme MUST be defined.
    message: components.securitySchemes.bearerAuth must be defined.
    severity: error
    given: $.components.securitySchemes
    then:
      field: bearerAuth
      function: truthy

  prismatic-non-auth-operations-require-bearer:
    description: Non-auth operations SHOULD declare bearerAuth security.
    message: This operation should declare bearerAuth in its security block.
    severity: warn
    given: $.paths[?(!@property.match(/^\/(auth|get_auth_token)/))][get,post,put,patch,delete]
    then:
      field: security
      function: truthy

  # Responses
  prismatic-response-401-on-protected:
    description: Protected operations SHOULD document a 401 response.
    message: Protected operation should describe a 401 Unauthorized response.
    severity: hint
    given: $.paths[?(!@property.match(/^\/(auth|get_auth_token)/))][get,post,put,patch,delete].responses
    then:
      field: '401'
      function: truthy

  prismatic-response-429-on-graphql:
    description: The GraphQL operation SHOULD document a 429 (rate limited) response.
    message: GraphQL POST should describe a 429 response — Prismatic enforces ~20 req/s.
    severity: warn
    given: $.paths[/api].post.responses
    then:
      field: '429'
      function: truthy

  # Info object
  prismatic-info-contact:
    description: info.contact MUST be present.
    message: info.contact must be defined.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy

  prismatic-info-license:
    description: info.license MUST be present.
    message: info.license must be defined.
    severity: warn
    given: $.info
    then:
      field: license
      function: truthy

  # Schemas: GraphQL request shape
  prismatic-graphql-request-has-query:
    description: GraphQLRequest schema MUST require a `query` string field.
    message: GraphQLRequest must require `query`.
    severity: error
    given: $.components.schemas.GraphQLRequest
    then:
      field: required
      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/prismatic-graphql-api-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.