mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-04 12:36:09 +00:00
Do not apply content-type header if no request body (#6648)
* Do not apply content-type header if no request body * Set content-type header if there are form params * Add tests * Run update script * Regenerated sample clients
This commit is contained in:
committed by
William Cheng
parent
a8642dbdfc
commit
02bcc55e23
@@ -37,7 +37,6 @@ public interface PetApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("DELETE /pet/{petId}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
"api_key: {apiKey}"
|
||||
})
|
||||
@@ -51,7 +50,6 @@ public interface PetApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByStatus(@Param("status") List<String> status);
|
||||
@@ -73,7 +71,6 @@ public interface PetApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
@@ -97,7 +94,6 @@ public interface PetApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@Param("tags") List<String> tags);
|
||||
@@ -119,7 +115,6 @@ public interface PetApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
List<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
@@ -143,7 +138,6 @@ public interface PetApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /pet/{petId}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
Pet getPetById(@Param("petId") Long petId);
|
||||
|
||||
@@ -22,7 +22,6 @@ public interface StoreApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("DELETE /store/order/{orderId}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
void deleteOrder(@Param("orderId") String orderId);
|
||||
@@ -34,7 +33,6 @@ public interface StoreApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /store/inventory")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
Map<String, Integer> getInventory();
|
||||
@@ -47,7 +45,6 @@ public interface StoreApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /store/order/{orderId}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
Order getOrderById(@Param("orderId") Long orderId);
|
||||
|
||||
@@ -58,7 +58,6 @@ public interface UserApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("DELETE /user/{username}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
void deleteUser(@Param("username") String username);
|
||||
@@ -71,7 +70,6 @@ public interface UserApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /user/{username}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
User getUserByName(@Param("username") String username);
|
||||
@@ -85,7 +83,6 @@ public interface UserApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
String loginUser(@Param("username") String username, @Param("password") String password);
|
||||
@@ -108,7 +105,6 @@ public interface UserApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
@@ -134,7 +130,6 @@ public interface UserApi extends ApiClient.Api {
|
||||
*/
|
||||
@RequestLine("GET /user/logout")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
void logoutUser();
|
||||
|
||||
@@ -235,7 +235,6 @@
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
@@ -235,7 +235,6 @@
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
||||
Reference in New Issue
Block a user