From eff4f3aa5a75baff11589c118f8e054f1cfdd121 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 10 Jul 2016 23:04:56 +0600 Subject: [PATCH 1/6] Fix offsetDateTime and remove unnecessary override annotations --- .../JavaJaxRS/resteasy/JodaDateTimeProvider.mustache | 3 --- .../JavaJaxRS/resteasy/JodaLocalDateProvider.mustache | 3 --- .../JavaJaxRS/resteasy/LocalDateProvider.mustache | 3 --- .../JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache | 7 ++----- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache index 8010eb85f93..74c24c87770 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaDateTimeProvider.mustache @@ -15,7 +15,6 @@ public class JodaDateTimeProvider implements ParamConverterProvider { public static class JodaDateTimeConverter implements ParamConverter { - @Override public DateTime fromString(String string) { try { DateTime dateTime = DateTime.parse(string); @@ -26,13 +25,11 @@ public class JodaDateTimeProvider implements ParamConverterProvider { } } - @Override public String toString(DateTime t) { return t.toString(); } } - @Override public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { if (DateTime.class.equals(type)) { return (ParamConverter) new JodaDateTimeConverter(); diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache index 6227bf6df27..0b28c915dd9 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/JodaLocalDateProvider.mustache @@ -15,7 +15,6 @@ public class JodaLocalDateProvider implements ParamConverterProvider { public static class JodaLocalDateConverter implements ParamConverter { - @Override public LocalDate fromString(String string) { try { LocalDate localDate = LocalDate.parse(string); @@ -26,13 +25,11 @@ public class JodaLocalDateProvider implements ParamConverterProvider { } } - @Override public String toString(LocalDate t) { return t.toString(); } } - @Override public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { if (LocalDate.class.equals(type)) { return (ParamConverter) new JodaLocalDateConverter(); diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache index cf52264a1f4..a57e3e74750 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/LocalDateProvider.mustache @@ -12,19 +12,16 @@ public class LocalDateProvider implements ParamConverterProvider { public static class LocalDateConverter implements ParamConverter { - @Override public LocalDate fromString(String string) { LocalDate localDate = LocalDate.parse(string); return localDate; } - @Override public String toString(LocalDate t) { return t.toString(); } } - @Override public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { if (LocalDate.class.equals(type)) { return (ParamConverter) new LocalDateConverter(); diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache index f24dabbe283..a3974c3c533 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/OffsetDateTimeProvider.mustache @@ -12,19 +12,16 @@ public class OffsetDateTimeProvider implements ParamConverterProvider { public static class OffsetDateTimeConverter implements ParamConverter { - @Override public OffsetDateTime fromString(String string) { - OffsetDateTime OffsetDateTime = OffsetDateTime.parse(string); - return OffsetDateTime; + OffsetDateTime offsetDateTime = OffsetDateTime.parse(string); + return offsetDateTime; } - @Override public String toString(OffsetDateTime t) { return t.toString(); } } - @Override public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { if (OffsetDateTime.class.equals(type)) { return (ParamConverter) new OffsetDateTimeConverter(); From f9e6ef4ec0946dc66ebd6e75df77fb326711a576 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 22 Jul 2016 08:12:17 +0600 Subject: [PATCH 2/6] Update petstore samples to CI for resteasy testing --- .../gen/java/io/swagger/api/ApiException.java | 12 +- .../java/io/swagger/api/ApiOriginFilter.java | 22 ++-- .../io/swagger/api/ApiResponseMessage.java | 110 ++++++++-------- .../io/swagger/api/NotFoundException.java | 12 +- .../src/gen/java/io/swagger/api/PetApi.java | 117 ++++++++++++++++-- .../java/io/swagger/api/PetApiService.java | 30 ++--- .../src/gen/java/io/swagger/api/StoreApi.java | 39 +++++- .../java/io/swagger/api/StoreApiService.java | 15 +-- .../gen/java/io/swagger/api/StringUtil.java | 2 +- .../src/gen/java/io/swagger/api/UserApi.java | 65 ++++++++-- .../java/io/swagger/api/UserApiService.java | 27 ++-- .../gen/java/io/swagger/model/Category.java | 16 ++- .../io/swagger/model/ModelApiResponse.java | 22 +++- .../src/gen/java/io/swagger/model/Order.java | 51 ++++++-- .../src/gen/java/io/swagger/model/Pet.java | 51 ++++++-- .../src/gen/java/io/swagger/model/Tag.java | 16 ++- .../src/gen/java/io/swagger/model/User.java | 52 +++++++- .../gen/java/io/swagger/api/ApiException.java | 12 +- .../java/io/swagger/api/ApiOriginFilter.java | 22 ++-- .../io/swagger/api/ApiResponseMessage.java | 110 ++++++++-------- .../java/io/swagger/api/JacksonConfig.java | 1 + .../io/swagger/api/JodaDateTimeProvider.java | 62 +++++----- .../io/swagger/api/JodaLocalDateProvider.java | 62 +++++----- .../io/swagger/api/NotFoundException.java | 12 +- .../src/gen/java/io/swagger/api/PetApi.java | 117 ++++++++++++++++-- .../java/io/swagger/api/PetApiService.java | 30 ++--- .../src/gen/java/io/swagger/api/StoreApi.java | 39 +++++- .../java/io/swagger/api/StoreApiService.java | 15 +-- .../gen/java/io/swagger/api/StringUtil.java | 2 +- .../src/gen/java/io/swagger/api/UserApi.java | 65 ++++++++-- .../java/io/swagger/api/UserApiService.java | 27 ++-- .../gen/java/io/swagger/model/Category.java | 16 ++- .../io/swagger/model/ModelApiResponse.java | 22 +++- .../src/gen/java/io/swagger/model/Order.java | 51 ++++++-- .../src/gen/java/io/swagger/model/Pet.java | 51 ++++++-- .../src/gen/java/io/swagger/model/Tag.java | 16 ++- .../src/gen/java/io/swagger/model/User.java | 52 +++++++- 37 files changed, 1035 insertions(+), 408 deletions(-) diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java index 32c1e58df06..97e535d3c21 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java @@ -1,10 +1,10 @@ package io.swagger.api; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class ApiException extends Exception{ - private int code; - public ApiException (int code, String msg) { - super(msg); - this.code = code; - } + private int code; + public ApiException (int code, String msg) { + super(msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java index eeb813c3a22..38791eef046 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java @@ -5,18 +5,18 @@ import javax.servlet.*; import javax.servlet.http.HttpServletResponse; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class ApiOriginFilter implements javax.servlet.Filter { - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } - public void destroy() {} + public void destroy() {} - public void init(FilterConfig filterConfig) throws ServletException {} + public void init(FilterConfig filterConfig) throws ServletException {} } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java index a9534f09f5d..87db95c1009 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java @@ -3,67 +3,67 @@ import javax.xml.bind.annotation.XmlTransient; @javax.xml.bind.annotation.XmlRootElement -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; + public static final int ERROR = 1; + public static final int WARNING = 2; + public static final int INFO = 3; + public static final int OK = 4; + public static final int TOO_BUSY = 5; + + int code; + String type; + String message; + + public ApiResponseMessage(){} - int code; - String type; - String message; - - public ApiResponseMessage(){} - - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } + public ApiResponseMessage(int code, String message){ + this.code = code; + switch(code){ + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } - @XmlTransient - public int getCode() { - return code; - } + @XmlTransient + public int getCode() { + return code; + } - public void setCode(int code) { - this.code = code; - } + public void setCode(int code) { + this.code = code; + } - public String getType() { - return type; - } + public String getType() { + return type; + } - public void setType(String type) { - this.type = type; - } + public void setType(String type) { + this.type = type; + } - public String getMessage() { - return message; - } + public String getMessage() { + return message; + } - public void setMessage(String message) { - this.message = message; - } + public void setMessage(String message) { + this.message = message; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java index 6379b2b4499..b28b67ea4b2 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java @@ -1,10 +1,10 @@ package io.swagger.api; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class NotFoundException extends ApiException { - private int code; - public NotFoundException (int code, String msg) { - super(code, msg); - this.code = code; - } + private int code; + public NotFoundException (int code, String msg) { + super(code, msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java index 8b3ec467613..319a3d87cad 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java @@ -4,25 +4,30 @@ import io.swagger.api.PetApiService; import io.swagger.api.factories.PetApiServiceFactory; +import io.swagger.annotations.ApiParam; + import io.swagger.model.Pet; -import java.io.File; import io.swagger.model.ModelApiResponse; +import java.io.File; import java.util.List; import io.swagger.api.NotFoundException; import java.io.InputStream; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @Path("/pet") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") +@io.swagger.annotations.Api(description = "the pet API") + public class PetApi { private final PetApiService delegate = PetApiServiceFactory.getPetApi(); @@ -30,7 +35,16 @@ public class PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - public Response addPet( Pet body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); } @@ -38,7 +52,17 @@ public Response addPet( Pet body,@Context SecurityContext securityContext) @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - public Response deletePet( @PathParam("petId") Long petId,@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) + public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deletePet(petId,apiKey,securityContext); } @@ -46,7 +70,18 @@ public Response deletePet( @PathParam("petId") Long petId,@HeaderParam("api_key" @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - public Response findPetsByStatus( @QueryParam("status") List status,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true) @QueryParam("status") List status +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); } @@ -54,7 +89,18 @@ public Response findPetsByStatus( @QueryParam("status") List status,@Con @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - public Response findPetsByTags( @QueryParam("tags") List tags,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) + public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); } @@ -62,7 +108,17 @@ public Response findPetsByTags( @QueryParam("tags") List tags,@Context S @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) + public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); } @@ -70,7 +126,20 @@ public Response getPetById( @PathParam("petId") Long petId,@Context SecurityCont @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - public Response updatePet( Pet body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); } @@ -78,7 +147,18 @@ public Response updatePet( Pet body,@Context SecurityContext securityContext) @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) - public Response updatePetWithForm( @PathParam("petId") Long petId,@FormParam("name") String name,@FormParam("status") String status,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status,securityContext); } @@ -86,8 +166,21 @@ public Response updatePetWithForm( @PathParam("petId") Long petId,@FormParam("na @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - public Response uploadFile(MultipartFormDataInput input, @PathParam("petId") Long petId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Additional data to pass to server") @FormParam("additionalMetadata") String additionalMetadata +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.uploadFile(input,petId,securityContext); + return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java index 0d3e9bb280a..1b39321b392 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java @@ -2,12 +2,12 @@ import io.swagger.api.*; import io.swagger.model.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.Pet; -import java.io.File; import io.swagger.model.ModelApiResponse; +import java.io.File; import java.util.List; import io.swagger.api.NotFoundException; @@ -17,22 +17,14 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public abstract class PetApiService { - public abstract Response addPet(Pet body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) - throws NotFoundException; - public abstract Response findPetsByStatus(List status,SecurityContext securityContext) - throws NotFoundException; - public abstract Response findPetsByTags(List tags,SecurityContext securityContext) - throws NotFoundException; - public abstract Response getPetById(Long petId,SecurityContext securityContext) - throws NotFoundException; - public abstract Response updatePet(Pet body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) - throws NotFoundException; - public abstract Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) - throws NotFoundException; + public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByStatus(List status,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByTags(List tags,SecurityContext securityContext) throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java index 2fdc2718271..64a5103af62 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java @@ -4,6 +4,8 @@ import io.swagger.api.StoreApiService; import io.swagger.api.factories.StoreApiServiceFactory; +import io.swagger.annotations.ApiParam; + import java.util.Map; import io.swagger.model.Order; @@ -12,6 +14,9 @@ import java.io.InputStream; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,7 +25,8 @@ @Path("/store") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") +@io.swagger.annotations.Api(description = "the store API") + public class StoreApi { private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); @@ -28,7 +34,13 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - public Response deleteOrder( @PathParam("orderId") String orderId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); } @@ -36,6 +48,11 @@ public Response deleteOrder( @PathParam("orderId") String orderId,@Context Secur @Path("/inventory") @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) public Response getInventory(@Context SecurityContext securityContext) throws NotFoundException { return delegate.getInventory(securityContext); @@ -44,7 +61,15 @@ public Response getInventory(@Context SecurityContext securityContext) @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - public Response getOrderById( @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); } @@ -52,7 +77,13 @@ public Response getOrderById( @PathParam("orderId") Long orderId,@Context Securi @Path("/order") @Produces({ "application/xml", "application/json" }) - public Response placeOrder( Order body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java index f4b9a5ad692..5ef766d6aa7 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java @@ -3,6 +3,7 @@ import io.swagger.api.*; import io.swagger.model.*; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import java.util.Map; import io.swagger.model.Order; @@ -15,14 +16,10 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public abstract class StoreApiService { - public abstract Response deleteOrder(String orderId,SecurityContext securityContext) - throws NotFoundException; - public abstract Response getInventory(SecurityContext securityContext) - throws NotFoundException; - public abstract Response getOrderById(Long orderId,SecurityContext securityContext) - throws NotFoundException; - public abstract Response placeOrder(Order body,SecurityContext securityContext) - throws NotFoundException; + public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; + public abstract Response getOrderById(Long orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StringUtil.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StringUtil.java index 2fb1f82f391..6f4a3dadbbf 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StringUtil.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StringUtil.java @@ -1,6 +1,6 @@ package io.swagger.api; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java index 195e99f1a20..f21efff1ec0 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java @@ -4,6 +4,8 @@ import io.swagger.api.UserApiService; import io.swagger.api.factories.UserApiServiceFactory; +import io.swagger.annotations.ApiParam; + import io.swagger.model.User; import java.util.List; @@ -12,6 +14,9 @@ import java.io.InputStream; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,7 +25,8 @@ @Path("/user") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") +@io.swagger.annotations.Api(description = "the user API") + public class UserApi { private final UserApiService delegate = UserApiServiceFactory.getUserApi(); @@ -28,7 +34,11 @@ public class UserApi { @Produces({ "application/xml", "application/json" }) - public Response createUser( User body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); } @@ -36,7 +46,11 @@ public Response createUser( User body,@Context SecurityContext securityContext) @Path("/createWithArray") @Produces({ "application/xml", "application/json" }) - public Response createUsersWithArrayInput( List body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); } @@ -44,7 +58,11 @@ public Response createUsersWithArrayInput( List body,@Context SecurityCont @Path("/createWithList") @Produces({ "application/xml", "application/json" }) - public Response createUsersWithListInput( List body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); } @@ -52,7 +70,13 @@ public Response createUsersWithListInput( List body,@Context SecurityConte @Path("/{username}") @Produces({ "application/xml", "application/json" }) - public Response deleteUser( @PathParam("username") String username,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); } @@ -60,7 +84,15 @@ public Response deleteUser( @PathParam("username") String username,@Context Secu @Path("/{username}") @Produces({ "application/xml", "application/json" }) - public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); } @@ -68,7 +100,14 @@ public Response getUserByName( @PathParam("username") String username,@Context S @Path("/login") @Produces({ "application/xml", "application/json" }) - public Response loginUser( @QueryParam("username") String username, @QueryParam("password") String password,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) + public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username +,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); } @@ -76,6 +115,9 @@ public Response loginUser( @QueryParam("username") String username, @QueryParam( @Path("/logout") @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response logoutUser(@Context SecurityContext securityContext) throws NotFoundException { return delegate.logoutUser(securityContext); @@ -84,7 +126,14 @@ public Response logoutUser(@Context SecurityContext securityContext) @Path("/{username}") @Produces({ "application/xml", "application/json" }) - public Response updateUser( @PathParam("username") String username, User body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username +,@ApiParam(value = "Updated user object" ,required=true) User body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username,body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java index dc81bf13cb6..ceff72b6391 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java @@ -3,6 +3,7 @@ import io.swagger.api.*; import io.swagger.model.*; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.User; import java.util.List; @@ -15,22 +16,14 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public abstract class UserApiService { - public abstract Response createUser(User body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response deleteUser(String username,SecurityContext securityContext) - throws NotFoundException; - public abstract Response getUserByName(String username,SecurityContext securityContext) - throws NotFoundException; - public abstract Response loginUser(String username,String password,SecurityContext securityContext) - throws NotFoundException; - public abstract Response logoutUser(SecurityContext securityContext) - throws NotFoundException; - public abstract Response updateUser(String username,User body,SecurityContext securityContext) - throws NotFoundException; + public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response loginUser(String username,String password,SecurityContext securityContext) throws NotFoundException; + public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; + public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java index 172a2ce4436..cfd5770c9a4 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + + public class Category { private Long id = null; @@ -15,7 +15,13 @@ public class Category { /** **/ + public Category id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +32,13 @@ public void setId(Long id) { /** **/ + public Category name(String name) { + this.name = name; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java index c55816bd394..4a8b79726b2 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + + public class ModelApiResponse { private Integer code = null; @@ -16,7 +16,13 @@ public class ModelApiResponse { /** **/ + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -27,7 +33,13 @@ public void setCode(Integer code) { /** **/ + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("type") public String getType() { return type; @@ -38,7 +50,13 @@ public void setType(String type) { /** **/ + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java index 3d62d7e86e0..cfbcc45677f 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java @@ -1,7 +1,6 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; @@ -9,7 +8,8 @@ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + + public class Order { private Long id = null; @@ -17,15 +17,12 @@ public class Order { private Integer quantity = null; private Date shipDate = null; - /** - * Order Status - */ + public enum StatusEnum { PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); - APPROVED("approved"), - - DELIVERED("delivered"); private String value; StatusEnum(String value) { @@ -35,7 +32,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return String.valueOf(value); + return value; } } @@ -44,7 +41,13 @@ public String toString() { /** **/ + public Order id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -55,7 +58,13 @@ public void setId(Long id) { /** **/ + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -66,7 +75,13 @@ public void setPetId(Long petId) { /** **/ + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -77,7 +92,13 @@ public void setQuantity(Integer quantity) { /** **/ + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") public Date getShipDate() { return shipDate; @@ -89,7 +110,13 @@ public void setShipDate(Date shipDate) { /** * Order Status **/ + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + @ApiModelProperty(example = "null", value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -100,7 +127,13 @@ public void setStatus(StatusEnum status) { /** **/ + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java index 8fa4e7486d8..c11683f766d 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java @@ -1,7 +1,6 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.model.Category; @@ -11,7 +10,8 @@ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + + public class Pet { private Long id = null; @@ -20,15 +20,12 @@ public class Pet { private List photoUrls = new ArrayList(); private List tags = new ArrayList(); - /** - * pet status in the store - */ + public enum StatusEnum { AVAILABLE("available"), + PENDING("pending"), + SOLD("sold"); - PENDING("pending"), - - SOLD("sold"); private String value; StatusEnum(String value) { @@ -38,7 +35,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return String.valueOf(value); + return value; } } @@ -46,7 +43,13 @@ public String toString() { /** **/ + public Pet id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -57,7 +60,13 @@ public void setId(Long id) { /** **/ + public Pet category(Category category) { + this.category = category; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -68,7 +77,13 @@ public void setCategory(Category category) { /** **/ + public Pet name(String name) { + this.name = name; + return this; + } + + @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") public String getName() { return name; @@ -79,7 +94,13 @@ public void setName(String name) { /** **/ + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + @ApiModelProperty(example = "null", required = true, value = "") @JsonProperty("photoUrls") public List getPhotoUrls() { return photoUrls; @@ -90,7 +111,13 @@ public void setPhotoUrls(List photoUrls) { /** **/ + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -102,7 +129,13 @@ public void setTags(List tags) { /** * pet status in the store **/ + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java index 7018295e7f9..e8a0876ab9a 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + + public class Tag { private Long id = null; @@ -15,7 +15,13 @@ public class Tag { /** **/ + public Tag id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +32,13 @@ public void setId(Long id) { /** **/ + public Tag name(String name) { + this.name = name; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java index abfecb310fd..9444f84c43c 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + + public class User { private Long id = null; @@ -21,7 +21,13 @@ public class User { /** **/ + public User id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,7 +38,13 @@ public void setId(Long id) { /** **/ + public User username(String username) { + this.username = username; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("username") public String getUsername() { return username; @@ -43,7 +55,13 @@ public void setUsername(String username) { /** **/ + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -54,7 +72,13 @@ public void setFirstName(String firstName) { /** **/ + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -65,7 +89,13 @@ public void setLastName(String lastName) { /** **/ + public User email(String email) { + this.email = email; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("email") public String getEmail() { return email; @@ -76,7 +106,13 @@ public void setEmail(String email) { /** **/ + public User password(String password) { + this.password = password; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("password") public String getPassword() { return password; @@ -87,7 +123,13 @@ public void setPassword(String password) { /** **/ + public User phone(String phone) { + this.phone = phone; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -99,7 +141,13 @@ public void setPhone(String phone) { /** * User Status **/ + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + @ApiModelProperty(example = "null", value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java index 9614941b59f..97e535d3c21 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java @@ -1,10 +1,10 @@ package io.swagger.api; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class ApiException extends Exception{ - private int code; - public ApiException (int code, String msg) { - super(msg); - this.code = code; - } + private int code; + public ApiException (int code, String msg) { + super(msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java index e3ed722543c..38791eef046 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java @@ -5,18 +5,18 @@ import javax.servlet.*; import javax.servlet.http.HttpServletResponse; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class ApiOriginFilter implements javax.servlet.Filter { - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } - public void destroy() {} + public void destroy() {} - public void init(FilterConfig filterConfig) throws ServletException {} + public void init(FilterConfig filterConfig) throws ServletException {} } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java index fcaebb85946..87db95c1009 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java @@ -3,67 +3,67 @@ import javax.xml.bind.annotation.XmlTransient; @javax.xml.bind.annotation.XmlRootElement -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; + public static final int ERROR = 1; + public static final int WARNING = 2; + public static final int INFO = 3; + public static final int OK = 4; + public static final int TOO_BUSY = 5; + + int code; + String type; + String message; + + public ApiResponseMessage(){} - int code; - String type; - String message; - - public ApiResponseMessage(){} - - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } + public ApiResponseMessage(int code, String message){ + this.code = code; + switch(code){ + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } - @XmlTransient - public int getCode() { - return code; - } + @XmlTransient + public int getCode() { + return code; + } - public void setCode(int code) { - this.code = code; - } + public void setCode(int code) { + this.code = code; + } - public String getType() { - return type; - } + public String getType() { + return type; + } - public void setType(String type) { - this.type = type; - } + public void setType(String type) { + this.type = type; + } - public String getMessage() { - return message; - } + public String getMessage() { + return message; + } - public void setMessage(String message) { - this.message = message; - } + public void setMessage(String message) { + this.message = message; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java index a2360fcc82b..0d69172c2cd 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java @@ -40,6 +40,7 @@ public void serialize(LocalDate value, JsonGenerator jgen, SerializerProvider pr }); } + @Override public ObjectMapper getContext(Class arg0) { return objectMapper; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java index 918d08ac95d..707b57ce552 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java @@ -1,42 +1,44 @@ package io.swagger.api; -import org.joda.time.DateTime; -import javax.ws.rs.ext.ParamConverter; -import javax.ws.rs.ext.ParamConverterProvider; -import javax.ws.rs.ext.Provider; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; +import com.sun.jersey.core.spi.component.ComponentContext; +import com.sun.jersey.spi.inject.Injectable; +import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; + +import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; - +import javax.ws.rs.core.Response.Status; +import javax.ws.rs.core.UriInfo; +import javax.ws.rs.ext.Provider; +import org.joda.time.DateTime; +import java.util.List; @Provider -public class JodaDateTimeProvider implements ParamConverterProvider { +public class JodaDateTimeProvider extends PerRequestTypeInjectableProvider { + private final UriInfo uriInfo; - public static class JodaDateTimeConverter implements ParamConverter { - - @Override - public DateTime fromString(String string) { - try { - DateTime dateTime = DateTime.parse(string); - return dateTime; - } catch (Exception e) { - throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). - entity(string + " must be valid DateTime").build()); - } - } - - @Override - public String toString(DateTime t) { - return t.toString(); - } + public JodaDateTimeProvider(@Context UriInfo uriInfo) { + super(DateTime.class); + this.uriInfo = uriInfo; } @Override - public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { - if (DateTime.class.equals(type)) { - return (ParamConverter) new JodaDateTimeConverter(); - } - return null; + public Injectable getInjectable(final ComponentContext cc, final QueryParam a) { + return new Injectable() { + @Override + public DateTime getValue() { + final List values = uriInfo.getQueryParameters().get(a.value()); + + if (values == null || values.isEmpty()) + return null; + if (values.size() > 1) { + throw new WebApplicationException(Response.status(Status.BAD_REQUEST). + entity(a.value() + " cannot contain multiple values").build()); + } + + return DateTime.parse(values.get(0)); + } + }; } } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java index a4298e4f6ea..d6b7386f0d2 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java @@ -1,42 +1,44 @@ package io.swagger.api; -import org.joda.time.LocalDate; -import javax.ws.rs.ext.ParamConverter; -import javax.ws.rs.ext.ParamConverterProvider; -import javax.ws.rs.ext.Provider; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; +import com.sun.jersey.core.spi.component.ComponentContext; +import com.sun.jersey.spi.inject.Injectable; +import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; + +import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; - +import javax.ws.rs.core.Response.Status; +import javax.ws.rs.core.UriInfo; +import javax.ws.rs.ext.Provider; +import org.joda.time.LocalDate; +import java.util.List; @Provider -public class JodaLocalDateProvider implements ParamConverterProvider { - - public static class JodaLocalDateConverter implements ParamConverter { +public class JodaLocalDateProvider extends PerRequestTypeInjectableProvider { + private final UriInfo uriInfo; - @Override - public LocalDate fromString(String string) { - try { - LocalDate localDate = LocalDate.parse(string); - return localDate; - } catch (Exception e) { - throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). - entity(string + " must be valid LocalDate").build()); - } - } - - @Override - public String toString(LocalDate t) { - return t.toString(); - } + public JodaLocalDateProvider(@Context UriInfo uriInfo) { + super(LocalDate.class); + this.uriInfo = uriInfo; } @Override - public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { - if (LocalDate.class.equals(type)) { - return (ParamConverter) new JodaLocalDateConverter(); - } - return null; + public Injectable getInjectable(final ComponentContext cc, final QueryParam a) { + return new Injectable() { + @Override + public LocalDate getValue() { + final List values = uriInfo.getQueryParameters().get(a.value()); + + if (values == null || values.isEmpty()) + return null; + if (values.size() > 1) { + throw new WebApplicationException(Response.status(Status.BAD_REQUEST). + entity(a.value() + " cannot contain multiple values").build()); + } + + return LocalDate.parse(values.get(0)); + } + }; } } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java index ddb41ff1ac0..b28b67ea4b2 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java @@ -1,10 +1,10 @@ package io.swagger.api; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class NotFoundException extends ApiException { - private int code; - public NotFoundException (int code, String msg) { - super(code, msg); - this.code = code; - } + private int code; + public NotFoundException (int code, String msg) { + super(code, msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java index b879a0f1a89..319a3d87cad 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java @@ -4,25 +4,30 @@ import io.swagger.api.PetApiService; import io.swagger.api.factories.PetApiServiceFactory; +import io.swagger.annotations.ApiParam; + import io.swagger.model.Pet; -import java.io.File; import io.swagger.model.ModelApiResponse; +import java.io.File; import java.util.List; import io.swagger.api.NotFoundException; import java.io.InputStream; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @Path("/pet") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") +@io.swagger.annotations.Api(description = "the pet API") + public class PetApi { private final PetApiService delegate = PetApiServiceFactory.getPetApi(); @@ -30,7 +35,16 @@ public class PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - public Response addPet( Pet body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); } @@ -38,7 +52,17 @@ public Response addPet( Pet body,@Context SecurityContext securityContext) @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - public Response deletePet( @PathParam("petId") Long petId,@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) + public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deletePet(petId,apiKey,securityContext); } @@ -46,7 +70,18 @@ public Response deletePet( @PathParam("petId") Long petId,@HeaderParam("api_key" @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - public Response findPetsByStatus( @QueryParam("status") List status,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) + public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true) @QueryParam("status") List status +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); } @@ -54,7 +89,18 @@ public Response findPetsByStatus( @QueryParam("status") List status,@Con @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - public Response findPetsByTags( @QueryParam("tags") List tags,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) + public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); } @@ -62,7 +108,17 @@ public Response findPetsByTags( @QueryParam("tags") List tags,@Context S @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) + public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); } @@ -70,7 +126,20 @@ public Response getPetById( @PathParam("petId") Long petId,@Context SecurityCont @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - public Response updatePet( Pet body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) + public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); } @@ -78,7 +147,18 @@ public Response updatePet( Pet body,@Context SecurityContext securityContext) @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) - public Response updatePetWithForm( @PathParam("petId") Long petId,@FormParam("name") String name,@FormParam("status") String status,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) + public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name +,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status,securityContext); } @@ -86,8 +166,21 @@ public Response updatePetWithForm( @PathParam("petId") Long petId,@FormParam("na @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - public Response uploadFile(MultipartFormDataInput input, @PathParam("petId") Long petId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { + @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { + @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), + @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") + }) + }, tags={ "pet", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) + public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId +,@ApiParam(value = "Additional data to pass to server") @FormParam("additionalMetadata") String additionalMetadata +, + @FormDataParam("file") InputStream fileInputStream, + @FormDataParam("file") FormDataContentDisposition fileDetail +,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.uploadFile(input,petId,securityContext); + return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java index 1902d3d3a8e..1b39321b392 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java @@ -2,12 +2,12 @@ import io.swagger.api.*; import io.swagger.model.*; -import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.Pet; -import java.io.File; import io.swagger.model.ModelApiResponse; +import java.io.File; import java.util.List; import io.swagger.api.NotFoundException; @@ -17,22 +17,14 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public abstract class PetApiService { - public abstract Response addPet(Pet body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) - throws NotFoundException; - public abstract Response findPetsByStatus(List status,SecurityContext securityContext) - throws NotFoundException; - public abstract Response findPetsByTags(List tags,SecurityContext securityContext) - throws NotFoundException; - public abstract Response getPetById(Long petId,SecurityContext securityContext) - throws NotFoundException; - public abstract Response updatePet(Pet body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) - throws NotFoundException; - public abstract Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) - throws NotFoundException; + public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByStatus(List status,SecurityContext securityContext) throws NotFoundException; + public abstract Response findPetsByTags(List tags,SecurityContext securityContext) throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; + public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java index 09b8dcc2518..64a5103af62 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java @@ -4,6 +4,8 @@ import io.swagger.api.StoreApiService; import io.swagger.api.factories.StoreApiServiceFactory; +import io.swagger.annotations.ApiParam; + import java.util.Map; import io.swagger.model.Order; @@ -12,6 +14,9 @@ import java.io.InputStream; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,7 +25,8 @@ @Path("/store") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") +@io.swagger.annotations.Api(description = "the store API") + public class StoreApi { private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); @@ -28,7 +34,13 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - public Response deleteOrder( @PathParam("orderId") String orderId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) + public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); } @@ -36,6 +48,11 @@ public Response deleteOrder( @PathParam("orderId") String orderId,@Context Secur @Path("/inventory") @Produces({ "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { + @io.swagger.annotations.Authorization(value = "api_key") + }, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) public Response getInventory(@Context SecurityContext securityContext) throws NotFoundException { return delegate.getInventory(securityContext); @@ -44,7 +61,15 @@ public Response getInventory(@Context SecurityContext securityContext) @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - public Response getOrderById( @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) + public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); } @@ -52,7 +77,13 @@ public Response getOrderById( @PathParam("orderId") Long orderId,@Context Securi @Path("/order") @Produces({ "application/xml", "application/json" }) - public Response placeOrder( Order body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) + public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java index 9adc467a735..5ef766d6aa7 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java @@ -3,6 +3,7 @@ import io.swagger.api.*; import io.swagger.model.*; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import java.util.Map; import io.swagger.model.Order; @@ -15,14 +16,10 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public abstract class StoreApiService { - public abstract Response deleteOrder(String orderId,SecurityContext securityContext) - throws NotFoundException; - public abstract Response getInventory(SecurityContext securityContext) - throws NotFoundException; - public abstract Response getOrderById(Long orderId,SecurityContext securityContext) - throws NotFoundException; - public abstract Response placeOrder(Order body,SecurityContext securityContext) - throws NotFoundException; + public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; + public abstract Response getOrderById(Long orderId,SecurityContext securityContext) throws NotFoundException; + public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StringUtil.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StringUtil.java index 128c83a4abd..6f4a3dadbbf 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StringUtil.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StringUtil.java @@ -1,6 +1,6 @@ package io.swagger.api; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java index 7e6ac878913..f21efff1ec0 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java @@ -4,6 +4,8 @@ import io.swagger.api.UserApiService; import io.swagger.api.factories.UserApiServiceFactory; +import io.swagger.annotations.ApiParam; + import io.swagger.model.User; import java.util.List; @@ -12,6 +14,9 @@ import java.io.InputStream; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.FormDataParam; + import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -20,7 +25,8 @@ @Path("/user") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") +@io.swagger.annotations.Api(description = "the user API") + public class UserApi { private final UserApiService delegate = UserApiServiceFactory.getUserApi(); @@ -28,7 +34,11 @@ public class UserApi { @Produces({ "application/xml", "application/json" }) - public Response createUser( User body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); } @@ -36,7 +46,11 @@ public Response createUser( User body,@Context SecurityContext securityContext) @Path("/createWithArray") @Produces({ "application/xml", "application/json" }) - public Response createUsersWithArrayInput( List body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); } @@ -44,7 +58,11 @@ public Response createUsersWithArrayInput( List body,@Context SecurityCont @Path("/createWithList") @Produces({ "application/xml", "application/json" }) - public Response createUsersWithListInput( List body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) + public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); } @@ -52,7 +70,13 @@ public Response createUsersWithListInput( List body,@Context SecurityConte @Path("/{username}") @Produces({ "application/xml", "application/json" }) - public Response deleteUser( @PathParam("username") String username,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); } @@ -60,7 +84,15 @@ public Response deleteUser( @PathParam("username") String username,@Context Secu @Path("/{username}") @Produces({ "application/xml", "application/json" }) - public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) + public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); } @@ -68,7 +100,14 @@ public Response getUserByName( @PathParam("username") String username,@Context S @Path("/login") @Produces({ "application/xml", "application/json" }) - public Response loginUser( @QueryParam("username") String username, @QueryParam("password") String password,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), + + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) + public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username +,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); } @@ -76,6 +115,9 @@ public Response loginUser( @QueryParam("username") String username, @QueryParam( @Path("/logout") @Produces({ "application/xml", "application/json" }) + @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response logoutUser(@Context SecurityContext securityContext) throws NotFoundException { return delegate.logoutUser(securityContext); @@ -84,7 +126,14 @@ public Response logoutUser(@Context SecurityContext securityContext) @Path("/{username}") @Produces({ "application/xml", "application/json" }) - public Response updateUser( @PathParam("username") String username, User body,@Context SecurityContext securityContext) + @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) + @io.swagger.annotations.ApiResponses(value = { + @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), + + @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) + public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username +,@ApiParam(value = "Updated user object" ,required=true) User body +,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username,body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java index fdbeb37c6b8..ceff72b6391 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java @@ -3,6 +3,7 @@ import io.swagger.api.*; import io.swagger.model.*; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.User; import java.util.List; @@ -15,22 +16,14 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public abstract class UserApiService { - public abstract Response createUser(User body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) - throws NotFoundException; - public abstract Response deleteUser(String username,SecurityContext securityContext) - throws NotFoundException; - public abstract Response getUserByName(String username,SecurityContext securityContext) - throws NotFoundException; - public abstract Response loginUser(String username,String password,SecurityContext securityContext) - throws NotFoundException; - public abstract Response logoutUser(SecurityContext securityContext) - throws NotFoundException; - public abstract Response updateUser(String username,User body,SecurityContext securityContext) - throws NotFoundException; + public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; + public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; + public abstract Response loginUser(String username,String password,SecurityContext securityContext) throws NotFoundException; + public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; + public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java index 8e4077bf511..cfd5770c9a4 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + + public class Category { private Long id = null; @@ -15,7 +15,13 @@ public class Category { /** **/ + public Category id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +32,13 @@ public void setId(Long id) { /** **/ + public Category name(String name) { + this.name = name; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java index 96b11ce19e5..4a8b79726b2 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + + public class ModelApiResponse { private Integer code = null; @@ -16,7 +16,13 @@ public class ModelApiResponse { /** **/ + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -27,7 +33,13 @@ public void setCode(Integer code) { /** **/ + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("type") public String getType() { return type; @@ -38,7 +50,13 @@ public void setType(String type) { /** **/ + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java index 843d9b91421..1dab5ca3b04 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java @@ -1,7 +1,6 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import org.joda.time.DateTime; @@ -9,7 +8,8 @@ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + + public class Order { private Long id = null; @@ -17,15 +17,12 @@ public class Order { private Integer quantity = null; private DateTime shipDate = null; - /** - * Order Status - */ + public enum StatusEnum { PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); - APPROVED("approved"), - - DELIVERED("delivered"); private String value; StatusEnum(String value) { @@ -35,7 +32,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return String.valueOf(value); + return value; } } @@ -44,7 +41,13 @@ public String toString() { /** **/ + public Order id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -55,7 +58,13 @@ public void setId(Long id) { /** **/ + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -66,7 +75,13 @@ public void setPetId(Long petId) { /** **/ + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -77,7 +92,13 @@ public void setQuantity(Integer quantity) { /** **/ + public Order shipDate(DateTime shipDate) { + this.shipDate = shipDate; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") public DateTime getShipDate() { return shipDate; @@ -89,7 +110,13 @@ public void setShipDate(DateTime shipDate) { /** * Order Status **/ + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + @ApiModelProperty(example = "null", value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -100,7 +127,13 @@ public void setStatus(StatusEnum status) { /** **/ + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java index f367b3e32b6..c11683f766d 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java @@ -1,7 +1,6 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.model.Category; @@ -11,7 +10,8 @@ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + + public class Pet { private Long id = null; @@ -20,15 +20,12 @@ public class Pet { private List photoUrls = new ArrayList(); private List tags = new ArrayList(); - /** - * pet status in the store - */ + public enum StatusEnum { AVAILABLE("available"), + PENDING("pending"), + SOLD("sold"); - PENDING("pending"), - - SOLD("sold"); private String value; StatusEnum(String value) { @@ -38,7 +35,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return String.valueOf(value); + return value; } } @@ -46,7 +43,13 @@ public String toString() { /** **/ + public Pet id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -57,7 +60,13 @@ public void setId(Long id) { /** **/ + public Pet category(Category category) { + this.category = category; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -68,7 +77,13 @@ public void setCategory(Category category) { /** **/ + public Pet name(String name) { + this.name = name; + return this; + } + + @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") public String getName() { return name; @@ -79,7 +94,13 @@ public void setName(String name) { /** **/ + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + @ApiModelProperty(example = "null", required = true, value = "") @JsonProperty("photoUrls") public List getPhotoUrls() { return photoUrls; @@ -90,7 +111,13 @@ public void setPhotoUrls(List photoUrls) { /** **/ + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -102,7 +129,13 @@ public void setTags(List tags) { /** * pet status in the store **/ + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java index 3815af34412..e8a0876ab9a 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + + public class Tag { private Long id = null; @@ -15,7 +15,13 @@ public class Tag { /** **/ + public Tag id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -26,7 +32,13 @@ public void setId(Long id) { /** **/ + public Tag name(String name) { + this.name = name; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java index 45464c9de08..9444f84c43c 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; -import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + + public class User { private Long id = null; @@ -21,7 +21,13 @@ public class User { /** **/ + public User id(Long id) { + this.id = id; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,7 +38,13 @@ public void setId(Long id) { /** **/ + public User username(String username) { + this.username = username; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("username") public String getUsername() { return username; @@ -43,7 +55,13 @@ public void setUsername(String username) { /** **/ + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -54,7 +72,13 @@ public void setFirstName(String firstName) { /** **/ + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -65,7 +89,13 @@ public void setLastName(String lastName) { /** **/ + public User email(String email) { + this.email = email; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("email") public String getEmail() { return email; @@ -76,7 +106,13 @@ public void setEmail(String email) { /** **/ + public User password(String password) { + this.password = password; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("password") public String getPassword() { return password; @@ -87,7 +123,13 @@ public void setPassword(String password) { /** **/ + public User phone(String phone) { + this.phone = phone; + return this; + } + + @ApiModelProperty(example = "null", value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -99,7 +141,13 @@ public void setPhone(String phone) { /** * User Status **/ + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + @ApiModelProperty(example = "null", value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; From 9993de2b15831fc6b7f83b1608e7167cf7543676 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 27 Jul 2016 23:59:56 +0700 Subject: [PATCH 3/6] fix resteasy templates path --- bin/jaxrs-resteasy-joda-petstore-server.sh | 2 +- bin/jaxrs-resteasy-petstore-server.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/jaxrs-resteasy-joda-petstore-server.sh b/bin/jaxrs-resteasy-joda-petstore-server.sh index c1bbf6d71bf..d8ec8826868 100755 --- a/bin/jaxrs-resteasy-joda-petstore-server.sh +++ b/bin/jaxrs-resteasy-joda-petstore-server.sh @@ -26,6 +26,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json" +ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-petstore-server.sh b/bin/jaxrs-resteasy-petstore-server.sh index 8fb30411d64..702763e0720 100755 --- a/bin/jaxrs-resteasy-petstore-server.sh +++ b/bin/jaxrs-resteasy-petstore-server.sh @@ -26,6 +26,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true" +ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default -DhideGenerationTimestamp=true" java $JAVA_OPTS -jar $executable $ags From b39fa5d1aa28959ec0b6ee33d7304dd33a2a17b9 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Jul 2016 00:17:02 +0700 Subject: [PATCH 4/6] add ability to hide generated annotations --- .../resources/JavaJaxRS/resteasy/generatedAnnotation.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache index 49110fc1ad9..a47b6faa85b 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/generatedAnnotation.mustache @@ -1 +1 @@ -@javax.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}") \ No newline at end of file +{{^hideGenerationTimestamp}}@javax.annotation.Generated(value = "{{generatorClass}}", date = "{{generatedDate}}"){{/hideGenerationTimestamp}} \ No newline at end of file From f8fc9c032248d4aaeaab923d1644fb09b2290843 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Jul 2016 00:17:59 +0700 Subject: [PATCH 5/6] Update petstore resteasy samples --- .../petstore/jaxrs-resteasy/default/pom.xml | 2 +- .../gen/java/io/swagger/api/ApiException.java | 10 +- .../java/io/swagger/api/ApiOriginFilter.java | 20 ++-- .../io/swagger/api/ApiResponseMessage.java | 108 ++++++++--------- .../io/swagger/api/NotFoundException.java | 10 +- .../src/gen/java/io/swagger/api/PetApi.java | 113 ++---------------- .../java/io/swagger/api/PetApiService.java | 26 ++-- .../src/gen/java/io/swagger/api/StoreApi.java | 37 +----- .../java/io/swagger/api/StoreApiService.java | 13 +- .../src/gen/java/io/swagger/api/UserApi.java | 63 ++-------- .../java/io/swagger/api/UserApiService.java | 25 ++-- .../gen/java/io/swagger/model/Category.java | 14 +-- .../io/swagger/model/ModelApiResponse.java | 20 +--- .../src/gen/java/io/swagger/model/Order.java | 49 ++------ .../src/gen/java/io/swagger/model/Pet.java | 49 ++------ .../src/gen/java/io/swagger/model/Tag.java | 14 +-- .../src/gen/java/io/swagger/model/User.java | 50 +------- .../api/factories/PetApiServiceFactory.java | 2 +- .../api/factories/StoreApiServiceFactory.java | 2 +- .../api/factories/UserApiServiceFactory.java | 2 +- .../swagger/api/impl/PetApiServiceImpl.java | 4 +- .../swagger/api/impl/StoreApiServiceImpl.java | 2 +- .../swagger/api/impl/UserApiServiceImpl.java | 2 +- .../main/io/swagger/api/ApiException.class | Bin 427 -> 0 bytes .../main/io/swagger/api/ApiOriginFilter.class | Bin 1459 -> 0 bytes .../io/swagger/api/ApiResponseMessage.class | Bin 1661 -> 0 bytes .../io/swagger/api/JacksonConfig$1$1.class | Bin 1929 -> 0 bytes .../io/swagger/api/JacksonConfig$1$2.class | Bin 1922 -> 0 bytes .../main/io/swagger/api/JacksonConfig$1.class | Bin 941 -> 0 bytes .../main/io/swagger/api/JacksonConfig.class | Bin 1426 -> 0 bytes ...teTimeProvider$JodaDateTimeConverter.class | Bin 2119 -> 0 bytes .../io/swagger/api/JodaDateTimeProvider.class | Bin 1233 -> 0 bytes ...lDateProvider$JodaLocalDateConverter.class | Bin 2133 -> 0 bytes .../swagger/api/JodaLocalDateProvider.class | Bin 1240 -> 0 bytes .../io/swagger/api/NotFoundException.class | Bin 427 -> 0 bytes .../classes/main/io/swagger/api/PetApi.class | Bin 3755 -> 0 bytes .../main/io/swagger/api/PetApiService.class | Bin 1357 -> 0 bytes .../main/io/swagger/api/RestApplication.class | Bin 401 -> 0 bytes .../main/io/swagger/api/StoreApi.class | Bin 2045 -> 0 bytes .../main/io/swagger/api/StoreApiService.class | Bin 802 -> 0 bytes .../main/io/swagger/api/StringUtil.class | Bin 1220 -> 0 bytes .../classes/main/io/swagger/api/UserApi.class | Bin 3324 -> 0 bytes .../main/io/swagger/api/UserApiService.class | Bin 1292 -> 0 bytes .../api/factories/PetApiServiceFactory.class | Bin 593 -> 0 bytes .../factories/StoreApiServiceFactory.class | Bin 607 -> 0 bytes .../api/factories/UserApiServiceFactory.class | Bin 600 -> 0 bytes .../swagger/api/impl/PetApiServiceImpl.class | Bin 2914 -> 0 bytes .../api/impl/StoreApiServiceImpl.class | Bin 1730 -> 0 bytes .../swagger/api/impl/UserApiServiceImpl.class | Bin 2707 -> 0 bytes .../main/io/swagger/model/Category.class | Bin 2122 -> 0 bytes .../io/swagger/model/ModelApiResponse.class | Bin 2459 -> 0 bytes .../io/swagger/model/Order$StatusEnum.class | Bin 1570 -> 0 bytes .../classes/main/io/swagger/model/Order.class | Bin 3712 -> 0 bytes .../io/swagger/model/Pet$StatusEnum.class | Bin 1548 -> 0 bytes .../classes/main/io/swagger/model/Pet.class | Bin 4000 -> 0 bytes .../classes/main/io/swagger/model/Tag.class | Bin 2097 -> 0 bytes .../classes/main/io/swagger/model/User.class | Bin 3908 -> 0 bytes .../petstore/jaxrs-resteasy/joda/pom.xml | 6 +- .../gen/java/io/swagger/api/ApiException.java | 10 +- .../java/io/swagger/api/ApiOriginFilter.java | 20 ++-- .../io/swagger/api/ApiResponseMessage.java | 108 ++++++++--------- .../java/io/swagger/api/JacksonConfig.java | 1 - .../io/swagger/api/JodaDateTimeProvider.java | 59 +++++---- .../io/swagger/api/JodaLocalDateProvider.java | 59 +++++---- .../io/swagger/api/NotFoundException.java | 10 +- .../src/gen/java/io/swagger/api/PetApi.java | 113 ++---------------- .../java/io/swagger/api/PetApiService.java | 26 ++-- .../src/gen/java/io/swagger/api/StoreApi.java | 37 +----- .../java/io/swagger/api/StoreApiService.java | 13 +- .../src/gen/java/io/swagger/api/UserApi.java | 63 ++-------- .../java/io/swagger/api/UserApiService.java | 25 ++-- .../gen/java/io/swagger/model/Category.java | 14 +-- .../io/swagger/model/ModelApiResponse.java | 20 +--- .../src/gen/java/io/swagger/model/Order.java | 49 ++------ .../src/gen/java/io/swagger/model/Pet.java | 49 ++------ .../src/gen/java/io/swagger/model/Tag.java | 14 +-- .../src/gen/java/io/swagger/model/User.java | 50 +------- .../api/factories/PetApiServiceFactory.java | 2 +- .../api/factories/StoreApiServiceFactory.java | 2 +- .../api/factories/UserApiServiceFactory.java | 2 +- .../swagger/api/impl/PetApiServiceImpl.java | 4 +- .../swagger/api/impl/StoreApiServiceImpl.java | 2 +- .../swagger/api/impl/UserApiServiceImpl.java | 2 +- 83 files changed, 382 insertions(+), 1015 deletions(-) delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiException.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiOriginFilter.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiResponseMessage.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1$1.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1$2.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaDateTimeProvider$JodaDateTimeConverter.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaDateTimeProvider.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaLocalDateProvider$JodaLocalDateConverter.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaLocalDateProvider.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/NotFoundException.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/PetApi.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/PetApiService.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/RestApplication.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StoreApi.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StoreApiService.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StringUtil.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/UserApi.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/UserApiService.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/PetApiServiceFactory.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/StoreApiServiceFactory.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/UserApiServiceFactory.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/PetApiServiceImpl.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/StoreApiServiceImpl.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/UserApiServiceImpl.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Category.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/ModelApiResponse.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Order$StatusEnum.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Order.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Pet$StatusEnum.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Pet.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Tag.class delete mode 100644 samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/User.class diff --git a/samples/server/petstore/jaxrs-resteasy/default/pom.xml b/samples/server/petstore/jaxrs-resteasy/default/pom.xml index 3fe937dbc9b..cac0fffc5ac 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/default/pom.xml @@ -145,7 +145,7 @@ - 1.5.8 + 1.5.9 9.2.9.v20150224 3.0.11.Final 1.6.3 diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java index 97e535d3c21..7fa61c50d24 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiException.java @@ -2,9 +2,9 @@ public class ApiException extends Exception{ - private int code; - public ApiException (int code, String msg) { - super(msg); - this.code = code; - } + private int code; + public ApiException (int code, String msg) { + super(msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java index 38791eef046..2dc07362c92 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiOriginFilter.java @@ -7,16 +7,16 @@ public class ApiOriginFilter implements javax.servlet.Filter { - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } - public void destroy() {} + public void destroy() {} - public void init(FilterConfig filterConfig) throws ServletException {} + public void init(FilterConfig filterConfig) throws ServletException {} } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java index 87db95c1009..33f95878e54 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/ApiResponseMessage.java @@ -5,65 +5,65 @@ @javax.xml.bind.annotation.XmlRootElement public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; + public static final int ERROR = 1; + public static final int WARNING = 2; + public static final int INFO = 3; + public static final int OK = 4; + public static final int TOO_BUSY = 5; - int code; - String type; - String message; + int code; + String type; + String message; + + public ApiResponseMessage(){} + + public ApiResponseMessage(int code, String message){ + this.code = code; + switch(code){ + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } - public ApiResponseMessage(){} + @XmlTransient + public int getCode() { + return code; + } - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } + public void setCode(int code) { + this.code = code; + } - @XmlTransient - public int getCode() { - return code; - } + public String getType() { + return type; + } - public void setCode(int code) { - this.code = code; - } + public void setType(String type) { + this.type = type; + } - public String getType() { - return type; - } + public String getMessage() { + return message; + } - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } + public void setMessage(String message) { + this.message = message; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java index b28b67ea4b2..295109d7fc4 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/NotFoundException.java @@ -2,9 +2,9 @@ public class NotFoundException extends ApiException { - private int code; - public NotFoundException (int code, String msg) { - super(code, msg); - this.code = code; - } + private int code; + public NotFoundException (int code, String msg) { + super(code, msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java index 319a3d87cad..3a52f62afd4 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApi.java @@ -4,8 +4,6 @@ import io.swagger.api.PetApiService; import io.swagger.api.factories.PetApiServiceFactory; -import io.swagger.annotations.ApiParam; - import io.swagger.model.Pet; import io.swagger.model.ModelApiResponse; import java.io.File; @@ -15,18 +13,15 @@ import java.io.InputStream; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @Path("/pet") -@io.swagger.annotations.Api(description = "the pet API") public class PetApi { private final PetApiService delegate = PetApiServiceFactory.getPetApi(); @@ -35,16 +30,7 @@ public class PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body -,@Context SecurityContext securityContext) + public Response addPet( Pet body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); } @@ -52,17 +38,7 @@ public Response addPet(@ApiParam(value = "Pet object that needs to be added to t @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey -,@Context SecurityContext securityContext) + public Response deletePet( @PathParam("petId") Long petId,@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deletePet(petId,apiKey,securityContext); } @@ -70,18 +46,7 @@ public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @P @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true) @QueryParam("status") List status -,@Context SecurityContext securityContext) + public Response findPetsByStatus( @QueryParam("status") List status,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); } @@ -89,18 +54,7 @@ public Response findPetsByStatus(@ApiParam(value = "Status values that need to b @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags -,@Context SecurityContext securityContext) + public Response findPetsByTags( @QueryParam("tags") List tags,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); } @@ -108,17 +62,7 @@ public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=tr @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { - @io.swagger.annotations.Authorization(value = "api_key") - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) - public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId -,@Context SecurityContext securityContext) + public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); } @@ -126,20 +70,7 @@ public Response getPetById(@ApiParam(value = "ID of pet to return",required=true @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body -,@Context SecurityContext securityContext) + public Response updatePet( Pet body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); } @@ -147,18 +78,7 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name -,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status -,@Context SecurityContext securityContext) + public Response updatePetWithForm( @PathParam("petId") Long petId,@FormParam("name") String name,@FormParam("status") String status,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status,securityContext); } @@ -166,21 +86,8 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Additional data to pass to server") @FormParam("additionalMetadata") String additionalMetadata -, - @FormDataParam("file") InputStream fileInputStream, - @FormDataParam("file") FormDataContentDisposition fileDetail -,@Context SecurityContext securityContext) + public Response uploadFile(MultipartFormDataInput input, @PathParam("petId") Long petId,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); + return delegate.uploadFile(input,petId,securityContext); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java index 1b39321b392..5a9683f311e 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/PetApiService.java @@ -2,8 +2,8 @@ import io.swagger.api.*; import io.swagger.model.*; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.Pet; import io.swagger.model.ModelApiResponse; @@ -19,12 +19,20 @@ public abstract class PetApiService { - public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; - public abstract Response findPetsByStatus(List status,SecurityContext securityContext) throws NotFoundException; - public abstract Response findPetsByTags(List tags,SecurityContext securityContext) throws NotFoundException; - public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; - public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response addPet(Pet body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) + throws NotFoundException; + public abstract Response findPetsByStatus(List status,SecurityContext securityContext) + throws NotFoundException; + public abstract Response findPetsByTags(List tags,SecurityContext securityContext) + throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) + throws NotFoundException; + public abstract Response updatePet(Pet body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) + throws NotFoundException; + public abstract Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java index 64a5103af62..dcc585fabc2 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApi.java @@ -4,8 +4,6 @@ import io.swagger.api.StoreApiService; import io.swagger.api.factories.StoreApiServiceFactory; -import io.swagger.annotations.ApiParam; - import java.util.Map; import io.swagger.model.Order; @@ -14,9 +12,6 @@ import java.io.InputStream; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -25,7 +20,6 @@ @Path("/store") -@io.swagger.annotations.Api(description = "the store API") public class StoreApi { private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); @@ -34,13 +28,7 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId -,@Context SecurityContext securityContext) + public Response deleteOrder( @PathParam("orderId") String orderId,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); } @@ -48,11 +36,6 @@ public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be @Path("/inventory") @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - @io.swagger.annotations.Authorization(value = "api_key") - }, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) public Response getInventory(@Context SecurityContext securityContext) throws NotFoundException { return delegate.getInventory(securityContext); @@ -61,15 +44,7 @@ public Response getInventory(@Context SecurityContext securityContext) @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId -,@Context SecurityContext securityContext) + public Response getOrderById( @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); } @@ -77,13 +52,7 @@ public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetch @Path("/order") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body -,@Context SecurityContext securityContext) + public Response placeOrder( Order body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java index 5ef766d6aa7..2174b1b3547 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/StoreApiService.java @@ -3,7 +3,6 @@ import io.swagger.api.*; import io.swagger.model.*; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import java.util.Map; import io.swagger.model.Order; @@ -18,8 +17,12 @@ public abstract class StoreApiService { - public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; - public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; - public abstract Response getOrderById(Long orderId,SecurityContext securityContext) throws NotFoundException; - public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; + public abstract Response deleteOrder(String orderId,SecurityContext securityContext) + throws NotFoundException; + public abstract Response getInventory(SecurityContext securityContext) + throws NotFoundException; + public abstract Response getOrderById(Long orderId,SecurityContext securityContext) + throws NotFoundException; + public abstract Response placeOrder(Order body,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java index f21efff1ec0..ad69b39c570 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApi.java @@ -4,8 +4,6 @@ import io.swagger.api.UserApiService; import io.swagger.api.factories.UserApiServiceFactory; -import io.swagger.annotations.ApiParam; - import io.swagger.model.User; import java.util.List; @@ -14,9 +12,6 @@ import java.io.InputStream; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -25,7 +20,6 @@ @Path("/user") -@io.swagger.annotations.Api(description = "the user API") public class UserApi { private final UserApiService delegate = UserApiServiceFactory.getUserApi(); @@ -34,11 +28,7 @@ public class UserApi { @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body -,@Context SecurityContext securityContext) + public Response createUser( User body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); } @@ -46,11 +36,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru @Path("/createWithArray") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body -,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput( List body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); } @@ -58,11 +44,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @Path("/createWithList") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body -,@Context SecurityContext securityContext) + public Response createUsersWithListInput( List body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); } @@ -70,13 +52,7 @@ public Response createUsersWithListInput(@ApiParam(value = "List of user object" @Path("/{username}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username -,@Context SecurityContext securityContext) + public Response deleteUser( @PathParam("username") String username,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); } @@ -84,15 +60,7 @@ public Response deleteUser(@ApiParam(value = "The name that needs to be deleted" @Path("/{username}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) - public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username -,@Context SecurityContext securityContext) + public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); } @@ -100,14 +68,7 @@ public Response getUserByName(@ApiParam(value = "The name that needs to be fetch @Path("/login") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username -,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password -,@Context SecurityContext securityContext) + public Response loginUser( @QueryParam("username") String username, @QueryParam("password") String password,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); } @@ -115,9 +76,6 @@ public Response loginUser(@ApiParam(value = "The user name for login",required=t @Path("/logout") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response logoutUser(@Context SecurityContext securityContext) throws NotFoundException { return delegate.logoutUser(securityContext); @@ -126,14 +84,7 @@ public Response logoutUser(@Context SecurityContext securityContext) @Path("/{username}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username -,@ApiParam(value = "Updated user object" ,required=true) User body -,@Context SecurityContext securityContext) + public Response updateUser( @PathParam("username") String username, User body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username,body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java index ceff72b6391..5cfa9359e6b 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/api/UserApiService.java @@ -3,7 +3,6 @@ import io.swagger.api.*; import io.swagger.model.*; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.User; import java.util.List; @@ -18,12 +17,20 @@ public abstract class UserApiService { - public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; - public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; - public abstract Response loginUser(String username,String password,SecurityContext securityContext) throws NotFoundException; - public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; - public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUser(User body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response deleteUser(String username,SecurityContext securityContext) + throws NotFoundException; + public abstract Response getUserByName(String username,SecurityContext securityContext) + throws NotFoundException; + public abstract Response loginUser(String username,String password,SecurityContext securityContext) + throws NotFoundException; + public abstract Response logoutUser(SecurityContext securityContext) + throws NotFoundException; + public abstract Response updateUser(String username,User body,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java index cfd5770c9a4..3ba941f57f4 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class Category { private Long id = null; @@ -15,13 +15,7 @@ public class Category { /** **/ - public Category id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,13 +26,7 @@ public void setId(Long id) { /** **/ - public Category name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java index 4a8b79726b2..80a37b57648 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class ModelApiResponse { private Integer code = null; @@ -16,13 +16,7 @@ public class ModelApiResponse { /** **/ - public ModelApiResponse code(Integer code) { - this.code = code; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -33,13 +27,7 @@ public void setCode(Integer code) { /** **/ - public ModelApiResponse type(String type) { - this.type = type; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("type") public String getType() { return type; @@ -50,13 +38,7 @@ public void setType(String type) { /** **/ - public ModelApiResponse message(String message) { - this.message = message; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java index cfbcc45677f..9e8529a6efd 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import java.util.Date; @@ -9,7 +10,6 @@ - public class Order { private Long id = null; @@ -17,12 +17,15 @@ public class Order { private Integer quantity = null; private Date shipDate = null; - + /** + * Order Status + */ public enum StatusEnum { PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); + APPROVED("approved"), + + DELIVERED("delivered"); private String value; StatusEnum(String value) { @@ -32,7 +35,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return value; + return String.valueOf(value); } } @@ -41,13 +44,7 @@ public String toString() { /** **/ - public Order id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -58,13 +55,7 @@ public void setId(Long id) { /** **/ - public Order petId(Long petId) { - this.petId = petId; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -75,13 +66,7 @@ public void setPetId(Long petId) { /** **/ - public Order quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -92,13 +77,7 @@ public void setQuantity(Integer quantity) { /** **/ - public Order shipDate(Date shipDate) { - this.shipDate = shipDate; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") public Date getShipDate() { return shipDate; @@ -110,13 +89,7 @@ public void setShipDate(Date shipDate) { /** * Order Status **/ - public Order status(StatusEnum status) { - this.status = status; - return this; - } - - @ApiModelProperty(example = "null", value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -127,13 +100,7 @@ public void setStatus(StatusEnum status) { /** **/ - public Order complete(Boolean complete) { - this.complete = complete; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java index c11683f766d..92e9f34c765 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.model.Category; @@ -11,7 +12,6 @@ - public class Pet { private Long id = null; @@ -20,12 +20,15 @@ public class Pet { private List photoUrls = new ArrayList(); private List tags = new ArrayList(); - + /** + * pet status in the store + */ public enum StatusEnum { AVAILABLE("available"), - PENDING("pending"), - SOLD("sold"); + PENDING("pending"), + + SOLD("sold"); private String value; StatusEnum(String value) { @@ -35,7 +38,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return value; + return String.valueOf(value); } } @@ -43,13 +46,7 @@ public String toString() { /** **/ - public Pet id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -60,13 +57,7 @@ public void setId(Long id) { /** **/ - public Pet category(Category category) { - this.category = category; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -77,13 +68,7 @@ public void setCategory(Category category) { /** **/ - public Pet name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") public String getName() { return name; @@ -94,13 +79,7 @@ public void setName(String name) { /** **/ - public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - @ApiModelProperty(example = "null", required = true, value = "") @JsonProperty("photoUrls") public List getPhotoUrls() { return photoUrls; @@ -111,13 +90,7 @@ public void setPhotoUrls(List photoUrls) { /** **/ - public Pet tags(List tags) { - this.tags = tags; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -129,13 +102,7 @@ public void setTags(List tags) { /** * pet status in the store **/ - public Pet status(StatusEnum status) { - this.status = status; - return this; - } - - @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java index e8a0876ab9a..9a7d194b1ac 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class Tag { private Long id = null; @@ -15,13 +15,7 @@ public class Tag { /** **/ - public Tag id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,13 +26,7 @@ public void setId(Long id) { /** **/ - public Tag name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java index 9444f84c43c..c1e17bb2cfd 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class User { private Long id = null; @@ -21,13 +21,7 @@ public class User { /** **/ - public User id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -38,13 +32,7 @@ public void setId(Long id) { /** **/ - public User username(String username) { - this.username = username; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("username") public String getUsername() { return username; @@ -55,13 +43,7 @@ public void setUsername(String username) { /** **/ - public User firstName(String firstName) { - this.firstName = firstName; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -72,13 +54,7 @@ public void setFirstName(String firstName) { /** **/ - public User lastName(String lastName) { - this.lastName = lastName; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -89,13 +65,7 @@ public void setLastName(String lastName) { /** **/ - public User email(String email) { - this.email = email; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("email") public String getEmail() { return email; @@ -106,13 +76,7 @@ public void setEmail(String email) { /** **/ - public User password(String password) { - this.password = password; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("password") public String getPassword() { return password; @@ -123,13 +87,7 @@ public void setPassword(String password) { /** **/ - public User phone(String phone) { - this.phone = phone; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -141,13 +99,7 @@ public void setPhone(String phone) { /** * User Status **/ - public User userStatus(Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - @ApiModelProperty(example = "null", value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java index e191d6bbd95..54ae4b48435 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java @@ -3,7 +3,7 @@ import io.swagger.api.PetApiService; import io.swagger.api.impl.PetApiServiceImpl; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class PetApiServiceFactory { private final static PetApiService service = new PetApiServiceImpl(); diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java index 3f8808798dd..79a403fee06 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java @@ -3,7 +3,7 @@ import io.swagger.api.StoreApiService; import io.swagger.api.impl.StoreApiServiceImpl; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class StoreApiServiceFactory { private final static StoreApiService service = new StoreApiServiceImpl(); diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java index 1efe9e725df..2f1ae542f1b 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java @@ -3,7 +3,7 @@ import io.swagger.api.UserApiService; import io.swagger.api.impl.UserApiServiceImpl; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class UserApiServiceFactory { private final static UserApiService service = new UserApiServiceImpl(); diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index 7bc1c47236d..86b35a56fce 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -6,8 +6,8 @@ import io.swagger.model.Pet; -import java.io.File; import io.swagger.model.ModelApiResponse; +import java.io.File; import java.util.List; import io.swagger.api.NotFoundException; @@ -17,7 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class PetApiServiceImpl extends PetApiService { @Override public Response addPet(Pet body,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index 942bb9cd4f1..e07f88cabc0 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -15,7 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class StoreApiServiceImpl extends StoreApiService { @Override public Response deleteOrder(String orderId,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java index 23a17f2827e..f7d4e85b680 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java @@ -15,7 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:05.980+08:00") + public class UserApiServiceImpl extends UserApiService { @Override public Response createUser(User body,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiException.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiException.class deleted file mode 100644 index 1a5809e012135694ca5f306a50d15786c8cd607f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 427 zcmaJ-O-sW-5Pg%xrb%OKTU!rB&|6!?96VM85rsk!q>}qKE^#GILXxU~%Yz6#^auE( z#7Ptt3SM^Ry?q}r?;oo*fD`Q5Fwn7}qibT#)aB2#fV8Tl-}sKhN##qxT&n9J-|%p{SE)A zCiI4zr6V7Qd>@1FMbOIZY9p?yGh;EjVP5Ci7$3cX#)DUAFAO!<{5GpElZ|!878=YQ Ye97Tpn-LqUSgN)rTI?k3Fw)Te1k$ftdH?_b diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiOriginFilter.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiOriginFilter.class deleted file mode 100644 index dd4fb4e630e0341ece4a96f983e20a58234dc55b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1459 zcma)6+foxj5IsXeb_r1+T$GD|H!dMzQNRm9OA4b{6^&&gFFq~1Lo(F58+Vu6kN6)x zS@>Z2>_=Jl?5vRlV)-)D)7yPcpYBe6{`&SEz$%`kk-?&doQ@?O`F`}EpkrBwp<_kI zy?)%ss)jWU>lz*~q&9^s!lw+0g~eTl$aHlVPS?Y)s0~Ye@=* z$&SeL{M1B(Wat#w2*akaLq|(#3pQOkv3N5SBu&FZ4Ub5HODG4Z;_;%22JN6y$re;-MzW5U|-1S!4RFP$k~T1*)ov=FpLqp8TEOLqGa-CB*+h} z-NDy#i5^=w~c7MAj7NGI@@XM&g{LyAfpqOzu_uzA8Z=q0(= z6n@N2Ot^;YQ9Uad#{|_OeUp@zAdDPtV44KZkT*r&W=S~1t(Mp&@=Gljgbtq*N`sGu m-o~9+=sG1ystbvuQKIaJL{^E?x{EnFWgW8JvWoc#V&ONJS!dz^ diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiResponseMessage.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/ApiResponseMessage.class deleted file mode 100644 index 965310aed6b19e49ff845171e19c9541fc530ed2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1661 zcmaizZ*vn>6vm&MKg~9zR+qL|iy8zaT?&g7MQkbdFO#utoU{gc#oVN8Seoo+b~hG2 zku#1jV20|9FZ=+0C1=#<+>JEQpqbfw&e^^9oZorw$sd3H_B((@Y!xwqFUC>AZ3|x( zX_qW4TexFk#ll?+U&*&sS=I_zFJMC>I$l=FtHv6aiW8yp*wvq%bZG~aDTPF zTiv}UVMZZW-QB8*pH;}zz7{X1VC~mx57)lkdmwS1yISFaN0U75(b(IM^$*(Z=%DTH zC6OPrmzcNf#j$Sl^VqT<_{oYwwld$~p>=b1a@!BQ-F~;}Mf%5|+q$o1Qpic%Ya1!i={ix+_`6A)D)3RKX zyHRldo4+20$!5pvN(Uu;fDcP}50e}pFN(sbgimpUm`6Gac)PqqKlnc6fP{yfjU)`q z&3^op8~VXv5FQ03ypQuG%;CJkh5x-cg||=Ur`CMzwUSp}r6Yw49P0^=pM_bxg-LJ^ zqYU0*Y!Ag}8BYzx(~M_^;&Y7O9g1g}g}rix5F1N;T8lL(1=lhomsZi{onN7z)5#DC z7&9+zd_=#LZooxcVkCz@=31uzCwI$#$CJa(+%Yn9KQTm&k4Z`^8LsfT$>$EAEyvFO zg4~a|>ezYXTypF&KTgDl8>~T8I!ZC^hmo;!}Mx!a@FpY7lu)xl5u>a54 z=@NTfA>sx*yvN-;1o(#F4MIP_Wjus~0|E(FIfWlI#x{&%0`AFGv$;>`&!F%(OJobU ztO}@5K>6j_;5>6>j1VU(zCh+@9vW8B9igHqA{sByDqO`iu4VcwJeiSiM$MD^D4Ms6 z$Wuo_pGkMUL?0WVD_-dJL9St_GtYQv80yvtC?$W0Qy^E4aprZ9C4wx!0Ys)vW@>RH qNbz-$yCXqvjs`J9khYO3vQChVH-N|$^54v{kk&spQz)9>0{#I{{tIFN diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1$1.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1$1.class deleted file mode 100644 index 82ef0b2dc842184d8a914ae43f3c67d7e52259ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1929 zcmbVN?Nbv+9DX(i4vwotP-=ZEwbUj7J$b3M2C)>ui4(v!4AZYmvYeYU%=(@V$^M z6D3vQ;V#$G{%#x7)?J3X7f2Tnf zM(oh0utJfK#)5ncD09eEJ_=*an+8tI3dR&fCWVRk19Ch?@gVDSUO2 z1XbLR4VA)FPpffmlelGdpetfSCN14HJ`e0TQ0K2ll~Bbp3O0p#t*RbeT=p=Irw&#; zJj2fpRz3WJH3!cZxPM!ExPhBAwdW7*428bbzbj8F+BZ;!JLfYqOeP~vsN(iX z`56}atM%5HTBYOA)y`%)y)W){hrX|Log2Sc-aekqjl{x`p-BOz}4DGd%&*plD zqAeGf6TE8gu3{7$9+^U}qZ7-94h1BW{cpKZnqlmX zmPWKrGF-b z&~unTpeCB6=M({fFX*$Ix%y$tX49;64KwyrnP{dcMk|NJI=53R3ye2Ob1M`@AmwXT0=2QsKM`*JO~I z$P>Vf45gW6m`?BKT&VC3?pJvj_%TC1v%-*^S7pI4T#%u7v0hsh`VC*Ll4Z1@O1!$l zwY2}6#-vS`;nF@-sY%K#v3Zl>@Geq@v3BH-^}p!3PUo3|(t%%5W$qhU6Mh`{gd35c zC4#|7P;yoIiL(8e?&(@6shYpWBO~-?t?E}AE%ZxD3;!84^QoYgbE9;=hi91^zAD4A zU;N9bUuv}>%R6RWZuU16K^eVecPXCdG)!686PAiWI`3 zb)GVbr6uTSt6X+2jjQdouPI&Q#$PHf+u3|Wle!pNNcL0=ooY6n>6ndXNV`8xD2;V@ z@Liq^eRVBEL&MQI`>zEr+e_;u*M=^Le5OTzMMFUW(WL*aA4)R}ebCZ~MkK?r)}A!s zGAp=1*ZLsc{%mB#s)u$5=o!WcUF(Nw_X>&FGL#+v0+!8vMdEYpG)nJ&asojdq4yX$ z0z){8W3<}c7><+e1ns@p&st8Bg;}Z5YT@4!c+z_0zTv?57Lr@&v-k;Ee3w?>GGV1+ zj%>qso5RByoQ<(PoWuFp+oOCg66z(2>?g}*q(9*Bq|XnxrCtgY=BjH@mmLfyVL&{gDQf diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig$1.class deleted file mode 100644 index 841c18a9358e1bb8ddfe3d1f0289607e9cee2fec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 941 zcmah|U2hUW6g>mT!j@X3+G>j})ztzf9Z=sezMv)&>I+Scj{`ew2X}YK?ovPgl@Cf{ z6Muj|%6MlnF^zFM$;`QP_s+SW`}5cL9{`@9U51UijWz6AxNBk0MgjXaDH|3JEZnnE z!oG$3790jJR9=UnjQYNaV;M6PlQR`N9frN3(mehkJWobk%oQJq$@^G`eH~7f*CWek zDpbjHhJ$9dY3r1s(ATbH*chr%zF7og8J&o+Pnz0LPlSIeB4zG>lm!z6LnD*d=~58( zNH3y^e5F#ZOCcW3#JM1sFT;tiV-@vwsH*kIVwk;iA+6+BUar=S?N1nr)yXaD`=v{uzi^&&B;(*P4k#4o$ZO?Xrco?6>%b?kAcr;t445FBqI4V zm#gpxl*6%h7p4&PEJlWW)3oGicH5}DLsLQSi_qigeDut-b>X@rN$v90XBjb^H~%pk z{y*Na3SB;+G5Sli-+lSZOl#SOw5NmCS&BkZ&v zeFbYTk!x=ve}Td~gG*fdhT>ZitqYWl%37jqRA1;#4x4n==+6Oeql_KY$sfldZjz>w kdg|a7w&<3}Hk~=LyF*wY+g+@av_oHPLbFOMNcl+o4J66-VgLXD diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JacksonConfig.class deleted file mode 100644 index e85d8d3ded0485574496591eb5915d18e4c6753f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1426 zcmb7EYflqF6g|_|%3668=x?3(nKMV z#2?^~GTzy(yqeUs$#nOgxpU5a?fm}p^A~`1JhfpXYawSNhHM}DkhidCBZ(!0EZc;v zSl|{`EvzwsA^pmAr7qNj?@OOduY4#g!H#G&q-IzyR=het5Pl$at6t-WqVn1ITwWD{ zC@Z(h-(7OwU`TB$R|Q)P@ocWdkSKUn$uLkV%-z1dT-Opf-R*VGmHQiYAZ(ySE| z7{kPF(+yNzmXxok-P^9~1tRPp!(>N5@3nWNs#0&HF^D0C#U4g5jeZQ!2z8sF`87kl zp2lN5Nn-+&3{&0w83wP{mtn?0UCPKXd~xV}UK!@H-KX1pHT_yT%6xGlqe~&pXynkQAy?eN6z$(7??}QR(}c_r62t7^HVMp;ZPIy0h!IHT7f*1*C`3U= n3PYC^Qs)XO+zS;FZN~eU56>;&fng%%hxEKf%ak%nPx}1@KqYNJ diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaDateTimeProvider$JodaDateTimeConverter.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaDateTimeProvider$JodaDateTimeConverter.class deleted file mode 100644 index 7113adb510aeab802c202ab92b6b7d3825276727..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2119 zcmbVOYg5}s6g>;JWh+W?4Iv?IzzHfUqDeQEvr&0l{5xPu>6jNnrhS$wA8a|K^y z@FnI{%%h}WL4_h;D!7}*qTH8M+{3b5R#YUgDh-zutf?5rx?Jun_)5V;1&wKba;QIdb;s4kp{H+ghqro_S?HI~MOm|o z)ply)z9BnkELz!axo=5A8b)zZ!`H|&3?DP><)2|vO1mVUiR!X#H;o#X#p!7&C~J6( zO$A#To}j{T@fa&ez)IU_Qjcla!BcvjZ?#=7UlsWS-Zbj@Zo_COU{}F24c}l-!?*ZO z68xTFG`@^dzo=mXc?CZ(%>C~!XUHBi4hqRI9u56${uz=scU;PEKB`!=9HDOu*S1Vo zOi_D!ZJNMT_i%1ydF`j|^(Rl)D?1F=PSiNglxjKF7v7(az`;=0WteG(&7hOJwTlH0 zIy+wF6rdbMZrj4FGu(_0Nlb^Is5u#qOvjE;p>JSQr<{{-VS0x58^co6_lW_0*D#V* z*^CTVLRPVM#CrTK2`tG^_T)SC8?Mr4e+2Y>qYEWTI}IGIm*`2Sok?l&2<#6!3}B4b zlrPNUGM%+R0UuzTo|x=(TBY&t1U5*!KJyX-8?!GqULmpfCz3CbdIe?g2AFbrBvHDGYqX|u1CyAdljI%H zk*AMvoe*!3lxROtFilT1lOf4D+NDL3xD36ZLo~t(-_2;C(1T23h8(i&GQrG-Fn38u z!eojw|03JL`=_CTWCc)}9#jT5am$CA@N+HGHXlNzibN^*Hk?!sCq+0i%0b-rL--h< f`1>7Pq5U$+hw%U(LjE_H$Hu)ey8q{~oyhzLl`9yK diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaDateTimeProvider.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaDateTimeProvider.class deleted file mode 100644 index 3bbb134bccb4519e9b608c22e4022f4529cbe2b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1233 zcma)5+fGwK6kS6PR7$xD2zVD-TQE+HPg+7^FeaL+L>dzHX((eIZ0F#dDd3Y|;0O2@ z_#%lWet;ikT<5ff(`W)|diKnoz1Lp*_WRF|UjXjoP7YZtX0a5@LKejwg7|(ri&7S4 zfthFFj(V)Tu9=oz5AD8oUOR#OQ){(bZ>lKLk-*TZvBs|nWJ={NfnYt{(E{UDWA%%6 zYg@aT+HO)aRSoN^xuu+m?_Fi!-y32SswR}tfoe3glWNb%bm$Ei?wcL$Dh%DwKEreT$DJ2L*VT6>uCd%3;K!c^A&DPIRGW!aa)*}TuHVUKHWGif2*Phgy<*qlbZO;U0{agi1=z-P*U za+->j@5p?`$WH{Xk1=>8j;Ifa5+h~!EfBXz-%^6P-0|yT5`n*&B+fKuaVcRijXBKI scY)p=4zbl`T3w+g12KiGJPhC(FV~aP4Q31G%iW>OC4X)sHNzPG3plMw9smFU diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaLocalDateProvider$JodaLocalDateConverter.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaLocalDateProvider$JodaLocalDateConverter.class deleted file mode 100644 index f6d4a45638501606116058d1ba65b019eb7939b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2133 zcmbtW`*RXk6#i}kEUaroNg7RB6I7~!sB3FqhCIwms|6E7j7^_&fm^yM?C$I?G5t&W zZ`l4o9Gz+VbN?vEb9Z5Z1TxNan7NO0&-u=G9(OPQy?OOFfIIj}#RNW6k;LZ;zEJRG z0$<^-iUs5qEUHlCp@OA2mgT&n;vQDzu%;q{b!oVwU_-??Hsx?%!Pg2NDtN>YTQp3= zTV@!Y%kD8m)~%{w7%Ld2c-(B1g|o}cb&{kCR)yF1xMRqDTNv?vHC%?tM^=^l=NsG; z>y~*a98Wk5+C$S6&U&4@t{}aof??_Ib6%?nN9VSo_t|Yb)}c`qPNq*9qU9OXUmUAZ z@*KmgG2EOh9PmS~*ST5K17SW}u$-EHKx}l+Xb3&zM8=7_3_ucOm^wp`(fJ2G(3?jU zVS9#U5=P8zJ5Ti}w0$$2FL}K3Tanv-cBoPeanI`EJB(a*5E}CsuJy*aRXz|Ek77I( zHp9r#ZCRr3Nn7~@M3|-liiwg@Gr8AvDE{JUBwuo*KX-M<)y0vgZ*zw?!s;vz&FHc$ zT*+!W6>;B?oiyE7-%izUNlF?faY4g3NHdIgIff-*xGJR`8qY*|)wb(Kh0FScS_%pp z9%DCa53Fzx?Z|0(ucfmRMTPGXvktu!7~ltVqe2| z_+B#nfdGe;QX1qm%p$GeM~3|W=y!%>mvvB1hMC^*Pgj8B&T~7E0!bl9pT!R z>52?>sn?|280##~t*vhSytDb_>1Jt{;Ywen2boeqr-s7&mn3j7)^XX+Hp5oX&z<@W z1P}Uqu*wNQc_X=P3$r@xbI{FTU){-YVs79?$_@=IbHX|K7N%!-zcZ{1y{7LPMzky& zlHpRD)j&I9J#$6^^YZ(hd6$mEWqJfAK;JofUZOP9t)uZG?R1)%l;)1X{-nhSrf7`$ z!X&0?tpy7B5Hqx6ve{{r#(xmlD9!r(ON}4B10?5JD?+1 zALAM!UMDHhexP8Ec62S;)})Bb@c!Oa=-eWEAt{kR?|M=0+Q4iF71P zA~*jpk}bS{5-Lbm0F?-#61a(5KGdwAYnir%HdHJ}lu~Em#6p}H;m9aQaoZ2!6MX8= dcW{a3X_AlQ0X~BKr?7zHy(#)Puz;ON;w>la9i{*P diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaLocalDateProvider.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/JodaLocalDateProvider.class deleted file mode 100644 index cbd65fbdfa0c6d56f1d3453e08ff7c334cb7757f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1240 zcma)5>rN9v6#j-T)RuCUyLSa_i*aK7=MoZwG0{{d(2%IVhBDT{b{A)-fWLeKAHcW3 zKayzT1NczJZ?~oFMiWTWJu_#{`ObH4zyJLB1>hm>6_LlCJQicQl*e)rUVOisM>&s* zz|8Y-SJlFXYCTa-uZO{bwoY4t(z77YcD<#dNJj!gt0pjRO(0jUYzuhn;jR`KtC>K* z?6h~Zt*f0DHIoU}wz4L^_mrM{Z-}v6Gog$QRkNwBRQpC|VsF^+!0c-4Gj>zE6qRB%+uP@JVfnM=B6zQ4GpPVc@YQtdxWGbxnm`HJ3T35HeB!o3|3Ddz9rA2{1#~jjB?k)I>MKCJEx}wUTJ1s^xJU97w2ma|RXyCuVcxG(C;kQ%IY}Pf=W`3J{ Z{ck>8Y%^kI?MrplL6?<;9YzLrzW{GOU5Eex diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/PetApi.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/PetApi.class deleted file mode 100644 index d79031aa47a005c0da5be2d69453e29838c4c1d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3755 zcmb_eYjYGu6upz(WZ4(*R}e4+luck66+|V7fslmALIN9tf{LBl&Zgt+%+x%RY+3#d ze}`5nT7K{c_@gXOch5d%vJoU!D&0NZcW$41?zwmNufPBJlZdX;dV$KcT%aeklBW_q zEzlSAr5v8g;kg{XlEc?>_(l#d?qk{-&__ltCjmg(JdS24yM}D+Xm}+y-7dP!kS+7`0Zpzsy!`>>RGS7PD8FFXVH) znGM%PV9<%dmq_od(ZG!cJ*o8Dv~YJA=k|`b%GFP+@l4;$A3lOO7mqMjuB`C|Z0) z1OnmTb{sck>R2+b<#C+D`A@>u&P9-oXayz6Nl$RO_xk?VJC`;33PSdQpPE)5vKi5NF zbawWTs9}$X3k}4bzDkP36Zbi?sF_S$YtYd|6nAH9v&*yKF~vFy*Ri?J{9ax2gVbaq zD>zpq!Duvba*wkH_d91fKzZ?<#By*=I8wU7opv3mjv({Jn5HNcwpkOw-qkx2#I9pj zdY)zO69w1yIz@LuGuXAgsh?Hy;$+=InEASBIsooNY*rfiz;_b7yg@A=DcQ#a0F?OLh3r!v(EqB^dOr4CRgu4fs<|D6x#)%sY zO2)JFM8vOK(GAMZ6@<}K=LBt!dopn(12AxYZjq29cR&@=is*!JV$3mY4 zP03o2pgWuwBF}bNV@}8x|6`@*`b~3V)eX>&c@T0Iv`x>Bn!*W8&v!QkN+mE`ksS(; z`JwrsvywjVvXCt}UKE!_x|{4FDZ@g#HE8~S!iT2PX%wa=V4=mDVBknEG({q$!0<7s zyOD2kO;Qokzz6h->@JX~>G7~c2kB6b8YSYiR-*lMAVgR!F^?-|2v9an0yKPKb>-~*@%Bm&^i2CDdQ&$+Ownqt31|VN9_>Z zpdqY?N|V2lG5I?U{Ysgi@jOIFFcvTqouVwgMMtHTwxwfq98Zujoy6H;tnX0%m)>_Ofz3jY#80e76n8)vZ2V&^QqjnxI%k6}KCo$=>1 z6wvtqo9}cVFJOn>g+*RMHRz%mk>nUy9dj0YMGdU_l7`dBE-7S_+N_JLNRxC44)H2o zrmAA1s4!+y7|#OZ71)^)R6y?yLU$&E!}qnpB&HAa@+u~c7>cA}MddTNOHer?0cTV~ zG?iC(q4GL?1b;m$KgL?8tU%Z46P)$Py@9hKno=ao0B+(r4&c*40UVY(xrKj3cpZ~Q zjS|`obuNv1Y8TYg|AKn@^-|`LW)ARp}~FPVlt4$P6iOjQYR3sbvrvMTR^>mLyzLmI?Zv+t-;0 zxgLm!w~>U!F=7Nhw&q>?$d%^K?V!g7Y)G#S)rLk&a~krAGpbs zG&zC)b{O%@3Y^y91%WyS=9U+ntW|8KDU%5eluX8K<9TScxIq@+Z+sRqS7?q$p=H)# zQqCu|&We-;s-twDfce)_{@3FAE=v`QJ0kCcFRei7g!a11;AQ2;a%M&}OI;$Q zp_x_#5p%r6eV1C1F>UF)8!OlFhFNwhGdH;ne-2foa^YXv;0 z5ZL@%s}gABuH#dkcY8d-p4}cv|v#2AlH;+RqEFt=~yGhC~1W diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/RestApplication.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/RestApplication.class deleted file mode 100644 index ccb5a878805502ef820a16f5b5cc38b872706b62..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 401 zcmaKozfQw25XL{Z`2%U7P`V%if(;n(zz9OBkeDKb3d-&Vt38y)QS7w5784Q!55Pkq zE)he-fF*yv`|kWZ%U|Cgp8zf~j?l+$h*5|=f#8}7ayJ6~)3a2-yEV^RV3<&$@9X7E zS5In|volIert(x()a1XW=N4oIjuSG{uGM_5E2&D7Q*GU(EOW|~BU4-nM31JfGJQu4 zYy78v@uF5rV1HT{j+QzlOFUyz6vnmpdBkDT^t{Tom6eqp_JeW@=KCv^*Nhf2h6i8Z z=>I1P9CU%1sdSf$6ZH6(n#Ih9$Qp1a+Z^!E-yz=E=pkec*ak-%tZ^Ir*hJLU2d&1~ N;&Z^YZQetRogWxbV7~wW diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StoreApi.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StoreApi.class deleted file mode 100644 index 3ec261898f7fde3a02a36e4c3b6300ce4074f385..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2045 zcmb_dYi|=r6g}fOF?JS`P)MLaNa)KBlr2yw5MCiTEs~X_I7&bC(_}q06Rmfx-E~M* z@t>$v9^wN(fFFf8GwV%kr&iU1EX~f`xpVHh=iV8=|M2!5fNNMOp@a)3;V|4_M1fLu*Hi68Ge`kT%<)MlNOVhW>R3~Nr633s zX}1MV^Z`Dq)~Xv-5=-f1nXSv@DUG8$((h2uN!QYL|Ln4VE->8(vmS+wj;CUtnUL+a zuRR;i-EH|i-D}y7!+=@!6I_>(Y*F~AkLgT*2vV|sjPYgPjx9qbzkt(J$>U&01#F)^ zf%|C{v&{ZS&8GUI{aoE3gOaNcLYRoQXCCgE%C7bHO)dNkT{CGJq>X3+NucdZFYDCb z%Dqk9;;ryqOX!pPHNO=$DB`JM_=g&2t#0HQOB;qX>tQGI)QUFO@@RIWFPqjkUa`62 z4jddU;Gu(MJaSONcmY)hU*Lp;Z}FXj1zdFSJuVB(40$5hWCyotZEIV32_KXJ=hZM- z2|Gb!|FQ_U11^6^kBqd62OpmmyFn$!S?eqf_Hnt=tIR*YTC)Q|vg6%%4fA{?i+nk$ zrAeN%QO>Ce$75XGMvgPUS$GYx@CLb;82O9q940uH_ytZOkJFemUa2pph-NS;Blir> zFBsvECl>z3$i+*qkbl8diZW(T&0B=I)T@hNBAmpu-7jH=k#dX#V)7p13}>_SKg;hq zT4rOM$DEn`j$DlS7#Hvr_l}zszD^xZ^79RC!c@1*?JiMG9!1OT6-EcCRV=mX)M=ku z(Guc=$D;>?&X7=MdQ-)FrK0j{okaV}7)CAE&h|@%4{TlGGFc diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StoreApiService.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StoreApiService.class deleted file mode 100644 index 97dc7ec75179175addd5688be834d14a52624c8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 802 zcmb`F&rTaL5XL_zo1{%s5(xb-Rd5SE)CZ11pcWMgX_cr=MbFOeXmPaIE3Xrh$Kq6p zLm!|Ig*v-Xh*GJSum@}A=kb2_eDnL}`WJwGylbM0R}H*w;Eh22KpX831**NhGlAgP z#w5@VwV}cEVodJ48mCOQLK~^{OgUZTcQEkhIv3apwUzm$N)mEXWm=BBb@VCIBXTnx zQD5L$OeuL9x|p26*IqbLGbK}H5-xVyB>j@io;m-r!JxsUD&$4V%5jOmlgul1m6GORe{cfiNo=PBG03+a%N!t ziJhAG-ke|;6`sH1tAXdOT1UytFdCofl a?`$w>qr=fM*~Hcg>0*1CaQvcFd-(^X?%Xv1 diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StringUtil.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/StringUtil.class deleted file mode 100644 index ef5d2e2e15f40b6cee62ad781ee8dde69cfd066d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1220 zcma)5O-~b16g`ibX`z-63oTSY1p)g(DORlDC<{qUNB|coMqNG1qz=}ZI-O$N`zLhC z#tjSHK%za$hLyC+vm%tRL4f-J2_ z&sK3Gsrygtia`H@?Pe=4WU**@Sy{HT%f4qj#rwWpGTB*h9bei`WxnXRo;4>c9G6Hu zURakKGFy^Pu~Ba}XOfRdtm1nLzp0#TrRR+Zbe}SdFH4rgmttO^#inDhSiYp)kfkaq zv@iRz@N`j@>tce41(9Rdx@$WEGylo&G*-eEXscLd=}F%ub&W)Lx>a8w-qdirYM0h5 z&*T*egqGc^SFrBbYUQ0LYn)Kx!wBIFNrrj7Qvwj^{d*^kVPRZDK8)*_CgMNuMxg7Y z|L*F#RUpCNQb+JiSfdTq4=!a+x zVo-5)56~a(!dS|rwA>B?4|FAPU=y)S znqi76Rkp6?Yi0+*ZMGi?8YU@lw8p)MaES{WA+b?VkHFkob;B5MyGW6#|!;Z$aWG><$D~ diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/UserApi.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/UserApi.class deleted file mode 100644 index 0d8e9d98a7f91aa8e2ae4e29d002c5d46a3ef9d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3324 zcmcIlX;T|V5Pd5Ngrp^4f-yM32Im57vvKSkHed&1VUs9a0vyN5hh;SpLy2A09vqd* ze@dznlFEntfc&Ubx@UFlE|RH&N~x+fJJZws`t>pY{QKA60Pf?5Jo>Sc$5;3|2OXt6 zzQHPsH5ThEHdt)3D6`mNv7N? zKC7}Ryt-q197JZsV4j&U~xw5RF*JiK_jHJ z#U`~uf@J2h!SO&uo42X7xJjFhvC#;oX4+Mw?7PygUOEYV0ri|sh0-idBWhj4aEz8` z#ZqyrNO2X6pPCnc=8lRLHHEHw>G%$>b-aav zEWX!q4Wl|f!jz7WS$u-~Iv%o^!@Q0!v8ZDSRMzcJJ!>?F+Z+U~xvh?t3l?yBQ2 zJAqwk4O$Je36&pB%XeHUyu{THPCFOa4m-I)0e>DzZsk@l5@n%NRWv=YpjY>;|?s3HILq3-;c*V5wCoA02a?P3HJv z7qAcTX^h!6kDO!X@3S_4pLc>Z#AW(LNbm#t3$sog+zne_65Ha1u|2vFHX1AqY-Re- zkc~pv8+T8UOM+Wb;ATR#R&x~4B(8u3qL2%|pxPuIDa9s*5txrVQ8=C^-k!86Y%CXA zY|<2LAYLF>>@24cpCX^cyP@!ogi0;EIfX6SCLORn?Sw6>wNTI)ZlE~JTOo<#)w#U! iczH8##dFd-%)GTquQ_s3Sf+a^JXa&2Kq`&)fAJrFT*)H< diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/UserApiService.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/UserApiService.class deleted file mode 100644 index efc4546a763820a72805122a36eb123b1710077f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1292 zcmb_cO>fgc5PjP^2{A1#4IeE~+QKE}z#e)`Ra7b}Az7)w5Y8KC=+s;i*`*vq4vyZ=xF!vgPSOL>*yNex87i?W>ew&r_PG*CGt1;UZD|dn(OoqI_wt zR3KXnZeXOaGRGM@%~|~c5k`eY%exd;V#u#kZc-j-Be^ew%qTlL)3KF9+d7(&lgaanu$A3cDWZP{rd{ z4i@q8`}DviMx7N-FnkzOE>l5S(wo-l?IYgtcc#+svvPf%nLwVayww_a+vk1W6>D%% zVc4CapKmmV&0Ke!;EV3145-leOD1h?&vh2}roG}EV1<5!eAGcd04g+B>BMPev{v5z z1iPWl3TiZ03$TF)v|k%5kf94W3=a!rog@xP9ucyEO|qLJcwF4GMUuus$rC&!>!}Ut aKAS_HW4olYgBK;_C0@-UwBIe*U;hIw9d7pk diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/PetApiServiceFactory.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/PetApiServiceFactory.class deleted file mode 100644 index 959aad11df0fe97ee961ce0d0e67ff0b3813474d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 593 zcmaJ;%}T>S7@SSgq)Ag-t5sV>6cJiMbMR;pL?{SFg-XHWHm-3?+LR=%_*VWL3JN}e z4<&wSi?lhohuv>xzuB4H{r>s*0&s$=1s!D*8EhEXw4kDFV9P*-!H7gSmabsfY01Ee zp19|U(BVVr+=%#mDBH9BQwF^u2QofmP;2!LgLV|`SHg+KIS$|ST+n~84glUAp1jqIoKsJ3`eQH|8K!iOpF|#4?O3(+Y@e#J^Bot zK8K;2SW~4^O-X3Z5prl{v}O(`V6RjtuxZw(q=7uu_N)ObC=fDH#40g~cze17Xm3zn k2(txkp3F*rHv4pLGIF0#?|*Ae|C}@5Kb^1d_fG&Ps94ZZHj%-afprTi$_6$JY%&;;2uIQt3_DF3 zIME~bJP|s4Ae~kmgyMW4ThoqH2E8u(GCpHatF<+?*%kxf_PPYAt=ny!dA|TX+4LS*sNc zLsv9pVr?tcI)fZ_`H0&vVc9T{WjILv4A~p_X@i%fF*vEt|L((3Okj@B`<`>%=?XW- zEk diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/UserApiServiceFactory.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/factories/UserApiServiceFactory.class deleted file mode 100644 index df26a6dc422fcca15f8aac140208312cd721f000..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 600 zcmah`O-sW-5PjRENt33wR_jL*qzKY_XatWIL4<-(^iVB$+{QI-Nt=?S75|kVhk}AX zz#k<}+8{L^+{5m?H#7U*?tFf|eE>K@)r5wMfh;z3Y?@F|(Xpjtn?VmnFqMvA*zHK) z4j;JdiooV$X53@v!ceO>(l`9^nQJ*-;?(T=lfV&e z8T+dKu1pk~13u*z444*l<@$!p++;& zXhvi%7Nz@90{z@lB7lR63%TZ;m$ph(C-39H1!%{%i9puQmU kM3^o07D%l8BeO^M#w-60u+@dH?_b diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/PetApiServiceImpl.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/PetApiServiceImpl.class deleted file mode 100644 index 45937fc2b85b79632438d0530a5306241b2c92fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2914 zcmb_e?Q+vb6g_LpHa0FFX-Er&HiiIB_z zgl|g7;@c8xSk;&B3Ro-P7DIkjx>Bt%WUI?h8H^3j5)4Nh(iIP*PD=z&c*~)gxrW!~ z&Ql&p{hUl1>ZJ@BE;giRhOfA7i@@Z*G-bzk%pZli?aQVJc4S-BX{JVK+_Gq%;iu}L zO@}~ZgIZ&o@9GLlb#O~*9pCS z&$<#ry6O6T?JV`^?yX%NrN2f6EjFd?67hgE*iJJaYZLpKA=gLtQ}%@0lrTfZw~{Rs zWpcf%3(-$vs^~Mo79-!{iKLG2jenNv<(3z87{Y_f?7a%laCwI^Uy6LkD*c z!wYP4yXA$nO+}~#54)!CM7DH8(+|8IX$jiCoybwr=YcXG^hY|BO|E#|^`k_0>3uUp z3UgAsWw`sE_)*+VFACbC7xw~Hf4HMv)!nL$5)Kz|yNq?*VW^~fAzAeM(*qHP+@=iX zJKUD-iniP;;BFZ|pkBs3+-EqSG9TYc8BV9x4RK>wOuc^SsVy&Zt-U_RaB`&8_IWa7 zykDqS_Mg`y=}<)(%5~Qj!G^=bP|(J>Qk~L_mr~ZWmlvw_(M_&To#lyC(q1Tc!c}w} zFx(p45RY2hqCNF+NP8kaxt0!$;mou+YN+54ou&F$1W5vi=~|{IlkSY}xs^9yztbRt z59peYCr{uAjmy0SIErKR#BdyQv`QO4Mve|-VEzwe{zCRyVa|Ai+-u}tqwpKe5BfS4 z`&#U+PkfOjKBT`UFpm>hAd8P^Y|zZd^goGH3DR>yG7gBe7$dFp)(;?kg3}4o8GK59 z`gcThi7q>ksS6XLtKjTVbmz!#FQ4;Nk|lb#AMbg3m%#;^yZBBVE>GZ4 zox-6yk;5`plH9*dm9J0Wu%G+UDqnghJ>8suG)+&JaV3fA1=TjE6>tFMuEj_FS=IDm03BM670Gpt_8<+O-7zZPdIOqmQcjb6ii9rE@!8%^CWJ)|$G3O}dw8eT}}Q HH;m$c{Mfce diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/StoreApiServiceImpl.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/StoreApiServiceImpl.class deleted file mode 100644 index e6ec58a2ea95fd7691a7f394bce5226f8fcb8663..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1730 zcmb_dZBG+H5Pr5TJ!nrsKrAXq5u`=oe1EIaNF%XHg-8v?kJszwT)f^kcULI?O22^7 z#2?^~GR|IGQV!av*yQ$hCp*tPGxJRE=dW)+0Ng_%g%K>Iu!tKPmWGi_A&z_s%ebkQ zTN+k0tTH5@30DNq8REJ8HbbH)Yn)-UEL^_PtXH}B&a66Q881uAbhb@TsB_1d2tEp* zAzv2K@b^sH=AL0Tgdyq;$EXC-<1ZVc!o6K#@e>{D_h)eNZ02SL6Zu*R8yQ!fKzJz zaWsbclW@_945?Qwi#Gy6K{OZ)y3K=#}hndSc z@ekT~;t)dzNFG4@O!i)^Oo%ntzTd$jPfXCG2u$K4rpV(G?Gt3l&@+w8ok*`KQtS^S z&4!T_mO^c_?&7m!_*ZbXga0>~EcDG}rf(**xb_c`mit7SqjsKNvl!+n>lm)nw+hr| MMjxd`+)a%92JQ^2NB{r; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/UserApiServiceImpl.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/api/impl/UserApiServiceImpl.class deleted file mode 100644 index 9fa2e01da72230732c38bab843a04b548b2fcf41..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2707 zcmb_eYg5xe6g}G(N<$Sy1bhRc78HWwy9ffx$V|o2DvmRLNz2rcaxT;!2(h{lh@|nbME8pO@ICV{u96)RuyERDwxHsG;a4`PC*iP6x_u*Xi+o4n?(ZJ917mQ=|q*BFMQaYf)MKerW+VSGPe zoRgw|wySg76GW57BZjlhY}|Lk+gx%St+r;`zQ^z~7a*#>Cn{<|xL(Iu^~V7jhFZH) zvm2cW>(eBkZ&Qi|s#c~b3{&%bhuXXukGj3%;RQRmNh7i1$r{ybr;rkOLnW{3AyqWf zP>Y@;Orzsc_V^?~Q>zBTmSR(*=nN+e?n#X<*VY50OvN&U8LC!q7f%aDr`74PHP_v- zoHD77$SpsJhhZ^f?_hH%zFpqif{lJh({Ce{PBT)9mhb3%RmgENENj_19cE-7vQW^Q zMm~#qEHaG61`ByKw)qS0x|%^y-BryH`k3^5lEzXN%UH?cDV{N0i@CR%OAHrdhON;t zjKX!GO{pKKdS9EGaKO^@d4p0Gj@zbtKW{lF<3N1}MTN-{Aj=0SPnF@_%c zG|68EByRN5IZIC}T^U`wroMuGrkey#(78KUJdKldpA8MrhkkluIE4YSlFqNuMc+4I z@Ea08kbIvWNPR`u7j%C?`V*~3u|@){(a^q*MV>fKhYVm4XD~z_!*rjbl@U75;vCsa zrt%?7$w<_f+A^JQVY)!LVQw;ti}bF^eTm*BaGBOdj}^nje~n=bTQbZeH0bl3z()t`-qB~Iprw3ghUJUl#KM0wkW3RoX?3f zusVWr=L1fuO^F)rf(Cw6GYmIyvyT5SIV~TWliVYJ&nbcFK&dlWpsPZCy-R;SAEz>Z E09-A1Y5)KL diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Category.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Category.class deleted file mode 100644 index 88f5b8a208b4aa7524f48028a41217f4fbcded93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2122 zcmah}U31%16kJ)h$@*q2S=8r7mehff>aXj)E)&NiHx9 zKY~ZzfxhIS%s|p<2Zkq@;Wsf1dnF~2({xD2lI}V8?Ag0}q`&`t@;iX5_%sUzvpq;* zPF&{2azVjj7T2+)U|HPXQE(%R9?WL&uDHLKK{dK`nz-5napRrl{uqRu&)N zwuFS)lrUJ^)*tAarQ0p7=Gd)@gru#v4GFnertZ6DkW0^)w&~AFkS8YBxpm2Da_d0N zw2ie+d(&|5=$lqh>@;+1U3X2fj)F;l%k(6it(lJIeW|xvhO4y+U};ObZ?qiuYj#hy z48KZZxrxabfr#4Z?T+o6ZDZZ^OyVxuw&Ux*>DYwTY7M8YeWrW9;eOS&v~9idx#!rL zez-|n;rf>A>=>>ew0fXh9gO~Vy3Z4>>N|m&90F#ybZ;xPfPPdN@SU(N z-SsvljK&TWCa!l(t7*6tdeC>OcGIwZqj^v>9_N2R?->ZzX6sJJZ5TI9;dS4EdzZy1 zsW^*sDo$fW#VF3GsN)WaJlApsAF7xFRT?~+#IU!DySOLe^ijO)3=)PKmhO4QgZ{;D zvMM$}Ju^lAna$~CyyI0=P``zPe-V_M(YF>JmCQ*p@f^p*H~ z(Itp5^|)4?U)R{N^ahPuj)N_2>295KY1j>;5@XR7f3{TxFY()=@avS|KV1%ZM8T*<*oNj^kU-X(+_ zsC|Y4fJaa9@Cqpx*ldK>oX3@bR55IKDAzo5R{}B@@G31$;5F9wA*J+7|6okP)dj)$ zb-WQVUf?tcmkX)iplry3T74raIMp8`BZ$OpzZMg>5H*#=dmW*DM>@jg>QnS=>?2z% z=X&>`-Yw_)cq<9?ef0A&HxPygqp;i^9tyI1$Q`*GDp5fOGZ^4Fjbk3OSimypUJPTseMDG+jMOgx0{&Vpp4@W z@dqeh`T-p+jE;_14>7G_M$Wf1lnoe|)KQW1td83T7vItGk&e4MsygOm;A0*05`go9 zfki9{sI~fTWc0(+g|+!fb% z!>a7zror$eY z0(e$MjuQ>{t`juse&EQQ>rNP>_YaSxNVORc-fj7zyXnlkfy*QlzF!aR(B*yst6ZyZ zTA$lN=rq6H^sEPV?Teu9TlVfEYlilnX1(Dw!$-`QeQ0|vGS`BgyaU7gq?MVVykcTV4$HVFaPp;k z(eR0hi}+Nax2^4%kcrQ5U*JgF-*GUWx#rnHP}obV@Qq<&1vbeS_$RN<<${T;c%LmW z60f{7mkX@5T#{T8X^U@7jN?2nh~M%&iYvmz7916tE* zcy^6_y`Bb}+OV5dO4;#i&UlJNhyVFh<2cEena+2jf{YXcpE6Pp(M(BjJ_sST!m&VW zhH=69aPcWbQT&38927aIKhmEeB9Mp5@gT=896&e!d+-`PX1o`taGI9D8Jy*g0-r5f z5;t4?8JQ=1h=FpEb0D=jn`}PEHImveKO+IT3lve}SYY5Pw`Vx#iX}2^^D-juAhJBE z*%irbY+q*T zUS^{&XEsE%*Y{_Z>SbIri_FGez)b2yGP}rc*0}yZv33eiTPc=)Kvvx<{e|x0HnJst zzDHKsD*cIEMYejBpJ&j%!zo${EhV!0X{of-$kNouP?aqLDv`X7u~EQVr1Um4yvsIT z!co2fhHxdKScsGFwzYycxmqwj#vP|g?j7#$LRRY*|KcJcu1Wrva5>?BlggE99LoI; zeMyl-t4pe6SY46|Rjbc%K=MhebShQxpQyeUp^5!Bu>;I9}R)4YJUc-hK$4;9Q|7WZ&F z)y|cKug;$?SGa~>Q1acIFkeiV_m%!eF5mxzZ5+t==8tUSs7w|&rJFObz{)K$?Q#md VZ?_SBNh4(W6$p*^*Z7#h#Q)c`*(3k} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Order$StatusEnum.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Order$StatusEnum.class deleted file mode 100644 index 464b6e1b6961858c8c816e207222e15998c45567..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1570 zcma)7TT|0e5dKb^Hfe}};Ue{lh}ae|-tYz@6$%!kFjPCk_!LU4!8Bpg6#ZF>*U{1O z*&pS&n+B=MjN~C_chBy(-(J%G`1$!8fU9_zfrM)+rf^-xDH%6a^x+o2Zu8BwiW%Hd z(63-tCH*cN=M)SnD6)7@K~}*$iwiPJ0_jz=IA2;2P%EJowwfic)ez9io@WR1uGMVX zO@VW!;~UMFR=sWqM#JB2#h{GRFZUrMx4fS`NKs>^F&yn$8_vws zphjDCk@rHwNnYnu8Wyo6}kimoLQD-{m6@5a} z9leS-zjI!kjsZL4Vz)B4x_6)1-oVE?ePc?Uka76jW%|zh=yxMEm*qA9bW-`zNmbKL zf;$KF9_RkECo(vVGY}XiZG=vK)Ln=VNPI`~HEA>(dZ(kiW8^=AbFu#v;c-M)AEd%3 zq`pJqfW#jGqh!(AZaB}$>7E8f?_rYfBT1ymqcDE*BhrP*_mJO2KAg0hZb9_YAJO#|TBIJ4^zKOQiPYYdel$|`^jGpu?n0}qOS|Z)tfzLN sSKdN!k?qdvQ3Hn1Lxr5CxlB@Fd*xil74l2aKfxfKDn&@Rfq}W~FOy_ntN;K2 diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Order.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Order.class deleted file mode 100644 index 4e5b5a3c6c262e7c45507cc8fe51466f2b4693cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3712 zcma)8S##4?6#nE@F(L$qokBy|f(^Jp=|Wfn0ZPEErh%}ODvn4LY{^(MVJTfG-6+uQ ziRm(Zp?%?j&Xi@^X{S%^On*avO55poWW|<^Gr=>ySLfV&zw_ODzI&v<{`>hi02^>S z0S#x`kiZ+#=+X>Hlb2>V0Rv~{X+-9Y#$hHfhI4Tgq%X!{CD4vDDs1UXD$XZ3xvaub z;i{;pxS(QO#YGjDWX5F`R|JXun+aUSTXDRtAdz!*x8m%wDn$iazhxQazJl&JhNB>4 z4lC%$j_DWlOhLCsGFjUi=}{0Z8E!v^)bkbHa!vP=g3iFKe#Yk(yVD`oN;}Gt20G=*eGNUmWPe-9H17s z^2K5yGp6UyIkuJ2Ym+j2X&)-vC8O+Kl28})LWNADPBmm_cXLG9ph`lA{ETp-|2U1_ z!?pa(ZXjFF&@?Wn&zcj&pO_>e1T0s}2DK! zf6a>Sr&uz1!!N2u3lH5|soBms*V)O~>oogF-`gF|CR-tAd+LV;q7xa!x& zA7UPDk+Xv7+(7=^e!b+0jyIc09MzrCs!}Q2emYz`=ax-tM8T|v?N5~mcFh3Bd zIx*O-XpyaILJ=uof8&OR-GD za%omzrG{>-(vU(rj(0S?i)$KIV~vLQa9zQi)>)0?eGLcj0ckcf((oZZQZTpfZ`hfF z_Pms+E{|2$m4t?maf2t;#h*F6sY}C2oMIXh6t4KZa%^KUS~bT+krIa{GaOG| zweg91BM#-NhGRI+s$x|N1!goM3*z`h!%f^$u%z{70~Jic%=*53St*EnH~rvQ9#{8? zU_vH@SH0$5X=dGP5QOJsx~sSq*JRoB#7K#*Y?1F43ZQ5sB0vd$vc)*{7}HB7!(!E6 z6NL2j5@g(vD^X#6yVW7?wrrFNdY;PK83gMa)yp|vF2l+jJpmRC{wG8AU~#+0TR`f@b?Xtx>L1*sn-Ef|61mAS6v#nus(}X=17H zW5gdo{n5i&$96H|Y^NiF8E8WXU$!&Ri6rLnPAp=)^&Hiz$b9d=Kuf_!yvS%0RiaDO zXzC|~?(-o80gZXi^?}7vfALEkoyO6Z`G3XXjumV|4_iUo%H<(ho=TH{onylDZbX!E zh0mPoEFV(B$;k{WvWyr6(X z@-BJV!1(;otk@$>B2Htv#tj+ zwxL$=_}cVC{Y$P=qVE2J_Q6N|GEXNv9%AOPbTY{vBx-EdzdPsJOv8f0JK6w^-e7<0wAGIedm| z_#Aie1-`?V0e#)|4?x8?7-TZ|-6o$W{!twFkD@dECt}HG?la<|;3S99O) s<@PHk=xgTw+W>fHE#IAfz9q|HC~-zP&BqX4$8+oxjMv3>N$>ps0hXEEc>n+a diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Pet$StatusEnum.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Pet$StatusEnum.class deleted file mode 100644 index 259e818d7c2fe0e1280c3e8a3573873c3fa2d09e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1548 zcma)6Yg5xu5Iwg|n>0kg@X(?tV#T(A@r5rCseo9Gz!>ce@NV6_i-Ktstvlk;Nq$%L18FrBpUcw@s2&E3%_zxa>FU0$SPkoyMYP zhoKV+oHE_O2w&Q@n$s}q!ItA0>rRy0_m~xs*Oyn9%Bw2^lC@?o38Y@wUegiK%^mxN zZFsg{GpwlL`Zc!BRZ8aLWlLcE$pOIAF%~h&`J~LP*>f+rwCJKHK-fgb{IL0 zS9Qr)YkuOJGTTw0_Mmq* ziGvZ`aF^zmxxW4Tync0gqSLlbs1vdsW#Izd=mGjeq!zNAK0qtw9j}x#og}zuK>r9A zo-L8V37mw$7-{3Q@}urTd_ZCk$=9UOy{B(FJ{uwXahz`3&k!Da^b9~MenM&w5<4XR zaLCb))-uBx4o>IPAo`Axd>2U~O%}z;;~$YOPQQozCbr?Ay>!a7(iE}>IeLL%@?^w( zoDfT#QW6E)O`u4TCNb4UzepMrREqB)e}eKiyF!fEVyCnbr^%j^J;#19aGvBblAlqr z_*wY^X+zH>b@d~9-a?DjLz3Pbt9`NBpVAMD_hOn7`jyTFTqL^${qu)uRmnrbRSYd;e*ywgR`37- diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Pet.class b/samples/server/petstore/jaxrs-resteasy/joda/build/classes/main/io/swagger/model/Pet.class deleted file mode 100644 index fdb8183739fd4bbc79e81ee1028adf22a9dfbb24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4000 zcmai0S##S|6#nE*vZExe(*z2%1X@aJ(;6siQ_>|ANO4QR-NLRo!cpr;t}M3=W#4yb zfrmbn;id4>2bh7Dfq~%(X7~;K6kzy{B-`>5NXGZ-oO|y%-#zC$NBZNRAAbR`4d*f# zL?w*@EXrWXa7@MV43dGmDw-u3Y}x9lsAX^hu8O+Mo{B~W!>DLDDf1}}r!(BVtl@bL zXEeN^;YAHEX?R(~E3)HN4X=qM&aY?i2HsThmV!*lGrUH9uiaQupwHO0=}uRTdflum zh*=8?RuzvKCyheYuq%b4V^<~>Xl27QD~`LY;M$_)6zZppO2u>wOU{B>Elh`t+?cS9 zB~w8*Vxr`^mTx3oTXa0~2 z#wL1p_dq;oR3_y_s_tK2!419Fm^HnP?byiX9hPl*Qwrh}n-A05G;gb5xMZAXD2pCE*Hjo?PCqwvzE-mR^6h> z-L~xzx8>NhSSXgArNVPY-80?OOVz?LqkO#X*af4tsj!dotn1WF*IO1>Cyi=@IFt3j z^dM$Qs#+< zAw}GgsYm9InPqQs^WzE>r?UfuORS@s=_webzw+_@M$NAjb~*N!MWenLloxAlh6>LK z;>ey>oLKznUd3R%jN@?)Un3P zZk0spxE(T?-aTG&3WqYO3@C8JFJGXmEFU)rQ%~9pWv*5 z>-$|Y(m;ujZ1i6(j9ruce$VlhjQ;9&M1w$(RL$D*H-@Q;WG>VQ%@RTyR_VkOeb&jL zlu@ghHY2ko%7!4alhLNz5o{q;cOKZkT(ed+$|TACQDf7KhFfAen0DEmjG*Yy_qv+I z4SaDA^0Od?n9z(*F=3iNlWhJ>WKNaTJ(a_$OJ-$QLbYO<96)^~Cz$MsM-4kJOsX=E{k5&o~Cew47b;4ZG} zfeYM?dnhTm7uyL(+!rW``(*Ar#J=G}3}Q6pEANOLPKJjkxjMkr9sJ!_XDAd*VJAni zHpSyHIiAb&B5jNrUwb#do9^*Vjs?3ylj2T7DoA!=H`lt6#k-O1{C{MdXl)Os`yq>W zBiln{(<>m8Bnz_pv9}MhL^ra1|Bq~f)*irv{g5TPk?kk411lgC+6l6UFhde`$4u=; zcBl`sfUEn^mDL=rK8#{`-&xMBtg3=A?vo_Q>QN$`TLEEE5c_!|U|@>PcMEL?ZV&M3 zk-pfqZtTylh<&yj`&L?gv_E#O8+)197goR?6mJy!R=-*T?2pk)2?zTyBHfL>+6Q}A zylm)r=GqFFrNIazj^Jo$>rWz#GybP?`LB>nT+083q16v^)m+N;zScG%_TU+OLNlR5~aBmC$%)Ea?(n38mDyW z2Mh_yXy1D)lCf>ArpZ@p=<07`m4dkV6NcHJR~7Tw)t8YylFyEC%F%4>3fAy3I~u6R zLUp`TeO0JVbgHio)oQ1DZK&2d)z^gTbf@}Ss*fI-FrewrwG2|yZY-r+86dfdNnISfIL-he z{sd0`UYAe-lES&vsjJ(RCHKMK$ktGI$4f zB_yn-grVB5@zBt1!)fU?*J)KGBpst|O31}Bb>FjsTzb}WEPq~tJUO+=t;=qcTL){F zW3G4G+orc+Y}-Mx+c4}+!?VOX3MTy>t0SRMvs}INsnKegp57*at#25jajIqdRdUKr zPQ`jhtj6wk9p7r3n^wmn%jrssbyT0J!EE_tRpVaxpF>5k%f3JI+TVhs0CI+jCWdAMOD4iM!9MB4nMYuM!2 zv*GskuG#P_Q}0QT++L}p6czT3mV|-2&%>-4dx3_uUV^$~baq1F=|YtO-wiv`)6TYp zvDjI{#Lcc{H%*TRAM)L*(=;95Y#!B2#Hk-Kdjf*BnY!Ec8s;raIIPmMt73LEJcXw< zoX4n!F91em! z^0|Od*SBmvFDabjz)wCnBTwVf#@?RkaN?)qkm12A@pqs{3*q8v znK-MSxn~;ED=jQRk!`@|OSnuJ0jF~%;8LX@ zk$A+11O!Mr2#&;xQ&I6av;E9I&)-CcRA~?YHjS$h);DA*G+ro` zze6gyU;YEx(gBiX{=P*@-Y@@-)S3|V3V)B0{u(1($y~|7N=bf?q`XfEIZ*oo1ptqp z;^7riF0k1st+|M60jXlx?pUq`=B@=~F5yL5n!rn}A3#dUN`GTq!SzMK_+`8jF<#^} z2$u_~U!iQtf?9nmDLB<1Lls2gw%>?}TZo!U;=PX0z9Jpra`hMVZ5<+0E9d$TpxrCy z26!t8^h0F%m>UekLs3}n4WA3L2gsec8!AzOidhVDoF=etXQ7C!%mQ<B} zC|A@fUbK8rUwFVO1xicHC#ljZU-)Nyuq?mR-AOtjQ!`UJx6irvp8LD!o_jj^^S_^e z1F#OaqG-qI2-@(9h%+J#5u+lqBF03RBF@U-aSanuSU9KQytFwD`6xPZT8AxdLC0j2 zgD>bP>L}?b>!|3ssN<53%Q~*;cvZ$-)$yA6V|y)%*YSpefHkI|Yvi19(MaVCdptE# zu*U}#=#`RLw2i!}Anxl;my4FuA319kOXdB}06k|^A5}ANSUFCgG)kpQg(97+lM@A- zZldBbT{g;mThmFyk zLsZBbxuZtW65TU~$`ckn&l<4`snR85oGw#&I>@DtaAA5^$IbFEf#UrGzSX_`&N)=E z%U0ezYLzVd+-}k1fLOyktn>34;^SRVHBYVD7uv12DP--vrgT=z6Su9_X zr7jw|3PIJ9yJUBN^NO;+HUbHo8|Ik}ShYa6(M5ewkKd6uMqI_{YIpraVw~htWucMU z8HvZbrn7ICcWCVJ9%aVC+7Zf(x+XIYx@W3Ohx^!0t8i9NxTj$|^)qhg6#uwh|BkA| zWJ_W5LdD22{0)0PFnZ3+mInt;C{PNGx#@K=Zz|+a&`y->`F+NulOVi8Ov?$QG~s3y zQ*4-qa>0!vZ$fEQ!5rT?xg9$yR&LD6pRRIY*d8;Ptz*?W%lzvk%HXk9W`7I3pjOv<$wj$t!T)vn}NS=6YE z(eQo@AK)fAnRi3N&!WseP_`jNxClD<--&K?VK!!9KH^wRZ8>IQ zEl0)Nh4|K7PffuFJj2BWLSO_!P5g+!Jw5~=&clvzo^P`1O@5ZWZR~xHpXW;qh=Pq6 zq!e#kI6WZK6G?8T&Kh;B3!q}5QKd!{EFptoJE$->QKdr9`<6l8Kig=}|AGOd~H(DY;p zdfU^QOlu}PLb9V%kV(l9vKLyC>CI%PrYB3%+i+_#y_xI`$&4w;q=*UGUPkrFyBTRF zv!*9oL2o12N4dJWYWOOgTQzbd%TGZjWmU-b<%nyL25xqJ4r1>E#zo2Ql+Lk+E!{|YGFrPLrtTmIoc9x zIyK$VdZh#yPFyV)e@Ht+y5`55nU&ApyE*l3>RnL~}{*`8T#G|%zO;YRaZ�? z=Xqwm(fpKWjx?I*(|nBiv!I^nYxzb6Zt^R^ExvU>C529Uf6W}h2zLDZ~^&p=$+khFM!?2M+nCk-s8%B@t*ji`&cXhZU%KY i8S)j6`D 4.0.0 io.swagger - swagger-jaxrs-resteasy-joda + swagger-jaxrs-resteasy-server war swagger-jaxrs-resteasy-server 1.0.0 @@ -145,11 +145,11 @@ - 1.5.8 + 1.5.9 9.2.9.v20150224 3.0.11.Final 1.6.3 4.8.1 2.5 - + \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java index 97e535d3c21..7fa61c50d24 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiException.java @@ -2,9 +2,9 @@ public class ApiException extends Exception{ - private int code; - public ApiException (int code, String msg) { - super(msg); - this.code = code; - } + private int code; + public ApiException (int code, String msg) { + super(msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java index 38791eef046..2dc07362c92 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiOriginFilter.java @@ -7,16 +7,16 @@ public class ApiOriginFilter implements javax.servlet.Filter { - public void doFilter(ServletRequest request, ServletResponse response, - FilterChain chain) throws IOException, ServletException { - HttpServletResponse res = (HttpServletResponse) response; - res.addHeader("Access-Control-Allow-Origin", "*"); - res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); - res.addHeader("Access-Control-Allow-Headers", "Content-Type"); - chain.doFilter(request, response); - } + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } - public void destroy() {} + public void destroy() {} - public void init(FilterConfig filterConfig) throws ServletException {} + public void init(FilterConfig filterConfig) throws ServletException {} } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java index 87db95c1009..33f95878e54 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/ApiResponseMessage.java @@ -5,65 +5,65 @@ @javax.xml.bind.annotation.XmlRootElement public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; + public static final int ERROR = 1; + public static final int WARNING = 2; + public static final int INFO = 3; + public static final int OK = 4; + public static final int TOO_BUSY = 5; - int code; - String type; - String message; + int code; + String type; + String message; + + public ApiResponseMessage(){} + + public ApiResponseMessage(int code, String message){ + this.code = code; + switch(code){ + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } - public ApiResponseMessage(){} + @XmlTransient + public int getCode() { + return code; + } - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } + public void setCode(int code) { + this.code = code; + } - @XmlTransient - public int getCode() { - return code; - } + public String getType() { + return type; + } - public void setCode(int code) { - this.code = code; - } + public void setType(String type) { + this.type = type; + } - public String getType() { - return type; - } + public String getMessage() { + return message; + } - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } + public void setMessage(String message) { + this.message = message; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java index 0d69172c2cd..a2360fcc82b 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JacksonConfig.java @@ -40,7 +40,6 @@ public void serialize(LocalDate value, JsonGenerator jgen, SerializerProvider pr }); } - @Override public ObjectMapper getContext(Class arg0) { return objectMapper; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java index 707b57ce552..024bc6761d4 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaDateTimeProvider.java @@ -1,44 +1,39 @@ package io.swagger.api; -import com.sun.jersey.core.spi.component.ComponentContext; -import com.sun.jersey.spi.inject.Injectable; -import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; - -import javax.ws.rs.QueryParam; +import org.joda.time.DateTime; +import javax.ws.rs.ext.ParamConverter; +import javax.ws.rs.ext.ParamConverterProvider; +import javax.ws.rs.ext.Provider; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; -import javax.ws.rs.ext.Provider; -import org.joda.time.DateTime; -import java.util.List; + @Provider -public class JodaDateTimeProvider extends PerRequestTypeInjectableProvider { - private final UriInfo uriInfo; +public class JodaDateTimeProvider implements ParamConverterProvider { - public JodaDateTimeProvider(@Context UriInfo uriInfo) { - super(DateTime.class); - this.uriInfo = uriInfo; - } + public static class JodaDateTimeConverter implements ParamConverter { - @Override - public Injectable getInjectable(final ComponentContext cc, final QueryParam a) { - return new Injectable() { - @Override - public DateTime getValue() { - final List values = uriInfo.getQueryParameters().get(a.value()); + public DateTime fromString(String string) { + try { + DateTime dateTime = DateTime.parse(string); + return dateTime; + } catch (Exception e) { + throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). + entity(string + " must be valid DateTime").build()); + } + } - if (values == null || values.isEmpty()) - return null; - if (values.size() > 1) { - throw new WebApplicationException(Response.status(Status.BAD_REQUEST). - entity(a.value() + " cannot contain multiple values").build()); - } + public String toString(DateTime t) { + return t.toString(); + } + } - return DateTime.parse(values.get(0)); - } - }; + public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { + if (DateTime.class.equals(type)) { + return (ParamConverter) new JodaDateTimeConverter(); + } + return null; } } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java index d6b7386f0d2..82a67f1aded 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/JodaLocalDateProvider.java @@ -1,44 +1,39 @@ package io.swagger.api; -import com.sun.jersey.core.spi.component.ComponentContext; -import com.sun.jersey.spi.inject.Injectable; -import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; - -import javax.ws.rs.QueryParam; +import org.joda.time.LocalDate; +import javax.ws.rs.ext.ParamConverter; +import javax.ws.rs.ext.ParamConverterProvider; +import javax.ws.rs.ext.Provider; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; -import javax.ws.rs.ext.Provider; -import org.joda.time.LocalDate; -import java.util.List; + @Provider -public class JodaLocalDateProvider extends PerRequestTypeInjectableProvider { - private final UriInfo uriInfo; +public class JodaLocalDateProvider implements ParamConverterProvider { - public JodaLocalDateProvider(@Context UriInfo uriInfo) { - super(LocalDate.class); - this.uriInfo = uriInfo; - } + public static class JodaLocalDateConverter implements ParamConverter { - @Override - public Injectable getInjectable(final ComponentContext cc, final QueryParam a) { - return new Injectable() { - @Override - public LocalDate getValue() { - final List values = uriInfo.getQueryParameters().get(a.value()); + public LocalDate fromString(String string) { + try { + LocalDate localDate = LocalDate.parse(string); + return localDate; + } catch (Exception e) { + throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST). + entity(string + " must be valid LocalDate").build()); + } + } - if (values == null || values.isEmpty()) - return null; - if (values.size() > 1) { - throw new WebApplicationException(Response.status(Status.BAD_REQUEST). - entity(a.value() + " cannot contain multiple values").build()); - } + public String toString(LocalDate t) { + return t.toString(); + } + } - return LocalDate.parse(values.get(0)); - } - }; + public ParamConverter getConverter(Class type, Type type1, Annotation[] antns) { + if (LocalDate.class.equals(type)) { + return (ParamConverter) new JodaLocalDateConverter(); + } + return null; } } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java index b28b67ea4b2..295109d7fc4 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/NotFoundException.java @@ -2,9 +2,9 @@ public class NotFoundException extends ApiException { - private int code; - public NotFoundException (int code, String msg) { - super(code, msg); - this.code = code; - } + private int code; + public NotFoundException (int code, String msg) { + super(code, msg); + this.code = code; + } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java index 319a3d87cad..3a52f62afd4 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApi.java @@ -4,8 +4,6 @@ import io.swagger.api.PetApiService; import io.swagger.api.factories.PetApiServiceFactory; -import io.swagger.annotations.ApiParam; - import io.swagger.model.Pet; import io.swagger.model.ModelApiResponse; import java.io.File; @@ -15,18 +13,15 @@ import java.io.InputStream; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; import javax.ws.rs.*; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; @Path("/pet") -@io.swagger.annotations.Api(description = "the pet API") public class PetApi { private final PetApiService delegate = PetApiServiceFactory.getPetApi(); @@ -35,16 +30,7 @@ public class PetApi { @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body -,@Context SecurityContext securityContext) + public Response addPet( Pet body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.addPet(body,securityContext); } @@ -52,17 +38,7 @@ public Response addPet(@ApiParam(value = "Pet object that needs to be added to t @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) - public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "" )@HeaderParam("api_key") String apiKey -,@Context SecurityContext securityContext) + public Response deletePet( @PathParam("petId") Long petId,@HeaderParam("api_key") String apiKey,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deletePet(petId,apiKey,securityContext); } @@ -70,18 +46,7 @@ public Response deletePet(@ApiParam(value = "Pet id to delete",required=true) @P @Path("/findByStatus") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class, responseContainer = "List") }) - public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter",required=true) @QueryParam("status") List status -,@Context SecurityContext securityContext) + public Response findPetsByStatus( @QueryParam("status") List status,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByStatus(status,securityContext); } @@ -89,18 +54,7 @@ public Response findPetsByStatus(@ApiParam(value = "Status values that need to b @Path("/findByTags") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class, responseContainer = "List") }) - public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=true) @QueryParam("tags") List tags -,@Context SecurityContext securityContext) + public Response findPetsByTags( @QueryParam("tags") List tags,@Context SecurityContext securityContext) throws NotFoundException { return delegate.findPetsByTags(tags,securityContext); } @@ -108,17 +62,7 @@ public Response findPetsByTags(@ApiParam(value = "Tags to filter by",required=tr @Path("/{petId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = { - @io.swagger.annotations.Authorization(value = "api_key") - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) }) - public Response getPetById(@ApiParam(value = "ID of pet to return",required=true) @PathParam("petId") Long petId -,@Context SecurityContext securityContext) + public Response getPetById( @PathParam("petId") Long petId,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getPetById(petId,securityContext); } @@ -126,20 +70,7 @@ public Response getPetById(@ApiParam(value = "ID of pet to return",required=true @Consumes({ "application/json", "application/xml" }) @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) - public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true) Pet body -,@Context SecurityContext securityContext) + public Response updatePet( Pet body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePet(body,securityContext); } @@ -147,18 +78,7 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t @Path("/{petId}") @Consumes({ "application/x-www-form-urlencoded" }) @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) - public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Updated name of the pet") @FormParam("name") String name -,@ApiParam(value = "Updated status of the pet") @FormParam("status") String status -,@Context SecurityContext securityContext) + public Response updatePetWithForm( @PathParam("petId") Long petId,@FormParam("name") String name,@FormParam("status") String status,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updatePetWithForm(petId,name,status,securityContext); } @@ -166,21 +86,8 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be @Path("/{petId}/uploadImage") @Consumes({ "multipart/form-data" }) @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = { - @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = { - @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), - @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets") - }) - }, tags={ "pet", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) - public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId -,@ApiParam(value = "Additional data to pass to server") @FormParam("additionalMetadata") String additionalMetadata -, - @FormDataParam("file") InputStream fileInputStream, - @FormDataParam("file") FormDataContentDisposition fileDetail -,@Context SecurityContext securityContext) + public Response uploadFile(MultipartFormDataInput input, @PathParam("petId") Long petId,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext); + return delegate.uploadFile(input,petId,securityContext); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java index 1b39321b392..5a9683f311e 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/PetApiService.java @@ -2,8 +2,8 @@ import io.swagger.api.*; import io.swagger.model.*; +import org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.Pet; import io.swagger.model.ModelApiResponse; @@ -19,12 +19,20 @@ public abstract class PetApiService { - public abstract Response addPet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) throws NotFoundException; - public abstract Response findPetsByStatus(List status,SecurityContext securityContext) throws NotFoundException; - public abstract Response findPetsByTags(List tags,SecurityContext securityContext) throws NotFoundException; - public abstract Response getPetById(Long petId,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePet(Pet body,SecurityContext securityContext) throws NotFoundException; - public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException; - public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException; + public abstract Response addPet(Pet body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response deletePet(Long petId,String apiKey,SecurityContext securityContext) + throws NotFoundException; + public abstract Response findPetsByStatus(List status,SecurityContext securityContext) + throws NotFoundException; + public abstract Response findPetsByTags(List tags,SecurityContext securityContext) + throws NotFoundException; + public abstract Response getPetById(Long petId,SecurityContext securityContext) + throws NotFoundException; + public abstract Response updatePet(Pet body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) + throws NotFoundException; + public abstract Response uploadFile(MultipartFormDataInput input,Long petId,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java index 64a5103af62..dcc585fabc2 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApi.java @@ -4,8 +4,6 @@ import io.swagger.api.StoreApiService; import io.swagger.api.factories.StoreApiServiceFactory; -import io.swagger.annotations.ApiParam; - import java.util.Map; import io.swagger.model.Order; @@ -14,9 +12,6 @@ import java.io.InputStream; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -25,7 +20,6 @@ @Path("/store") -@io.swagger.annotations.Api(description = "the store API") public class StoreApi { private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi(); @@ -34,13 +28,7 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) }) - public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true) @PathParam("orderId") String orderId -,@Context SecurityContext securityContext) + public Response deleteOrder( @PathParam("orderId") String orderId,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteOrder(orderId,securityContext); } @@ -48,11 +36,6 @@ public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be @Path("/inventory") @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = { - @io.swagger.annotations.Authorization(value = "api_key") - }, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") }) public Response getInventory(@Context SecurityContext securityContext) throws NotFoundException { return delegate.getInventory(securityContext); @@ -61,15 +44,7 @@ public Response getInventory(@Context SecurityContext securityContext) @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) }) - public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true) @PathParam("orderId") Long orderId -,@Context SecurityContext securityContext) + public Response getOrderById( @PathParam("orderId") Long orderId,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getOrderById(orderId,securityContext); } @@ -77,13 +52,7 @@ public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetch @Path("/order") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) }) - public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true) Order body -,@Context SecurityContext securityContext) + public Response placeOrder( Order body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.placeOrder(body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java index 5ef766d6aa7..2174b1b3547 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/StoreApiService.java @@ -3,7 +3,6 @@ import io.swagger.api.*; import io.swagger.model.*; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import java.util.Map; import io.swagger.model.Order; @@ -18,8 +17,12 @@ public abstract class StoreApiService { - public abstract Response deleteOrder(String orderId,SecurityContext securityContext) throws NotFoundException; - public abstract Response getInventory(SecurityContext securityContext) throws NotFoundException; - public abstract Response getOrderById(Long orderId,SecurityContext securityContext) throws NotFoundException; - public abstract Response placeOrder(Order body,SecurityContext securityContext) throws NotFoundException; + public abstract Response deleteOrder(String orderId,SecurityContext securityContext) + throws NotFoundException; + public abstract Response getInventory(SecurityContext securityContext) + throws NotFoundException; + public abstract Response getOrderById(Long orderId,SecurityContext securityContext) + throws NotFoundException; + public abstract Response placeOrder(Order body,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java index f21efff1ec0..ad69b39c570 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApi.java @@ -4,8 +4,6 @@ import io.swagger.api.UserApiService; import io.swagger.api.factories.UserApiServiceFactory; -import io.swagger.annotations.ApiParam; - import io.swagger.model.User; import java.util.List; @@ -14,9 +12,6 @@ import java.io.InputStream; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.FormDataParam; - import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; @@ -25,7 +20,6 @@ @Path("/user") -@io.swagger.annotations.Api(description = "the user API") public class UserApi { private final UserApiService delegate = UserApiServiceFactory.getUserApi(); @@ -34,11 +28,7 @@ public class UserApi { @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUser(@ApiParam(value = "Created user object" ,required=true) User body -,@Context SecurityContext securityContext) + public Response createUser( User body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUser(body,securityContext); } @@ -46,11 +36,7 @@ public Response createUser(@ApiParam(value = "Created user object" ,required=tru @Path("/createWithArray") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true) List body -,@Context SecurityContext securityContext) + public Response createUsersWithArrayInput( List body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithArrayInput(body,securityContext); } @@ -58,11 +44,7 @@ public Response createUsersWithArrayInput(@ApiParam(value = "List of user object @Path("/createWithList") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) - public Response createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true) List body -,@Context SecurityContext securityContext) + public Response createUsersWithListInput( List body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.createUsersWithListInput(body,securityContext); } @@ -70,13 +52,7 @@ public Response createUsersWithListInput(@ApiParam(value = "List of user object" @Path("/{username}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true) @PathParam("username") String username -,@Context SecurityContext securityContext) + public Response deleteUser( @PathParam("username") String username,@Context SecurityContext securityContext) throws NotFoundException { return delegate.deleteUser(username,securityContext); } @@ -84,15 +60,7 @@ public Response deleteUser(@ApiParam(value = "The name that needs to be deleted" @Path("/{username}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = User.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied", response = User.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = User.class) }) - public Response getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true) @PathParam("username") String username -,@Context SecurityContext securityContext) + public Response getUserByName( @PathParam("username") String username,@Context SecurityContext securityContext) throws NotFoundException { return delegate.getUserByName(username,securityContext); } @@ -100,14 +68,7 @@ public Response getUserByName(@ApiParam(value = "The name that needs to be fetch @Path("/login") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = String.class), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied", response = String.class) }) - public Response loginUser(@ApiParam(value = "The user name for login",required=true) @QueryParam("username") String username -,@ApiParam(value = "The password for login in clear text",required=true) @QueryParam("password") String password -,@Context SecurityContext securityContext) + public Response loginUser( @QueryParam("username") String username, @QueryParam("password") String password,@Context SecurityContext securityContext) throws NotFoundException { return delegate.loginUser(username,password,securityContext); } @@ -115,9 +76,6 @@ public Response loginUser(@ApiParam(value = "The user name for login",required=t @Path("/logout") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) }) public Response logoutUser(@Context SecurityContext securityContext) throws NotFoundException { return delegate.logoutUser(securityContext); @@ -126,14 +84,7 @@ public Response logoutUser(@Context SecurityContext securityContext) @Path("/{username}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", }) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), - - @io.swagger.annotations.ApiResponse(code = 404, message = "User not found", response = Void.class) }) - public Response updateUser(@ApiParam(value = "name that need to be deleted",required=true) @PathParam("username") String username -,@ApiParam(value = "Updated user object" ,required=true) User body -,@Context SecurityContext securityContext) + public Response updateUser( @PathParam("username") String username, User body,@Context SecurityContext securityContext) throws NotFoundException { return delegate.updateUser(username,body,securityContext); } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java index ceff72b6391..5cfa9359e6b 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/api/UserApiService.java @@ -3,7 +3,6 @@ import io.swagger.api.*; import io.swagger.model.*; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import io.swagger.model.User; import java.util.List; @@ -18,12 +17,20 @@ public abstract class UserApiService { - public abstract Response createUser(User body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) throws NotFoundException; - public abstract Response deleteUser(String username,SecurityContext securityContext) throws NotFoundException; - public abstract Response getUserByName(String username,SecurityContext securityContext) throws NotFoundException; - public abstract Response loginUser(String username,String password,SecurityContext securityContext) throws NotFoundException; - public abstract Response logoutUser(SecurityContext securityContext) throws NotFoundException; - public abstract Response updateUser(String username,User body,SecurityContext securityContext) throws NotFoundException; + public abstract Response createUser(User body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response createUsersWithArrayInput(List body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response createUsersWithListInput(List body,SecurityContext securityContext) + throws NotFoundException; + public abstract Response deleteUser(String username,SecurityContext securityContext) + throws NotFoundException; + public abstract Response getUserByName(String username,SecurityContext securityContext) + throws NotFoundException; + public abstract Response loginUser(String username,String password,SecurityContext securityContext) + throws NotFoundException; + public abstract Response logoutUser(SecurityContext securityContext) + throws NotFoundException; + public abstract Response updateUser(String username,User body,SecurityContext securityContext) + throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java index cfd5770c9a4..3ba941f57f4 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class Category { private Long id = null; @@ -15,13 +15,7 @@ public class Category { /** **/ - public Category id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,13 +26,7 @@ public void setId(Long id) { /** **/ - public Category name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java index 4a8b79726b2..80a37b57648 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class ModelApiResponse { private Integer code = null; @@ -16,13 +16,7 @@ public class ModelApiResponse { /** **/ - public ModelApiResponse code(Integer code) { - this.code = code; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("code") public Integer getCode() { return code; @@ -33,13 +27,7 @@ public void setCode(Integer code) { /** **/ - public ModelApiResponse type(String type) { - this.type = type; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("type") public String getType() { return type; @@ -50,13 +38,7 @@ public void setType(String type) { /** **/ - public ModelApiResponse message(String message) { - this.message = message; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("message") public String getMessage() { return message; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java index 1dab5ca3b04..4fc0b7b43f2 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import org.joda.time.DateTime; @@ -9,7 +10,6 @@ - public class Order { private Long id = null; @@ -17,12 +17,15 @@ public class Order { private Integer quantity = null; private DateTime shipDate = null; - + /** + * Order Status + */ public enum StatusEnum { PLACED("placed"), - APPROVED("approved"), - DELIVERED("delivered"); + APPROVED("approved"), + + DELIVERED("delivered"); private String value; StatusEnum(String value) { @@ -32,7 +35,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return value; + return String.valueOf(value); } } @@ -41,13 +44,7 @@ public String toString() { /** **/ - public Order id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -58,13 +55,7 @@ public void setId(Long id) { /** **/ - public Order petId(Long petId) { - this.petId = petId; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("petId") public Long getPetId() { return petId; @@ -75,13 +66,7 @@ public void setPetId(Long petId) { /** **/ - public Order quantity(Integer quantity) { - this.quantity = quantity; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("quantity") public Integer getQuantity() { return quantity; @@ -92,13 +77,7 @@ public void setQuantity(Integer quantity) { /** **/ - public Order shipDate(DateTime shipDate) { - this.shipDate = shipDate; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("shipDate") public DateTime getShipDate() { return shipDate; @@ -110,13 +89,7 @@ public void setShipDate(DateTime shipDate) { /** * Order Status **/ - public Order status(StatusEnum status) { - this.status = status; - return this; - } - - @ApiModelProperty(example = "null", value = "Order Status") @JsonProperty("status") public StatusEnum getStatus() { return status; @@ -127,13 +100,7 @@ public void setStatus(StatusEnum status) { /** **/ - public Order complete(Boolean complete) { - this.complete = complete; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("complete") public Boolean getComplete() { return complete; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java index c11683f766d..92e9f34c765 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.model.Category; @@ -11,7 +12,6 @@ - public class Pet { private Long id = null; @@ -20,12 +20,15 @@ public class Pet { private List photoUrls = new ArrayList(); private List tags = new ArrayList(); - + /** + * pet status in the store + */ public enum StatusEnum { AVAILABLE("available"), - PENDING("pending"), - SOLD("sold"); + PENDING("pending"), + + SOLD("sold"); private String value; StatusEnum(String value) { @@ -35,7 +38,7 @@ public enum StatusEnum { @Override @JsonValue public String toString() { - return value; + return String.valueOf(value); } } @@ -43,13 +46,7 @@ public String toString() { /** **/ - public Pet id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -60,13 +57,7 @@ public void setId(Long id) { /** **/ - public Pet category(Category category) { - this.category = category; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("category") public Category getCategory() { return category; @@ -77,13 +68,7 @@ public void setCategory(Category category) { /** **/ - public Pet name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "doggie", required = true, value = "") @JsonProperty("name") public String getName() { return name; @@ -94,13 +79,7 @@ public void setName(String name) { /** **/ - public Pet photoUrls(List photoUrls) { - this.photoUrls = photoUrls; - return this; - } - - @ApiModelProperty(example = "null", required = true, value = "") @JsonProperty("photoUrls") public List getPhotoUrls() { return photoUrls; @@ -111,13 +90,7 @@ public void setPhotoUrls(List photoUrls) { /** **/ - public Pet tags(List tags) { - this.tags = tags; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("tags") public List getTags() { return tags; @@ -129,13 +102,7 @@ public void setTags(List tags) { /** * pet status in the store **/ - public Pet status(StatusEnum status) { - this.status = status; - return this; - } - - @ApiModelProperty(example = "null", value = "pet status in the store") @JsonProperty("status") public StatusEnum getStatus() { return status; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java index e8a0876ab9a..9a7d194b1ac 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class Tag { private Long id = null; @@ -15,13 +15,7 @@ public class Tag { /** **/ - public Tag id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -32,13 +26,7 @@ public void setId(Long id) { /** **/ - public Tag name(String name) { - this.name = name; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("name") public String getName() { return name; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java index 9444f84c43c..c1e17bb2cfd 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java @@ -1,13 +1,13 @@ package io.swagger.model; import java.util.Objects; +import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; - public class User { private Long id = null; @@ -21,13 +21,7 @@ public class User { /** **/ - public User id(Long id) { - this.id = id; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("id") public Long getId() { return id; @@ -38,13 +32,7 @@ public void setId(Long id) { /** **/ - public User username(String username) { - this.username = username; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("username") public String getUsername() { return username; @@ -55,13 +43,7 @@ public void setUsername(String username) { /** **/ - public User firstName(String firstName) { - this.firstName = firstName; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("firstName") public String getFirstName() { return firstName; @@ -72,13 +54,7 @@ public void setFirstName(String firstName) { /** **/ - public User lastName(String lastName) { - this.lastName = lastName; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("lastName") public String getLastName() { return lastName; @@ -89,13 +65,7 @@ public void setLastName(String lastName) { /** **/ - public User email(String email) { - this.email = email; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("email") public String getEmail() { return email; @@ -106,13 +76,7 @@ public void setEmail(String email) { /** **/ - public User password(String password) { - this.password = password; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("password") public String getPassword() { return password; @@ -123,13 +87,7 @@ public void setPassword(String password) { /** **/ - public User phone(String phone) { - this.phone = phone; - return this; - } - - @ApiModelProperty(example = "null", value = "") @JsonProperty("phone") public String getPhone() { return phone; @@ -141,13 +99,7 @@ public void setPhone(String phone) { /** * User Status **/ - public User userStatus(Integer userStatus) { - this.userStatus = userStatus; - return this; - } - - @ApiModelProperty(example = "null", value = "User Status") @JsonProperty("userStatus") public Integer getUserStatus() { return userStatus; diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java index 001606d8e53..54ae4b48435 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/PetApiServiceFactory.java @@ -3,7 +3,7 @@ import io.swagger.api.PetApiService; import io.swagger.api.impl.PetApiServiceImpl; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class PetApiServiceFactory { private final static PetApiService service = new PetApiServiceImpl(); diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java index 3372e08c682..79a403fee06 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/StoreApiServiceFactory.java @@ -3,7 +3,7 @@ import io.swagger.api.StoreApiService; import io.swagger.api.impl.StoreApiServiceImpl; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class StoreApiServiceFactory { private final static StoreApiService service = new StoreApiServiceImpl(); diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java index 036ec3bfa9e..2f1ae542f1b 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/factories/UserApiServiceFactory.java @@ -3,7 +3,7 @@ import io.swagger.api.UserApiService; import io.swagger.api.impl.UserApiServiceImpl; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class UserApiServiceFactory { private final static UserApiService service = new UserApiServiceImpl(); diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java index 4e088969fbf..86b35a56fce 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/PetApiServiceImpl.java @@ -6,8 +6,8 @@ import io.swagger.model.Pet; -import java.io.File; import io.swagger.model.ModelApiResponse; +import java.io.File; import java.util.List; import io.swagger.api.NotFoundException; @@ -17,7 +17,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class PetApiServiceImpl extends PetApiService { @Override public Response addPet(Pet body,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java index d77f7ad19ca..e07f88cabc0 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/StoreApiServiceImpl.java @@ -15,7 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class StoreApiServiceImpl extends StoreApiService { @Override public Response deleteOrder(String orderId,SecurityContext securityContext) diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java index ec3dff01ece..f7d4e85b680 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/main/java/io/swagger/api/impl/UserApiServiceImpl.java @@ -15,7 +15,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.SecurityContext; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaResteasyServerCodegen", date = "2016-07-01T21:32:16.906+08:00") + public class UserApiServiceImpl extends UserApiService { @Override public Response createUser(User body,SecurityContext securityContext) From 4a6dc1fc2750b75998b8d04666778fe5b0563599 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Jul 2016 00:43:49 +0700 Subject: [PATCH 6/6] Deduplicate artifact names in resteasy projects --- bin/jaxrs-resteasy-joda-petstore-server.sh | 2 +- samples/server/petstore/jaxrs-resteasy/joda/pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/jaxrs-resteasy-joda-petstore-server.sh b/bin/jaxrs-resteasy-joda-petstore-server.sh index d8ec8826868..280428a6955 100755 --- a/bin/jaxrs-resteasy-joda-petstore-server.sh +++ b/bin/jaxrs-resteasy-joda-petstore-server.sh @@ -26,6 +26,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json" +ags="$@ generate --artifact-id swagger-jaxrs-resteasy-joda-server -t modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda -DhideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json" java $JAVA_OPTS -jar $executable $ags diff --git a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml index cac0fffc5ac..1bbfb57b242 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/pom.xml +++ b/samples/server/petstore/jaxrs-resteasy/joda/pom.xml @@ -2,9 +2,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 io.swagger - swagger-jaxrs-resteasy-server + swagger-jaxrs-resteasy-joda-server war - swagger-jaxrs-resteasy-server + swagger-jaxrs-resteasy-joda-server 1.0.0 src/main/java