We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
nolandsmith
I did some digging into your file and I did manage to generate a JSON response but ONLY as an example!!
Look at the file in attachement.
The sole response content type provided by the server is:
Content-Type: text/xml; charset=utf-8
and, I guess, this is the reason why it can't be displayed in JSON (message ref here)
Let us know if you find a solution
Hello nolandsmith
I am not sure why you can't get it.
Can you send your object description?
You can check this example:
1 - You declare your media types
2 - Then you check your object declaration
I took the petstore file example
I hope it can help 😏
Thanks for the support!
I don't even have application/xml as an applicable response content, yet it is still returning XML.
I do know that the API is an XML api (abr.business.gov.au/abrxmlsearch/abrxmlsearch.asmx/SearchByABNv202001). Could this be the reason I am only getting XML, or is there a way for Swagger to be able to return it as JSON?
nolandsmith
I did some digging into your file and I did manage to generate a JSON response but ONLY as an example!!
Look at the file in attachement.
The sole response content type provided by the server is:
Content-Type: text/xml; charset=utf-8
and, I guess, this is the reason why it can't be displayed in JSON (message ref here)
Let us know if you find a solution