Display Derived Objects In Swagger Example Values
-
Sorry if this is not the correct forum for discussions on Swagger but I don't know which one is appropriate for it. I have a rest web api created in C# which returns a JSON response containing base objects and their derived objects. In Swagger response body I am able to see both the base objects and derived objects after applying the filters as explained in the post How do I include subclasses in Swagger API documentation using Swashbuckle? - Stack Overflow[^] However, I only see the base objects in the Example Values and not their derived objects. So suppose my JSON contains objects called Dog and Cat which inherit from the Animal object, then only the Animal object will show up in the Example Value but not the Dog or Cat object. Please show me how to modify Swagger Example Value to display base objects and their derived objects. Thanks.
-
Sorry if this is not the correct forum for discussions on Swagger but I don't know which one is appropriate for it. I have a rest web api created in C# which returns a JSON response containing base objects and their derived objects. In Swagger response body I am able to see both the base objects and derived objects after applying the filters as explained in the post How do I include subclasses in Swagger API documentation using Swashbuckle? - Stack Overflow[^] However, I only see the base objects in the Example Values and not their derived objects. So suppose my JSON contains objects called Dog and Cat which inherit from the Animal object, then only the Animal object will show up in the Example Value but not the Dog or Cat object. Please show me how to modify Swagger Example Value to display base objects and their derived objects. Thanks.
-
Sorry if this is not the correct forum for discussions on Swagger but I don't know which one is appropriate for it. I have a rest web api created in C# which returns a JSON response containing base objects and their derived objects. In Swagger response body I am able to see both the base objects and derived objects after applying the filters as explained in the post How do I include subclasses in Swagger API documentation using Swashbuckle? - Stack Overflow[^] However, I only see the base objects in the Example Values and not their derived objects. So suppose my JSON contains objects called Dog and Cat which inherit from the Animal object, then only the Animal object will show up in the Example Value but not the Dog or Cat object. Please show me how to modify Swagger Example Value to display base objects and their derived objects. Thanks.
Best Site in Gaming topwareshop is a brand name in gaming world. We have been providing solution in video games and having best service portfolio.
-
Sorry if this is not the correct forum for discussions on Swagger but I don't know which one is appropriate for it. I have a rest web api created in C# which returns a JSON response containing base objects and their derived objects. In Swagger response body I am able to see both the base objects and derived objects after applying the filters as explained in the post How do I include subclasses in Swagger API documentation using Swashbuckle? - Stack Overflow[^] However, I only see the base objects in the Example Values and not their derived objects. So suppose my JSON contains objects called Dog and Cat which inherit from the Animal object, then only the Animal object will show up in the Example Value but not the Dog or Cat object. Please show me how to modify Swagger Example Value to display base objects and their derived objects. Thanks.
Kindly elaborate more on what exactly you want to modify in Swagger