Open GlenDC opened 7 years ago
by inferring the information from the OpenAPI/Swagger2.0 Spec.
I think this means using the values from runtime.ClientOperation
which most likely comes from a client generated by go-swagger, e.g. comes from the swagger spec.
I will try to find some time in the weekend to work on this unless someone picks it up before.
Go for it @mikkeloscar
Were you in the meanwhile able to have a working version for now, using my steps listed in issue #31?
@GlenDC sorry, I never really got around to this. I realized that it's not that trivial, as you were also suggesting, because you need to implement a consumer/producer for the particular mime type.
For my use case it was the right thing to just use the json consumer like you suggested in #31.
Currently runtime's producers/consumers are statically set via a predefined list. While those defaults might not be bad, this could probably be done smarter, by inferring the information from the OpenAPI/Swagger2.0 Spec.
Relevant TODO: https://github.com/go-openapi/runtime/blob/master/client/runtime.go#L136