Coupa · API Governance Rules

Coupa API Rules

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

13 Rules error 6 warn 6 info 1
View Rules File View on GitHub

Rule Categories

coupa

Rules

error
coupa-info-contact
API info object should include contact information.
$.info
warn
coupa-info-license
API info object should include license information.
$.info
error
coupa-server-https
All servers must use HTTPS.
$.servers[*].url
warn
coupa-base-url
Servers should reference the Coupa instance host.
$.servers[*].url
error
coupa-required-auth
Operations should be protected by OAuth 2.0 or API key.
$.security
error
coupa-operation-tags
Every operation must have at least one tag.
$.paths.*[get,post,put,delete,patch]
error
coupa-operation-summary
Every operation must have a summary.
$.paths.*[get,post,put,delete,patch]
warn
coupa-operation-description
Operations should include a description.
$.paths.*[get,post,put,delete,patch]
warn
coupa-summary-prefix
Every operation summary should be prefixed with "Coupa".
$.paths.*[get,post,put,delete,patch].summary
error
coupa-operation-id
Every operation must have an operationId.
$.paths.*[get,post,put,delete,patch]
warn
coupa-resource-naming
Path segments should use snake_case to match Coupa resource naming.
$.paths
warn
coupa-error-responses
Operations should declare 401 and 404 error responses.
$.paths.*[get,put,delete,patch]
info
coupa-pagination-params
List operations should support offset and limit query parameters.
$.paths[?(@property.match(/.*s$/))][get].parameters

Spectral Ruleset

Raw ↑
extends: ["spectral:oas"]
documentationUrl: https://compass.coupa.com/en-us/products/product-documentation/integration-technical-documentation
rules:
  coupa-info-contact:
    description: API info object should include contact information.
    message: "{{description}}: info.contact is required."
    given: "$.info"
    severity: error
    then:
      field: contact
      function: truthy
  coupa-info-license:
    description: API info object should include license information.
    given: "$.info"
    severity: warn
    then:
      field: license
      function: truthy
  coupa-server-https:
    description: All servers must use HTTPS.
    given: "$.servers[*].url"
    severity: error
    then:
      function: pattern
      functionOptions:
        match: "^https://"
  coupa-base-url:
    description: Servers should reference the Coupa instance host.
    given: "$.servers[*].url"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "coupahost.com"
  coupa-required-auth:
    description: Operations should be protected by OAuth 2.0 or API key.
    given: "$.security"
    severity: error
    then:
      function: truthy
  coupa-operation-tags:
    description: Every operation must have at least one tag.
    given: "$.paths.*[get,post,put,delete,patch]"
    severity: error
    then:
      field: tags
      function: truthy
  coupa-operation-summary:
    description: Every operation must have a summary.
    given: "$.paths.*[get,post,put,delete,patch]"
    severity: error
    then:
      field: summary
      function: truthy
  coupa-operation-description:
    description: Operations should include a description.
    given: "$.paths.*[get,post,put,delete,patch]"
    severity: warn
    then:
      field: description
      function: truthy
  coupa-summary-prefix:
    description: Every operation summary should be prefixed with "Coupa".
    message: '{{description}}: summary should start with "Coupa".'
    given: "$.paths.*[get,post,put,delete,patch].summary"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^Coupa"
  coupa-operation-id:
    description: Every operation must have an operationId.
    given: "$.paths.*[get,post,put,delete,patch]"
    severity: error
    then:
      field: operationId
      function: truthy
  coupa-resource-naming:
    description: Path segments should use snake_case to match Coupa resource naming.
    given: "$.paths"
    severity: warn
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/[a-z0-9_/{}]+$"
  coupa-error-responses:
    description: Operations should declare 401 and 404 error responses.
    given: "$.paths.*[get,put,delete,patch]"
    severity: warn
    then:
      field: responses.401
      function: truthy
  coupa-pagination-params:
    description: List operations should support offset and limit query parameters.
    given: "$.paths[?(@property.match(/.*s$/))][get].parameters"
    severity: info
    then:
      function: schema
      functionOptions:
        schema:
          type: array

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/coupa-core-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.