I have Web API which is set to return data in JSON format. I am including attribute [ResponseType(typeof(Class_Name))]
for each Action
method so that api documentation (swagger) will show sample response format for each api.
Due to some reason, I want to return XML response for one of the api. Since I have set JSON as the default response type, the attribute [ResponseType(typeof(Class_Name))]
for that particular api is showing response in JSON format.
Is there any way, I can show XML response for that single api? Is it possible to achieve the same by settings any attributes or some quick hacks?