Visa · API Governance Rules

Visa API Rules

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

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

Rule Categories

visa

Rules

warn
visa-operation-id-camel-case
Visa API operation IDs must use camelCase
$.paths[*][*].operationId
error
visa-tags-required
All operations must have tags for API categorization
$.paths[*][*]
warn
visa-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
visa-description-required
All operations must have descriptions
$.paths[*][*]
error
visa-https-servers
All Visa API servers must use HTTPS
$.servers[*].url
warn
visa-mutual-tls-security
Visa APIs should use mutual TLS for authentication
$.components.securitySchemes
error
visa-operation-id-required
All operations must have an operationId for SDK generation
$.paths[*][*]
warn
visa-contact-in-info
All Visa APIs should have contact information
$.info
warn
visa-400-response-defined
All POST operations should define a 400 bad request response
$.paths[*][post].responses
info
visa-external-docs
Each API should link to its Visa Developer portal documentation
$

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  visa-operation-id-camel-case:
    description: Visa API operation IDs must use camelCase
    message: "Operation ID '{{value}}' should be camelCase"
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  visa-tags-required:
    description: All operations must have tags for API categorization
    message: "Operation is missing tags"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  visa-summary-title-case:
    description: All operation summaries must use Title Case
    message: "Summary '{{value}}' should use Title Case"
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9 ]+$"

  visa-description-required:
    description: All operations must have descriptions
    message: "Operation at '{{path}}' is missing a description"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: description
      function: truthy

  visa-https-servers:
    description: All Visa API servers must use HTTPS
    message: "Server URL must use HTTPS"
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "^https://"

  visa-mutual-tls-security:
    description: Visa APIs should use mutual TLS for authentication
    message: "API should define mutualTLS or similar security scheme"
    severity: warn
    given: "$.components.securitySchemes"
    then:
      function: truthy

  visa-operation-id-required:
    description: All operations must have an operationId for SDK generation
    message: "Operation at '{{path}}' is missing operationId"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy

  visa-contact-in-info:
    description: All Visa APIs should have contact information
    message: "info.contact should be defined"
    severity: warn
    given: "$.info"
    then:
      field: contact
      function: truthy

  visa-400-response-defined:
    description: All POST operations should define a 400 bad request response
    message: "POST operation should define a 400 error response"
    severity: warn
    given: "$.paths[*][post].responses"
    then:
      field: "400"
      function: truthy

  visa-external-docs:
    description: Each API should link to its Visa Developer portal documentation
    message: "externalDocs should be defined with a developer.visa.com URL"
    severity: info
    given: "$"
    then:
      field: externalDocs
      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/visa-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 email required.

A second provider on the same verified email joins the account you already have.