Thank you for helping improve the spec. This guide covers how to report issues, propose changes, and run validation locally before opening a PR.
Open a GitHub Issue with the label spec-bug or spec-gap and include:
- Endpoint: HTTP method + path (e.g.
POST /v1/payments) - Problem: What is wrong or missing (wrong field type, missing parameter, undocumented response code)
- Evidence: Link to the official developer portal page or API response that proves the correct behavior
- Country scope: Which
site_idvalues are affected (if country-specific)
Do not open a PR without an issue first for new endpoints — the team needs to confirm the endpoint is GA and not an internal-only path.
-
spec3.yamlmust always be self-contained — zero external$reffile references. All schemas live incomponents/schemasinsidespec3.yamlitself. -
Edit schemas in
schemas/*.yaml, then runbundle.pyto merge them intospec3.yaml. Never editspec3.yaml'scomponents/schemasblock directly for schema definitions — edit the source fragment and re-bundle. -
Never edit
spec3.json— it is machine-generated fromspec3.yaml. -
No real credentials in any example or fixture. Use
YOUR_ACCESS_TOKENas placeholder. -
No raw card data (PAN, CVV) in any example.
- Consult the official MercadoPago developer portal for the endpoint description and schema:
- developers.mercadopago.com (all countries)
- mercadopago.com.ar/developers (Argentina)
- mercadopago.com.br/developers (Brazil)
- Add the path operation to the correct section of
spec3.yamlunderpaths: - Add required schemas to the matching
schemas/*.yamlfragment - Run
python3 openapi/scripts/bundle.pyto merge and fix refs - Add a sample response to
fixtures3.yamlkeyed by the resource name - Run
bash openapi/scripts/validate.sh
Edit the appropriate schemas/*.yaml file:
| File | Contains |
|---|---|
schemas/common.yaml |
Error, Address, Payer, Pagination, Store, POS, Money |
schemas/payments.yaml |
Payment, PaymentRequest, Refund |
schemas/orders.yaml |
Order, OrderRequest, OrderPayment |
schemas/checkout.yaml |
Preference, PreferenceItem |
schemas/customers.yaml |
Customer, Card, CardToken |
schemas/subscriptions.yaml |
Subscription, SubscriptionPlan, AuthorizedPayment |
schemas/webhooks.yaml |
WebhookNotification, MerchantOrder |
schemas/oauth.yaml |
OAuthTokenRequest, OAuthTokenResponse |
schemas/claims.yaml |
Claim, ClaimMessage, ClaimEvidence |
schemas/reports.yaml |
ReportConfig, ReportRequest, ReportTask |
After editing, run the bundler: python3 openapi/scripts/bundle.py
# 1. Install dependencies (once)
pip install pyyaml openapi-spec-validator
npm install -g @stoplight/spectral-cli
# 2. Bundle (merge schemas into spec3.yaml)
python3 openapi/scripts/bundle.py
# 3. Validate
bash openapi/scripts/validate.sh
# 4. Check for breaking changes vs main
bash openapi/scripts/diff.sh mainAll three must pass before opening a PR.
- Issue linked
-
spec3.yamlhas zero external$refs (grep -c '$ref: "schemas/' openapi/spec3.yaml→ 0) - New endpoint has
x-mp-sites,x-mp-release-phase,security, and all standard response codes - New schema added to the correct
schemas/*.yamlfragment and bundled -
fixtures3.yamlupdated if a new resource was added -
bash openapi/scripts/validate.shpasses - No real credentials or raw card data in any example
| Event | Target |
|---|---|
| New GA endpoint | Spec updated within 5 business days of API release |
| Breaking API change | Spec updated same day; deprecation notice 30 days prior |
| Bug in spec (wrong field/type) | Fix within 2 business days |
| Community-reported issue | First response within 3 business days |
MercadoPago Developer Experience