SAP BRIM (Billing and Revenue Innovation Management) API Rules

Spectral linting rules defining API design standards and conventions for SAP BRIM (Billing and Revenue Innovation Management).

10 Rules warn 8 info 2
View Rules File View on GitHub

Rule Categories

sap

Rules

warn
sap-brim-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
warn
sap-brim-operation-id-camel-case
OperationIds must use camelCase
$.paths[*][*].operationId
warn
sap-brim-tags-title-case
All tags must use Title Case
$.tags[*].name
warn
sap-brim-path-kebab-case
API paths should use kebab-case for segments
$.paths
warn
sap-brim-oauth2-or-apikey-required
BRIM APIs require OAuth 2.0 or API Key authentication
$.components.securitySchemes
warn
sap-brim-error-responses
Operations should define error responses (400, 401, 500)
$.paths[*][*].responses
info
sap-brim-subscription-status-enum
Subscription status fields should use defined enum values
$.components.schemas.Subscription.properties.status.enum
warn
sap-brim-request-body-required
POST and PUT operations must define request bodies
$.paths[*].post.requestBody
info
sap-brim-pagination-parameters
List operations should support offset/limit pagination
$.paths[*].get.parameters
warn
sap-brim-servers-defined
APIs must define production and sandbox server URLs
$.servers

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  sap-brim-operation-summary-title-case:
    description: Operation summaries must use Title Case
    message: Summary "{{value}}" should be in Title Case
    given: "$.paths[*][*].summary"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z]"

  sap-brim-operation-id-camel-case:
    description: OperationIds must use camelCase
    message: OperationId "{{value}}" should use camelCase
    given: "$.paths[*][*].operationId"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  sap-brim-tags-title-case:
    description: All tags must use Title Case
    message: Tag "{{value}}" should be in Title Case
    given: "$.tags[*].name"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z]"

  sap-brim-path-kebab-case:
    description: API paths should use kebab-case for segments
    message: Path should use kebab-case for all segments
    given: "$.paths"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^(/[a-z][a-z0-9-]*(/[a-z][a-z0-9-]*|/\\{[a-zA-Z][a-zA-Z0-9]*\\})*)*$"

  sap-brim-oauth2-or-apikey-required:
    description: BRIM APIs require OAuth 2.0 or API Key authentication
    message: APIs should define OAuth2 or ApiKey security schemes
    given: "$.components.securitySchemes"
    severity: warn
    then:
      function: truthy

  sap-brim-error-responses:
    description: Operations should define error responses (400, 401, 500)
    message: Operation should define standard error responses
    given: "$.paths[*][*].responses"
    severity: warn
    then:
      function: truthy

  sap-brim-subscription-status-enum:
    description: Subscription status fields should use defined enum values
    message: Subscription status should be ACTIVE, SUSPENDED, CANCELLED, EXPIRED, PENDING, or TRIAL
    given: "$.components.schemas.Subscription.properties.status.enum"
    severity: info
    then:
      function: truthy

  sap-brim-request-body-required:
    description: POST and PUT operations must define request bodies
    message: POST/PUT operations should define a requestBody
    given: "$.paths[*].post.requestBody"
    severity: warn
    then:
      function: truthy

  sap-brim-pagination-parameters:
    description: List operations should support offset/limit pagination
    message: Collection endpoints should define offset and limit pagination parameters
    given: "$.paths[*].get.parameters"
    severity: info
    then:
      function: truthy

  sap-brim-servers-defined:
    description: APIs must define production and sandbox server URLs
    message: API should define both production and sandbox server environments
    given: "$.servers"
    severity: warn
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          minItems: 1

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/sap-brim-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.