[JAX-RS][Spec] Removes throws Exception. (#7437)

* Issue-7435 Removes throws Exception.

* Issue-7435 Updates jaxrs-samples.
This commit is contained in:
jarlesat 2018-01-22 06:48:59 +01:00 committed by William Cheng
parent 6db63c7a1f
commit 99fc272465
9 changed files with 41 additions and 41 deletions

View File

@ -11,4 +11,4 @@
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} })
@ApiResponses(value = { {{#responses}} @ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} }) @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}){{#hasMore}},{{/hasMore}}{{/responses}} })
{{>returnTypeInterface}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}) throws Exception; {{>returnTypeInterface}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}});

View File

@ -1 +1 @@
2.3.1-SNAPSHOT 2.4.0-SNAPSHOT

View File

@ -23,5 +23,5 @@ public interface AnotherFakeApi {
@ApiOperation(value = "To test special tags", notes = "To test special tags", tags={ "$another-fake?" }) @ApiOperation(value = "To test special tags", notes = "To test special tags", tags={ "$another-fake?" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Client testSpecialTags(@Valid Client body) throws Exception; Client testSpecialTags(@Valid Client body);
} }

View File

@ -25,28 +25,28 @@ public interface FakeApi {
@ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake", }) @ApiOperation(value = "", notes = "Test serialization of outer boolean types", tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) }) @ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
Boolean fakeOuterBooleanSerialize(@Valid Boolean body) throws Exception; Boolean fakeOuterBooleanSerialize(@Valid Boolean body);
@POST @POST
@Path("/outer/composite") @Path("/outer/composite")
@ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake", }) @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite body) throws Exception; OuterComposite fakeOuterCompositeSerialize(@Valid OuterComposite body);
@POST @POST
@Path("/outer/number") @Path("/outer/number")
@ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake", }) @ApiOperation(value = "", notes = "Test serialization of outer number types", tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) }) @ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body) throws Exception; BigDecimal fakeOuterNumberSerialize(@Valid BigDecimal body);
@POST @POST
@Path("/outer/string") @Path("/outer/string")
@ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake", }) @ApiOperation(value = "", notes = "Test serialization of outer string types", tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "Output string", response = String.class) }) @ApiResponse(code = 200, message = "Output string", response = String.class) })
String fakeOuterStringSerialize(@Valid String body) throws Exception; String fakeOuterStringSerialize(@Valid String body);
@PATCH @PATCH
@Consumes({ "application/json" }) @Consumes({ "application/json" })
@ -54,7 +54,7 @@ public interface FakeApi {
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake", }) @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Client testClientModel(@Valid Client body) throws Exception; Client testClientModel(@Valid Client body);
@POST @POST
@Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" }) @Consumes({ "application/xml; charset=utf-8", "application/json; charset=utf-8" })
@ -65,7 +65,7 @@ public interface FakeApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) throws Exception; void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback);
@GET @GET
@Consumes({ "*/*" }) @Consumes({ "*/*" })
@ -74,7 +74,7 @@ public interface FakeApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request", response = Void.class), @ApiResponse(code = 400, message = "Invalid request", response = Void.class),
@ApiResponse(code = 404, message = "Not found", response = Void.class) }) @ApiResponse(code = 404, message = "Not found", response = Void.class) })
void testEnumParameters(@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) throws Exception; void testEnumParameters(@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble);
@POST @POST
@Path("/inline-additionalProperties") @Path("/inline-additionalProperties")
@ -82,7 +82,7 @@ public interface FakeApi {
@ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake", }) @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void testInlineAdditionalProperties(@Valid Object param) throws Exception; void testInlineAdditionalProperties(@Valid Object param);
@GET @GET
@Path("/jsonFormData") @Path("/jsonFormData")
@ -90,5 +90,5 @@ public interface FakeApi {
@ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" }) @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) throws Exception; void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2);
} }

View File

@ -24,5 +24,5 @@ public interface FakeClassnameTestApi {
}, tags={ "fake_classname_tags 123#$%^" }) }, tags={ "fake_classname_tags 123#$%^" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) }) @ApiResponse(code = 200, message = "successful operation", response = Client.class) })
Client testClassname(@Valid Client body) throws Exception; Client testClassname(@Valid Client body);
} }

