Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Display attribute not displaying in Swagger - EF Core API Core

$
0
0

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.


Jim


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>