Scotiabank · API Governance Rules

Scotiabank API Rules

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

10 Rules error 4 warn 5 info 1
View Rules File View on GitHub

Rule Categories

scotiabank

Rules

error
scotiabank-oauth2-security
All operations must use OAuth2 authentication
$.components.securitySchemes
error
scotiabank-operation-ids
All operations must have operationId
$.paths[*][*]
error
scotiabank-versioned-paths
API paths must include version prefix
$.paths
warn
scotiabank-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
scotiabank-camel-case-operation-ids
Operation IDs should use camelCase
$.paths[*][*].operationId
error
scotiabank-payment-amount-required
Payment request bodies must include amount field
$.paths[?(@property.match(/payments/))].post.requestBody.content.application/json.schema
warn
scotiabank-error-responses
Operations should document standard error responses
$.paths[*][*].responses
warn
scotiabank-account-id-path-params
Account path parameters should be clearly named
$.paths[*][*].parameters[?(@.in === 'path')]
info
scotiabank-currency-enum
Currency fields should be constrained to supported currencies
$.components.schemas[*].properties.currency
warn
scotiabank-date-format
Date fields should use ISO 8601 format
$.components.schemas[*].properties[?(@ =~ /date|time/i)]

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

rules:
  scotiabank-oauth2-security:
    description: All operations must use OAuth2 authentication
    message: "Scotiabank APIs require OAuth2 client credentials authentication"
    severity: error
    given: "$.components.securitySchemes"
    then:
      field: OAuth2
      function: truthy

  scotiabank-operation-ids:
    description: All operations must have operationId
    message: "Every operation must have a unique operationId"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy

  scotiabank-versioned-paths:
    description: API paths must include version prefix
    message: "API paths must start with /v1/ for versioning"
    severity: error
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        match: "^/v[0-9]+"

  scotiabank-tags-required:
    description: All operations must have at least one tag
    message: "Operations must be tagged for proper categorization"
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  scotiabank-camel-case-operation-ids:
    description: Operation IDs should use camelCase
    message: "OperationId '{{value}}' should use camelCase naming"
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  scotiabank-payment-amount-required:
    description: Payment request bodies must include amount field
    message: "Payment operations should require an 'amount' field in the request body"
    severity: error
    given: "$.paths[?(@property.match(/payments/))].post.requestBody.content.application/json.schema"
    then:
      field: required
      function: truthy

  scotiabank-error-responses:
    description: Operations should document standard error responses
    message: "Operations should document 400, 401, and 422 error responses"
    severity: warn
    given: "$.paths[*][*].responses"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - '401'

  scotiabank-account-id-path-params:
    description: Account path parameters should be clearly named
    message: "Account path parameters should use descriptive names like 'account_id'"
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in === 'path')]"
    then:
      field: name
      function: pattern
      functionOptions:
        match: "^[a-z][a-z_]*_?(id|number)$|^id$"

  scotiabank-currency-enum:
    description: Currency fields should be constrained to supported currencies
    message: "Currency fields should use enum to restrict to supported values (CAD, USD)"
    severity: info
    given: "$.components.schemas[*].properties.currency"
    then:
      field: enum
      function: truthy

  scotiabank-date-format:
    description: Date fields should use ISO 8601 format
    message: "Date fields should use 'date' or 'date-time' format"
    severity: warn
    given: "$.components.schemas[*].properties[?(@ =~ /date|time/i)]"
    then:
      field: format
      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/scotiabank-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.