diff --git a/client/request.go b/client/request.go index 6d9b2591..26c5fdf3 100644 --- a/client/request.go +++ b/client/request.go @@ -298,8 +298,7 @@ func (r *request) buildHTTP(mediaType, basePath string, producers map[string]run // if there is payload, use the producer to write the payload, and then // set the header to the content-type appropriate for the payload produced if r.payload != nil { - // TODO: infer most appropriate content type based on the producer used, - // and the `consumers` section of the spec/operation + // Enhancement proposal: https://github.com/go-openapi/runtime/issues/387 r.header.Set(runtime.HeaderContentType, mediaType) if rdr, ok := r.payload.(io.ReadCloser); ok { body = rdr diff --git a/client/runtime.go b/client/runtime.go index 203c74e4..1771d860 100644 --- a/client/runtime.go +++ b/client/runtime.go @@ -232,7 +232,7 @@ func New(host, basePath string, schemes []string) *Runtime { var rt Runtime rt.DefaultMediaType = runtime.JSONMime - // TODO: actually infer this stuff from the spec + // Enhancement proposal: https://github.com/go-openapi/runtime/issues/385 rt.Consumers = map[string]runtime.Consumer{ runtime.YAMLMime: yamlpc.YAMLConsumer(), runtime.JSONMime: runtime.JSONConsumer(), @@ -532,7 +532,7 @@ func (r *Runtime) createHttpRequest(operation *runtime.ClientOperation) (*reques // } //} - // TODO: pick appropriate media type + // Enhancement proposal: https://github.com/go-openapi/runtime/issues/386 cmt := r.DefaultMediaType for _, mediaType := range operation.ConsumesMediaTypes { // Pick first non-empty media type