Forum Discussion

rodennis's avatar
rodennis
New Member
7 months ago
Solved

Generating a schema for a generic list in c#

Hello im using swagger in a .NET API project, and trying to generate a schema from a generic list in C#. I have a class with a property of applicants, applicants can have types of applicant, or buisn...
  • hammerharshbarg's avatar
    7 months ago

    It looks like you want to generate a specific XML structure in Swagger for your .NET API project. Swagger may not infer the desired structure automatically for pc. To achieve the structure you've shown, you can use XML attributes to specify the structure explicitly. Heres how you can modify your class to achieve the desired XML structure: