mleiseca
6 years agoFrequent Visitor
Response schema for text/csv
I have a couple of questions for specifying the response format:
(1) If you specify a "text/csv" mime type and then specify a nested object as the response schema, what's the output supposed to look like? For example, if you 'User' below as a text/csv response, what should the csv look like?
components: schemas: User: type: object properties: id: type: integer name: type: string contact_info: $ref: '#/components/schemas/ContactInfo' ContactInfo: type: object properties: email: type: string format: email phone: type: string
(2) Is there some tool that will validate a response body (or maybe just a file) against the schema defined? It would be handy to be able to test that output is actually valid.