Biconomy · API Governance Rules

Biconomy API Rules

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

6 Rules error 4 warn 2
View Rules File View on GitHub

Rule Categories

biconomy

Rules

error
biconomy-info-title
Biconomy OpenAPI documents must declare info.title.
$.info
error
biconomy-server-base-url
Biconomy API servers must point at api.biconomy.io.
$.servers[*]
error
biconomy-apikey-header
Biconomy API uses the X-API-Key header for authentication.
$.components.securitySchemes[*]
error
biconomy-paths-prefixed-v1
All Biconomy MEE paths must be prefixed with /v1.
$.paths
warn
biconomy-operation-summary-title-case
Operation summaries should use Title Case.
$.paths[*][*].summary
warn
biconomy-operation-id-camel-case
operationId values should be camelCase.
$.paths[*][*].operationId

Spectral Ruleset

Raw ↑
extends: ["spectral:oas"]
rules:
  biconomy-info-title:
    description: Biconomy OpenAPI documents must declare info.title.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  biconomy-server-base-url:
    description: Biconomy API servers must point at api.biconomy.io.
    severity: error
    given: $.servers[*]
    then:
      field: url
      function: pattern
      functionOptions:
        match: "^https://api\\.biconomy\\.io"
  biconomy-apikey-header:
    description: Biconomy API uses the X-API-Key header for authentication.
    severity: error
    given: $.components.securitySchemes[*]
    then:
      - field: name
        function: pattern
        functionOptions:
          match: "^X-API-Key$"
      - field: in
        function: pattern
        functionOptions:
          match: "^header$"
  biconomy-paths-prefixed-v1:
    description: All Biconomy MEE paths must be prefixed with /v1.
    severity: error
    given: $.paths
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/v1/"
  biconomy-operation-summary-title-case:
    description: Operation summaries should use Title Case.
    severity: warn
    given: $.paths[*][*].summary
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][A-Za-z0-9 /\\-]+$"
  biconomy-operation-id-camel-case:
    description: operationId values should be camelCase.
    severity: warn
    given: $.paths[*][*].operationId
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"