redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Response example generation for XML and CSV

Open rishitank opened this issue 1 year ago • 4 comments

What/Why/How?

As part of implementing api-docs at Adthena, we had the need to auto-generate response examples for XML and CSV based on the OpenAPI schema provided.

  • This PR implements XML and CSV response example generation for Redoc if a response example is not provided.
  • The code for XML generation was adapted from RapiDoc's implementation and ported over to TypeScript.
  • The feature can be enabled via a redoc option.

Reference

Testing

Screenshots (optional)

Check yourself

  • [x] Code is linted
  • [x] Tested
  • [x] All new/updated code is covered with tests

rishitank avatar Jun 29 '23 08:06 rishitank