danielgtaylor / apisprout

Lightweight, blazing fast, cross-platform OpenAPI 3 mock server with validation
MIT License
697 stars 74 forks source link

Match any media type that seems like JSON or YAML #51

Closed impl closed 5 years ago

impl commented 5 years ago

This change modifies the media type matching to handle vendor-specific media types in addition to the standardized or well-known media types for JSON and YAML.

It additionally moves the HTTP handler out of the main server function and into its own variable, which we can then use *httptest.ResponseRecorder to test against.

impl commented 5 years ago

Thanks! I just rebased it. Glad to see these changes making their way in!