View File

@ -29,7 +29,7 @@ public interface PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) @ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
void addPet(@Valid Pet body) throws Exception; void addPet(@Valid Pet body);
@DELETE @DELETE
@Path("/{petId}") @Path("/{petId}")
@ -42,7 +42,7 @@ public interface PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) }) @ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey) throws Exception; void deletePet(@PathParam("petId") @ApiParam("Pet id to delete") Long petId,@HeaderParam("api_key") String apiKey);
@GET @GET
@Path("/findByStatus") @Path("/findByStatus")
@ -56,7 +56,7 @@ public interface PetApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid status value", response = Void.class, responseContainer = "List") }) @ApiResponse(code = 400, message = "Invalid status value", response = Void.class, responseContainer = "List") })
List<Pet> findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List<String> status) throws Exception; List<Pet> findPetsByStatus(@QueryParam("status") @NotNull @ApiParam("Status values that need to be considered for filter") List<String> status);
@GET @GET
@Path("/findByTags") @Path("/findByTags")
@ -70,7 +70,7 @@ public interface PetApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "List") }) @ApiResponse(code = 400, message = "Invalid tag value", response = Void.class, responseContainer = "List") })
List<Pet> findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") List<String> tags) throws Exception; List<Pet> findPetsByTags(@QueryParam("tags") @NotNull @ApiParam("Tags to filter by") List<String> tags);
@GET @GET
@Path("/{petId}") @Path("/{petId}")
@ -82,7 +82,7 @@ public interface PetApi {
@ApiResponse(code = 200, message = "successful operation", response = Pet.class), @ApiResponse(code = 200, message = "successful operation", response = Pet.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Void.class) }) @ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
Pet getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId) throws Exception; Pet getPetById(@PathParam("petId") @ApiParam("ID of pet to return") Long petId);
@PUT @PUT
@Consumes({ "application/json", "application/xml" }) @Consumes({ "application/json", "application/xml" })
@ -97,7 +97,7 @@ public interface PetApi {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Pet not found", response = Void.class), @ApiResponse(code = 404, message = "Pet not found", response = Void.class),
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) }) @ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
void updatePet(@Valid Pet body) throws Exception; void updatePet(@Valid Pet body);
@POST @POST
@Path("/{petId}") @Path("/{petId}")
@ -111,7 +111,7 @@ public interface PetApi {
}, tags={ "pet", }) }, tags={ "pet", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) }) @ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
void updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status) throws Exception; void updatePetWithForm(@PathParam("petId") @ApiParam("ID of pet that needs to be updated") Long petId,@FormParam(value = "name") String name,@FormParam(value = "status") String status);
@POST @POST
@Path("/{petId}/uploadImage") @Path("/{petId}/uploadImage")
@ -126,5 +126,5 @@ public interface PetApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) }) @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream, ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream,
@FormParam(value = "file") Attachment fileDetail) throws Exception; @FormParam(value = "file") Attachment fileDetail);
} }

View File

@ -24,7 +24,7 @@ public interface StoreApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = Void.class) }) @ApiResponse(code = 404, message = "Order not found", response = Void.class) })
void deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId) throws Exception; void deleteOrder(@PathParam("order_id") @ApiParam("ID of the order that needs to be deleted") String orderId);
@GET @GET
@Path("/inventory") @Path("/inventory")
@ -34,7 +34,7 @@ public interface StoreApi {
}, tags={ "store", }) }, tags={ "store", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") }) @ApiResponse(code = 200, message = "successful operation", response = Map.class, responseContainer = "Map") })
Map<String, Integer> getInventory() throws Exception; Map<String, Integer> getInventory();
@GET @GET
@Path("/order/{order_id}") @Path("/order/{order_id}")
@ -44,7 +44,7 @@ public interface StoreApi {
@ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
@ApiResponse(code = 404, message = "Order not found", response = Void.class) }) @ApiResponse(code = 404, message = "Order not found", response = Void.class) })
Order getOrderById(@PathParam("order_id") @Min(1) @Max(5) @ApiParam("ID of pet that needs to be fetched") Long orderId) throws Exception; Order getOrderById(@PathParam("order_id") @Min(1L) @Max(5L) @ApiParam("ID of pet that needs to be fetched") Long orderId);
@POST @POST
@Path("/order") @Path("/order")
@ -53,5 +53,5 @@ public interface StoreApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 200, message = "successful operation", response = Order.class),
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) }) @ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
Order placeOrder(@Valid Order body) throws Exception; Order placeOrder(@Valid Order body);
} }

