Display attribute not displaying in Swagger - EF Core API Core RRS feed

  • Question

  • Our current production API is ASP.Net Web API 2 with EF 6. We have custom DTO models and we use the display attribute as follows:

    [Display(Description = "Some description of this data item")] 

    and the description is showing up just fine in the generated documentation page. We are migrating the API to EF Core 2.1 and WEB API Core and also using Swagger to automatically document the API. The descriptions are not showing up at all in the generated documentation and I can find nothing in the Swagger docs or EF Core docs or googling around for days that even mentions anything about this. Thank You.


    Thursday, October 4, 2018 4:14 PM

All replies

  • Hi JimPEvans,

    Thank you for posting here.

    Since your question is more related to ASP.NET, you could post a new thread in ASP.NET forum for suitable support.


    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 9, 2018 2:13 AM