Mercado Pago · API Governance Rules

Mercado Pago API Rules

Spectral linting rules defining API design standards and conventions for Mercado Pago.

8 Rules error 5 warn 3
View Rules File View on GitHub

Rule Categories

mercado

Rules

warn
mercado-pago-title-case-summary
All operation summaries must use Title Case.
$.paths[*][get,post,put,delete,patch].summary
error
mercado-pago-operation-id-required
All operations must define an operationId.
$.paths[*][get,post,put,delete,patch]
error
mercado-pago-operation-tag-required
Every operation must be tagged.
$.paths[*][get,post,put,delete,patch]
error
mercado-pago-bearer-security
Bearer security must be defined at the document root.
$
error
mercado-pago-server-https
Every server URL must use HTTPS.
$.servers[*].url
warn
mercado-pago-idempotency-key-on-mutations
POST / PUT operations should document an X-Idempotency-Key header.
$.paths[*][post,put].description
error
mercado-pago-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
warn
mercado-pago-error-responses
Mutating operations should declare at least one 4xx response.
$.paths[*][post,put,delete].responses

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  mercado-pago-title-case-summary:
    description: All operation summaries must use Title Case.
    message: Operation summary "{{value}}" should use Title Case.
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].summary
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-zA-Z0-9]*)(\\s+(A|An|And|As|At|But|By|For|In|Of|On|Or|The|To|Vs|Via|With|[A-Z][a-zA-Z0-9]*))*$"

  mercado-pago-operation-id-required:
    description: All operations must define an operationId.
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy

  mercado-pago-operation-tag-required:
    description: Every operation must be tagged.
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: tags
      function: truthy

  mercado-pago-bearer-security:
    description: Bearer security must be defined at the document root.
    severity: error
    given: $
    then:
      field: security
      function: truthy

  mercado-pago-server-https:
    description: Every server URL must use HTTPS.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://"

  mercado-pago-idempotency-key-on-mutations:
    description: POST / PUT operations should document an X-Idempotency-Key header.
    severity: warn
    given: $.paths[*][post,put].description
    then:
      function: pattern
      functionOptions:
        match: "idempoten"

  mercado-pago-no-trailing-slash:
    description: Paths must not end with a trailing slash.
    severity: error
    given: $.paths
    then:
      function: pattern
      functionOptions:
        match: "^(?!.*\\/$).+"
        property: "@key"

  mercado-pago-error-responses:
    description: Mutating operations should declare at least one 4xx response.
    severity: warn
    given: $.paths[*][post,put,delete].responses
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          patternProperties:
            "^4[0-9][0-9]$":
              type: object
          minProperties: 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/mercado-pago-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.