web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Swagger for D365 FO Custom API's

(0) ShareShare
ReportReport
Posted on by 85

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

I have the same question (0)
  • WillWU Profile Picture
    22,363 on at

    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.

  • Suggested answer
    Rahul Mohta Profile Picture
    21,046 on at
  • AnoopNair Profile Picture
    85 on at

    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.

  • Suggested answer
    Martin Dráb Profile Picture
    239,381 Most Valuable Professional on at

    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... 

  • WillWU Profile Picture
    22,363 on at

    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.

  • AnoopNair Profile Picture
    85 on at

    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#.

  • Verified answer
    Martin Dráb Profile Picture
    239,381 Most Valuable Professional on at

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 646 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans