forked from loafle/openapi-generator-original
[Java][Native] Fix the Content-Type and Accept headers that were forced to application/json (#11303)
* [Java][Native] Fix the Content-Type and Accept headers that were forced to application/json * Update the generated samples after fixing issue no. 6779
This commit is contained in:
committed by
GitHub
parent
1b6d0f8746
commit
249968e397
@@ -341,9 +341,9 @@ public class {{classname}} {
|
||||
}
|
||||
{{/headerParams}}
|
||||
{{#bodyParam}}
|
||||
localVarRequestBuilder.header("Content-Type", "application/json");
|
||||
localVarRequestBuilder.header("Content-Type", "{{#hasConsumes}}{{#consumes}}{{#-first}}{{mediaType}}{{/-first}}{{/consumes}}{{/hasConsumes}}{{#hasConsumes}}{{^consumes}}application/json{{/consumes}}{{/hasConsumes}}{{^hasConsumes}}application/json{{/hasConsumes}}");
|
||||
{{/bodyParam}}
|
||||
localVarRequestBuilder.header("Accept", "application/json");
|
||||
localVarRequestBuilder.header("Accept", "{{#hasProduces}}{{#produces}}{{mediaType}}{{^-last}}, {{/-last}}{{/produces}}{{/hasProduces}}{{#hasProduces}}{{^produces}}application/json{{/produces}}{{/hasProduces}}{{^hasProduces}}application/json{{/hasProduces}}");
|
||||
|
||||
{{#bodyParam}}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user