[Java][Spring] Resolve serialization warning from RFC3339DateFormat (#6960)

Adds `serialVersionUID` to RFC3339DateFormat.java to avoid Java warning.
This commit is contained in:
Kenny Jones 2017-11-20 23:14:02 -05:00 committed by William Cheng
parent a5e4abe5ec
commit 63fce58931
38 changed files with 76 additions and 56 deletions

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -82,7 +82,7 @@ public interface FakeApi {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));

View File

@ -114,7 +114,7 @@ public interface PetApi {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));
@ -151,7 +151,7 @@ public interface PetApi {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));
@ -186,7 +186,7 @@ public interface PetApi {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));
@ -259,7 +259,7 @@ public interface PetApi {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));

View File

@ -109,7 +109,7 @@ public interface StoreApi {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));
@ -141,7 +141,7 @@ public interface StoreApi {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));

View File

@ -129,7 +129,7 @@ public interface UserApi {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED));
return CompletableFuture.completedFuture(new ResponseEntity<>(getObjectMapper().get().readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED));
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return CompletableFuture.completedFuture(new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR));

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -58,7 +58,7 @@ public class FakeApiController implements FakeApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<OuterComposite>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -61,7 +61,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -84,7 +84,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -107,7 +107,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Pet>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -131,7 +131,7 @@ public class PetApiController implements PetApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<ModelApiResponse>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -69,7 +69,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -92,7 +92,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -70,7 +70,7 @@ public class UserApiController implements UserApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<User>(objectMapper.readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<User>(objectMapper.readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<User>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -58,7 +58,7 @@ public class FakeApiController implements FakeApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<OuterComposite>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -61,7 +61,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -84,7 +84,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -107,7 +107,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Pet>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -131,7 +131,7 @@ public class PetApiController implements PetApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<ModelApiResponse>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -69,7 +69,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -92,7 +92,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -70,7 +70,7 @@ public class UserApiController implements UserApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<User>(objectMapper.readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<User>(objectMapper.readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<User>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -65,7 +65,7 @@ public interface FakeApiDelegate {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -75,7 +75,7 @@ public interface PetApiDelegate {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -102,7 +102,7 @@ public interface PetApiDelegate {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -129,7 +129,7 @@ public interface PetApiDelegate {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -174,7 +174,7 @@ public interface PetApiDelegate {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -81,7 +81,7 @@ public interface StoreApiDelegate {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -108,7 +108,7 @@ public interface StoreApiDelegate {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -95,7 +95,7 @@ public interface UserApiDelegate {
}
if (getAcceptHeader().get().contains("application/json")) {
try {
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<>(getObjectMapper().get().readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -58,7 +58,7 @@ public class FakeApiController implements FakeApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<OuterComposite>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -61,7 +61,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -84,7 +84,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -107,7 +107,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Pet>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -131,7 +131,7 @@ public class PetApiController implements PetApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<ModelApiResponse>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -69,7 +69,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -92,7 +92,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -70,7 +70,7 @@ public class UserApiController implements UserApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<User>(objectMapper.readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<User>(objectMapper.readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<User>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -59,7 +59,7 @@ public class FakeApiController implements FakeApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<OuterComposite>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -62,7 +62,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -85,7 +85,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -108,7 +108,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Pet>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -132,7 +132,7 @@ public class PetApiController implements PetApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<ModelApiResponse>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -70,7 +70,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -93,7 +93,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -71,7 +71,7 @@ public class UserApiController implements UserApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<User>(objectMapper.readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<User>(objectMapper.readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<User>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -9,6 +9,8 @@ import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat {
private static final long serialVersionUID = 1L;
// Same as ISO8601DateFormat but serializing milliseconds.
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {

View File

@ -58,7 +58,7 @@ public class FakeApiController implements FakeApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_string\" : { }, \"my_number\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<OuterComposite>(objectMapper.readValue("{ \"my_number\" : { }, \"my_string\" : { }, \"my_boolean\" : { }}", OuterComposite.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<OuterComposite>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -61,7 +61,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -84,7 +84,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}, { \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<List<Pet>>(objectMapper.readValue("[ { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}, { \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]} ]", List.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<List<Pet>>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -107,7 +107,7 @@ public class PetApiController implements PetApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Pet>(objectMapper.readValue("{ \"tags\" : [ { \"id\" : 1, \"name\" : \"name\" }, { \"id\" : 1, \"name\" : \"name\" } ], \"id\" : 0, \"category\" : { \"id\" : 6, \"name\" : \"name\" }, \"status\" : \"available\", \"name\" : \"doggie\", \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ]}", Pet.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Pet>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -131,7 +131,7 @@ public class PetApiController implements PetApi {
String accept = request.getHeader("Accept");
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<ModelApiResponse>(objectMapper.readValue("{ \"message\" : \"message\", \"code\" : 0, \"type\" : \"type\"}", ModelApiResponse.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<ModelApiResponse>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -69,7 +69,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);
@ -92,7 +92,7 @@ public class StoreApiController implements StoreApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<Order>(objectMapper.readValue("{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<Order>(objectMapper.readValue("{ \"id\" : 0, \"petId\" : 6, \"complete\" : false, \"status\" : \"placed\", \"quantity\" : 1, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\"}", Order.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<Order>(HttpStatus.INTERNAL_SERVER_ERROR);

View File

@ -70,7 +70,7 @@ public class UserApiController implements UserApi {
if (accept != null && accept.contains("application/json")) {
try {
return new ResponseEntity<User>(objectMapper.readValue("{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
return new ResponseEntity<User>(objectMapper.readValue("{ \"id\" : 0, \"lastName\" : \"lastName\", \"phone\" : \"phone\", \"username\" : \"username\", \"email\" : \"email\", \"userStatus\" : 6, \"firstName\" : \"firstName\", \"password\" : \"password\"}", User.class), HttpStatus.NOT_IMPLEMENTED);
} catch (IOException e) {
log.error("Couldn't serialize response for content type application/json", e);
return new ResponseEntity<User>(HttpStatus.INTERNAL_SERVER_ERROR);