pb33f / wiretap

The world's coolest API Validation and compliance tool. Validate APIs against OpenAPI specifications and much more
https://pb33f.io/wiretap/
Other
125 stars 18 forks source link

fix: also consider Accept header in addition to Content-Type #138

Closed macyabbey closed 4 weeks ago

macyabbey commented 1 month ago

Noticed that the Accept header was not considered when wiretap was selecting from possible mock responses, while the Content-Type header was.

This change makes wiretap consider the client's Accept header (as a very basic form of mocking content negotation) when deciding what if any example should be used for a mock response.

macyabbey commented 1 month ago

@daveshanley for your consideration

macyabbey commented 4 weeks ago

@daveshanley Nice! Let me know if I can do anything else to help. FYI I don't have permissions to merge.

image
daveshanley commented 4 weeks ago

@daveshanley Nice! Let me know if I can do anything else to help. FYI I don't have permissions to merge.

Will merge today, thanks!