C#C
C#3y ago
schwartzmj

❔ Constant string value for discriminator using Swashbuckle

I've spent hours Googling around and testing. I have a simple table-per-hierarchy pattern going on. The discriminator is a string. I want my Swagger endpoint to show the actual string constant instead of string as the value for each model/DTO.

My hope beyond this is that when I generate my Typescript types for the client side, they will also not have a generic string for their types.
Was this page helpful?