Skip to content

Commit d2dc333

Browse files
committed
rebuilt
1 parent b41a40f commit d2dc333

17 files changed

+57
-59
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Swagger generated server
22

33
## Overview
4-
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
4+
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the
55
[swagger-spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This
6-
is an example of building a swagger-enabled scalatra server.
6+
is an example of building a swagger-enabled JAX-RS server.
77

8-
This example uses the [scalatra](http://scalatra.org/) framework. To see how to make this your own, look here:
9-
10-
[README](https://github.com/swagger-api/swagger-codegen/tree/master/samples/server-generator/scalatra)
8+
This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework.

samples/server/petstore/jaxrs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
</repository>
169169
</repositories>
170170
<properties>
171-
<swagger-core-version>1.5.3</swagger-core-version>
171+
<swagger-core-version>1.5.4</swagger-core-version>
172172
<jetty-version>9.2.9.v20150224</jetty-version>
173173
<jersey-version>1.18.1</jersey-version>
174174
<slf4j-version>1.6.3</slf4j-version>

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.swagger.api;
22

3-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
3+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
44
public class ApiException extends Exception{
55
private int code;
66
public ApiException (int code, String msg) {

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/ApiOriginFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import javax.servlet.*;
66
import javax.servlet.http.HttpServletResponse;
77

8-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
8+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
99
public class ApiOriginFilter implements javax.servlet.Filter {
1010
public void doFilter(ServletRequest request, ServletResponse response,
1111
FilterChain chain) throws IOException, ServletException {

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/ApiResponseMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import javax.xml.bind.annotation.XmlTransient;
44

55
@javax.xml.bind.annotation.XmlRootElement
6-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
6+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
77
public class ApiResponseMessage {
88
public static final int ERROR = 1;
99
public static final int WARNING = 2;

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/NotFoundException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.swagger.api;
22

3-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
3+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
44
public class NotFoundException extends ApiException {
55
private int code;
66
public NotFoundException (int code, String msg) {

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/PetApi.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
@io.swagger.annotations.Api(value = "/pet", description = "the pet API")
29-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
29+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
3030
public class PetApi {
3131

3232
private final PetApiService delegate = PetApiServiceFactory.getPetApi();
@@ -37,15 +37,15 @@ public class PetApi {
3737
@Produces({ "application/json", "application/xml" })
3838
@io.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class)
3939
@io.swagger.annotations.ApiResponses(value = {
40-
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class),
40+
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
4141

4242
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Void.class),
4343

44-
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class) })
44+
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
4545

4646
public Response updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
4747
throws NotFoundException {
48-
return delegate.updatePet(body);
48+
return delegate.updatePet(body);
4949
}
5050
@POST
5151

@@ -57,7 +57,7 @@ public Response updatePet(@ApiParam(value = "Pet object that needs to be added t
5757

5858
public Response addPet(@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
5959
throws NotFoundException {
60-
return delegate.addPet(body);
60+
return delegate.addPet(body);
6161
}
6262
@GET
6363
@Path("/findByStatus")
@@ -71,7 +71,7 @@ public Response addPet(@ApiParam(value = "Pet object that needs to be added to t
7171

7272
public Response findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue="available") @QueryParam("status") List<String> status)
7373
throws NotFoundException {
74-
return delegate.findPetsByStatus(status);
74+
return delegate.findPetsByStatus(status);
7575
}
7676
@GET
7777
@Path("/findByTags")
@@ -85,23 +85,23 @@ public Response findPetsByStatus(@ApiParam(value = "Status values that need to b
8585

8686
public Response findPetsByTags(@ApiParam(value = "Tags to filter by") @QueryParam("tags") List<String> tags)
8787
throws NotFoundException {
88-
return delegate.findPetsByTags(tags);
88+
return delegate.findPetsByTags(tags);
8989
}
9090
@GET
9191
@Path("/{petId}")
9292

9393
@Produces({ "application/json", "application/xml" })
9494
@io.swagger.annotations.ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class)
9595
@io.swagger.annotations.ApiResponses(value = {
96-
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class),
97-
9896
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
9997

100-
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class) })
98+
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Pet.class),
99+
100+
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found", response = Pet.class) })
101101

102102
public Response getPetById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathParam("petId") Long petId)
103103
throws NotFoundException {
104-
return delegate.getPetById(petId);
104+
return delegate.getPetById(petId);
105105
}
106106
@POST
107107
@Path("/{petId}")
@@ -115,7 +115,7 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be
115115
@ApiParam(value = "Updated name of the pet" )@FormParam("name") String name,
116116
@ApiParam(value = "Updated status of the pet" )@FormParam("status") String status)
117117
throws NotFoundException {
118-
return delegate.updatePetWithForm(petId,name,status);
118+
return delegate.updatePetWithForm(petId,name,status);
119119
}
120120
@DELETE
121121
@Path("/{petId}")
@@ -128,7 +128,7 @@ public Response updatePetWithForm(@ApiParam(value = "ID of pet that needs to be
128128
public Response deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathParam("petId") Long petId,
129129
@ApiParam(value = "" )@HeaderParam("api_key") String apiKey)
130130
throws NotFoundException {
131-
return delegate.deletePet(petId,apiKey);
131+
return delegate.deletePet(petId,apiKey);
132132
}
133133
@POST
134134
@Path("/{petId}/uploadImage")
@@ -143,7 +143,7 @@ public Response uploadFile(@ApiParam(value = "ID of pet to update",required=true
143143
@FormDataParam("file") InputStream inputStream,
144144
@FormDataParam("file") FormDataContentDisposition fileDetail)
145145
throws NotFoundException {
146-
return delegate.uploadFile(petId,additionalMetadata,fileDetail);
146+
return delegate.uploadFile(petId,additionalMetadata,fileDetail);
147147
}
148148
}
149149

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/PetApiService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import javax.ws.rs.core.Response;
2020

21-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
21+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
2222
public abstract class PetApiService {
2323

2424
public abstract Response updatePet(Pet body)

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/StoreApi.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
@io.swagger.annotations.Api(value = "/store", description = "the store API")
29-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
29+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
3030
public class StoreApi {
3131

3232
private final StoreApiService delegate = StoreApiServiceFactory.getStoreApi();
@@ -41,7 +41,7 @@ public class StoreApi {
4141

4242
public Response getInventory()
4343
throws NotFoundException {
44-
return delegate.getInventory();
44+
return delegate.getInventory();
4545
}
4646
@POST
4747
@Path("/order")
@@ -55,37 +55,37 @@ public Response getInventory()
5555

5656
public Response placeOrder(@ApiParam(value = "order placed for purchasing the pet" ) Order body)
5757
throws NotFoundException {
58-
return delegate.placeOrder(body);
58+
return delegate.placeOrder(body);
5959
}
6060
@GET
6161
@Path("/order/{orderId}")
6262

6363
@Produces({ "application/json", "application/xml" })
6464
@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)
6565
@io.swagger.annotations.ApiResponses(value = {
66-
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class),
67-
6866
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
6967

70-
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class) })
68+
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Order.class),
69+
70+
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Order.class) })
7171

7272
public Response getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathParam("orderId") String orderId)
7373
throws NotFoundException {
74-
return delegate.getOrderById(orderId);
74+
return delegate.getOrderById(orderId);
7575
}
7676
@DELETE
7777
@Path("/order/{orderId}")
7878

7979
@Produces({ "application/json", "application/xml" })
8080
@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)
8181
@io.swagger.annotations.ApiResponses(value = {
82-
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class),
82+
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
8383

84-
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class) })
84+
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found", response = Void.class) })
8585

8686
public Response deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathParam("orderId") String orderId)
8787
throws NotFoundException {
88-
return delegate.deleteOrder(orderId);
88+
return delegate.deleteOrder(orderId);
8989
}
9090
}
9191

samples/server/petstore/jaxrs/src/gen/java/io/swagger/api/StoreApiService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import javax.ws.rs.core.Response;
2020

21-
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-08-23T23:29:16.812-07:00")
21+
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JaxRSServerCodegen", date = "2015-10-20T08:49:54.299-07:00")
2222
public abstract class StoreApiService {
2323

2424
public abstract Response getInventory()

0 commit comments

Comments
 (0)