Notifications
Announcements
No record found.
Hello Experts,
We are working on an integration project in which from Logic App we need to connect to D365 FO custom API Services by creating a custom connector.
Need to upload the swagger file for the same.
Is there a way by which we can generate the swagger file through X++ code .
Thanks in Advance
Thanks
Anoop
Hi AnoopNair,
Do you mean that you want to create a YAML file?
YAML, being a superset of JSON, can be used as well to represent a Swagger specification file.
By convention, the Swagger specification file is named "swagger.json" and it's easy to create to create a Json file.
JSON files are just text files, therefore if you know how to write into text files and understand the JSON format, then you're able to generate JSON files.
Please refer to the blog about OpenAPI:
http://axhelper.com/?p=23412
Hope this helps.
see if this helps
https://community.dynamics.com/ax/b/happyd365fo/posts/logic-apps-with-microsoft-dynamics-365-finance-and-operations
Thanks for the Reply Rahul, this example is to connect by using D365 oob connector to connect to an OData entity.
Not to connect to the service by creating a custom connector.
I'm not aware of any existing tool that would generate a Swagger file for AX custom services, but it definitely can be written. Just don't forget that generators in .NET depends on metadata provided in attributes and there are no such attributes in custom services. You'll likely want to add more information than what you can generate automatically.
I briefly mention the topic of Swagger file generation in my article Open API for JSON-based custom services in AX 7. You can also find a sample Swagger for one custom service in AX.
The blog post linked by Will was simply copied from my blog. Actually, I see that they took the whole content of my blog without my knowledge and without at least mentioning my name...
Sorry Martin,
I didn't notice it was your article.
I just found it on the Internet.
Anyway, your sharing and research help me a lot in my study of D365.
Thank you very much.
Thanks much Martin, have already gone through your article and its very much informative.
I am looking for something similar to Swashbuckle by which you can install through nuget configure it and generate the swagger for services written in C#.
Yes, I know, and I said that I'm not aware of such a tool.
I also mentioned that the generation depends on additional information, such as SwaggerResponseAttribute. You don't have such a thing in AX.
I explicitly mentioned both Swashbuckle and SwaggerResponseAttribute in my blog post.
Sure, you could implement both the attributes and the generator that takes them into account, but nothing like that is available at the moment (as far as I know).
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 456 Super User 2025 Season 2
Martin Dráb 429 Most Valuable Professional
BillurSamdancioglu 239 Most Valuable Professional