Mautic Community Forums

Swagger/OpenAPI support for Mautic API

My idea is:

Swagger/OpenAPI would allow the developer API docs to be generated/updated automatically as soon as an API endpoint/model changes, and it will become possible to generate API clients for multiple languages (PHP/Java/JavaScript/etc.). This Symfony bundle might help a lot: https://symfony.com/doc/current/bundles/NelmioApiDocBundle/index.html

I think these groups of people would benefit from this idea:

People who are using the Mautic API to connect to Mautic instances

Why I think they would benefit from this idea:

Improved/more up-to-date API documentation, as well as the possibility to generate API clients (PHP/Java/JavaScript/etc.) on the fly if necessary

Any code or resources to support this idea:

https://swagger.io/docs/specification/about/
Examples: https://editor.swagger.io/

Are you willing to work on this idea?:

Yes

What skills and resources do you need to explore this further?

Let’s wait for the final version of Mautic 3 before discussing this topic further.