File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
modules/swagger-codegen/src/main/resources/csharp Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,17 @@ namespace {{packageName}}.Api
166
166
var formParams = new Dictionary<String , String >();
167
167
var fileParams = new Dictionary<String , FileParameter >();
168
168
String postBody = null;
169
-
169
+
170
+ // to determine the Accept header
171
+ String[] http_header_accepts = new String[] {
172
+ {{#produces} }"{ {mediaType} }"{ {#hasMore} }, { {/hasMore} }{ {/produces} }
173
+ };
174
+ String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts);
175
+ if (http_header_accept != null)
176
+ headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts));
177
+
178
+ // set "format" to json by default
179
+ // e.g. /pet/{ petId} .{ format} becomes /pet/{ petId} .json
170
180
pathParams.Add("format", "json");
171
181
{ {#pathParams} }if ({ {paramName} } != null) pathParams.Add("{ {baseName} }", ApiClient.ParameterToString({ {paramName} })); // path parameter
172
182
{ {/pathParams} }
You can’t perform that action at this time.
0 commit comments