View File

@ -22,7 +22,7 @@ public interface UserApi {
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user", }) @ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createUser(@Valid User body) throws Exception; void createUser(@Valid User body);
@POST @POST
@Path("/createWithArray") @Path("/createWithArray")
@ -30,7 +30,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user", }) @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createUsersWithArrayInput(@Valid List<User> body) throws Exception; void createUsersWithArrayInput(@Valid List<User> body);
@POST @POST
@Path("/createWithList") @Path("/createWithList")
@ -38,7 +38,7 @@ public interface UserApi {
@ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user", }) @ApiOperation(value = "Creates list of users with given input array", notes = "", tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void createUsersWithListInput(@Valid List<User> body) throws Exception; void createUsersWithListInput(@Valid List<User> body);
@DELETE @DELETE
@Path("/{username}") @Path("/{username}")
@ -47,7 +47,7 @@ public interface UserApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
void deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username) throws Exception; void deleteUser(@PathParam("username") @ApiParam("The name that needs to be deleted") String username);
@GET @GET
@Path("/{username}") @Path("/{username}")
@ -57,7 +57,7 @@ public interface UserApi {
@ApiResponse(code = 200, message = "successful operation", response = User.class), @ApiResponse(code = 200, message = "successful operation", response = User.class),
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
User getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing. ") String username) throws Exception; User getUserByName(@PathParam("username") @ApiParam("The name that needs to be fetched. Use user1 for testing. ") String username);
@GET @GET
@Path("/login") @Path("/login")
@ -66,7 +66,7 @@ public interface UserApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = String.class), @ApiResponse(code = 200, message = "successful operation", response = String.class),
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) }) @ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password) throws Exception; String loginUser(@QueryParam("username") @NotNull @ApiParam("The user name for login") String username,@QueryParam("password") @NotNull @ApiParam("The password for login in clear text") String password);
@GET @GET
@Path("/logout") @Path("/logout")
@ -74,7 +74,7 @@ public interface UserApi {
@ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user", }) @ApiOperation(value = "Logs out current logged in user session", notes = "", tags={ "user", })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) }) @ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void logoutUser() throws Exception; void logoutUser();
@PUT @PUT
@Path("/{username}") @Path("/{username}")
@ -83,5 +83,5 @@ public interface UserApi {
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class), @ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
@ApiResponse(code = 404, message = "User not found", response = Void.class) }) @ApiResponse(code = 404, message = "User not found", response = Void.class) })
void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid User body) throws Exception; void updateUser(@PathParam("username") @ApiParam("name that need to be deleted") String username,@Valid User body);
} }

View File

@ -108,8 +108,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "available", "enum" : [ "available", "pending", "sold" ],
"enum" : [ "available", "pending", "sold" ] "default" : "available"
}, },
"collectionFormat" : "csv" "collectionFormat" : "csv"
} ], } ],
@ -680,8 +680,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "$", "enum" : [ ">", "$" ],
"enum" : [ ">", "$" ] "default" : "$"
} }
}, { }, {
"name" : "enum_form_string", "name" : "enum_form_string",
@ -699,8 +699,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "$", "enum" : [ ">", "$" ],
"enum" : [ ">", "$" ] "default" : "$"
} }
}, { }, {
"name" : "enum_header_string", "name" : "enum_header_string",
@ -718,8 +718,8 @@
"type" : "array", "type" : "array",
"items" : { "items" : {
"type" : "string", "type" : "string",
"default" : "$", "enum" : [ ">", "$" ],
"enum" : [ ">", "$" ] "default" : "$"
} }
}, { }, {
"name" : "enum_query_string", "name" : "enum_query_string",