Skip to content

Commit

Permalink
fix parameter ordering for RequestBody.create (OpenAPITools#13778) (O…
Browse files Browse the repository at this point in the history
  • Loading branch information
ashatch authored Oct 22, 2022
1 parent 643b4f7 commit 9e5c919
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ public class ApiClient {
}
return RequestBody.create(content, MediaType.parse(contentType));
} else if (obj instanceof String) {
return RequestBody.create(MediaType.parse(contentType), (String) obj);
return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
}
return RequestBody.create(content, MediaType.parse(contentType));
} else if (obj instanceof String) {
return RequestBody.create(MediaType.parse(contentType), (String) obj);
return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
}
return RequestBody.create(content, MediaType.parse(contentType));
} else if (obj instanceof String) {
return RequestBody.create(MediaType.parse(contentType), (String) obj);
return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
}
return RequestBody.create(content, MediaType.parse(contentType));
} else if (obj instanceof String) {
return RequestBody.create(MediaType.parse(contentType), (String) obj);
return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
}
return RequestBody.create(content, MediaType.parse(contentType));
} else if (obj instanceof String) {
return RequestBody.create(MediaType.parse(contentType), (String) obj);
return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException
}
return RequestBody.create(content, MediaType.parse(contentType));
} else if (obj instanceof String) {
return RequestBody.create(MediaType.parse(contentType), (String) obj);
return RequestBody.create((String) obj, MediaType.parse(contentType));
} else {
throw new ApiException("Content type \"" + contentType + "\" is not supported");
}
Expand Down

0 comments on commit 9e5c919

Please sign in to comment.