myoperator / swagman

A Postman to swagger api converter using openAPI v3
4 stars 1 forks source link

Enforce text example when content header is text/(plain|html) #14

Closed codeasashu closed 5 years ago

codeasashu commented 5 years ago

Currently, the examples are documented as dict without a header check. This is not ideal where the response header has Content-Type: text/plain or Content-Type: text/html headers.

Make sure to convert the examples to plaintexts with abovesaid headers are found in response content-type

codeasashu commented 5 years ago

Closing this as this strategy may not be good. Examples should have exaplanatory names as dict keys so they can be easily referenced to postman from swagger. For example, example body for "Invalid User" makes more sense than "text/html" example.