mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 22:56:10 +00:00
Fix the fake endpoint example. Now all cases are handled by the java play framework! (#6850)
This commit is contained in:
committed by
wing328
parent
e7594c42d0
commit
16373b9f70
@@ -159,7 +159,7 @@ public class FakeApiController extends Controller {
|
||||
String valuenumber = (request().body().asMultipartFormData().asFormUrlEncoded().get("number"))[0];
|
||||
BigDecimal number;
|
||||
if (valuenumber != null) {
|
||||
number = Float.parseFloat(valuenumber);
|
||||
number = new BigDecimal(valuenumber);
|
||||
} else {
|
||||
throw new IllegalArgumentException("'number' parameter is required");
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class FakeApiController extends Controller {
|
||||
String value_byte = (request().body().asMultipartFormData().asFormUrlEncoded().get("byte"))[0];
|
||||
byte[] _byte;
|
||||
if (value_byte != null) {
|
||||
_byte = value_byte;
|
||||
_byte = value_byte.getBytes();
|
||||
} else {
|
||||
throw new IllegalArgumentException("'byte' parameter is required");
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
@Override
|
||||
public Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new Boolean();
|
||||
return new Boolean(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,7 +29,7 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
@Override
|
||||
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws Exception {
|
||||
//Do your magic!!!
|
||||
return new BigDecimal();
|
||||
return new BigDecimal(1.0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,25 +47,21 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
||||
@Override
|
||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testInlineAdditionalProperties(Object param) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void testJsonFormData(String param, String param2) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,13 +15,11 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
@Override
|
||||
public void addPet(Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePet(Long petId, String apiKey) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,13 +43,11 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||
@Override
|
||||
public void updatePet(Pet body) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePetWithForm(Long petId, String name, String status) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,7 +14,6 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
||||
@Override
|
||||
public void deleteOrder(String orderId) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,25 +14,21 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
@Override
|
||||
public void createUser(User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteUser(String username) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,13 +46,11 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||
@Override
|
||||
public void logoutUser() throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUser(String username, User body) throws Exception {
|
||||
//Do your magic!!!
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -978,7 +978,8 @@
|
||||
}
|
||||
},
|
||||
"x-contentType" : "application/json",
|
||||
"x-accepts" : "application/json"
|
||||
"x-accepts" : "application/json",
|
||||
"missingReturnInfoIfNeeded" : "1.0"
|
||||
}
|
||||
},
|
||||
"/fake/outer/string" : {
|
||||
@@ -1030,7 +1031,8 @@
|
||||
}
|
||||
},
|
||||
"x-contentType" : "application/json",
|
||||
"x-accepts" : "application/json"
|
||||
"x-accepts" : "application/json",
|
||||
"missingReturnInfoIfNeeded" : "true"
|
||||
}
|
||||
},
|
||||
"/fake/outer/composite" : {
|
||||
|
||||
Reference in New Issue
Block a user