Why export?
MAPI is great for humans and LLMs, but the ecosystem is built on OpenAPI. You might need OpenAPI for:
- Code generation — Client SDKs, server stubs, types
- API gateways — Kong, AWS API Gateway, Apigee
- Documentation tools — Swagger UI, Redoc, Stoplight
- Testing tools — Postman, Insomnia, Dredd
- Validation — Request/response validation middleware
The solution: maintain MAPI as your source of truth, generate OpenAPI when tools demand it.
LLM-assisted export
Attach your MAPI spec and the export reference card:
MAPI to OpenAPI Reference Card
Raw markdown for LLM consumption — export mappings and extension patterns
Or paste this prompt directly into your LLM chat
What gets preserved
OpenAPI can't express everything MAPI has. The reference card uses extensions to preserve:
- Intentions →
x-mapi-intention(beyond thesummary) - Logic Constraints →
x-mapi-constraints - SSE events →
x-mapi-events - Capability grouping →
x-mapi-capability
This means you can convert MAPI → OpenAPI → MAPI without losing information.
OpenAPI 3.x doesn't support WebSocket. WebSocket capabilities can be preserved in x-mapi-websocket extensions, but won't be usable by standard OpenAPI tools. Consider generating a separate AsyncAPI file for event-driven endpoints.
The dual-format workflow
Many teams use this pattern:
- Author in MAPI — Human-readable, LLM-friendly source of truth
- Export to OpenAPI — On-demand, for tooling that needs it
- Generate artifacts — SDKs, docs, gateway configs from OpenAPI
- Keep MAPI updated — Changes go to MAPI first, then re-export
This gives you the best of both worlds: MAPI's readability and OpenAPI's ecosystem compatibility.