forked from loafle/openapi-generator-original
Merge branch 'kolyjjj-upgrade_version'
This commit is contained in:
commit
eb3f5fb218
@ -163,10 +163,9 @@
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<jersey-version>1.13</jersey-version>
|
||||
<slf4j-version>1.6.3</slf4j-version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<servlet-api-version>2.5</servlet-api-version>
|
||||
<springfox-version>2.0.4-SNAPSHOT</springfox-version>
|
||||
<spring-version>4.0.9.RELEASE</spring-version>
|
||||
<springfox-version>2.4.0</springfox-version>
|
||||
<spring-version>4.2.5.RELEASE</spring-version>
|
||||
</properties>
|
||||
</project>
|
@ -163,10 +163,9 @@
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<jersey-version>1.13</jersey-version>
|
||||
<slf4j-version>1.6.3</slf4j-version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<servlet-api-version>2.5</servlet-api-version>
|
||||
<springfox-version>2.0.4-SNAPSHOT</springfox-version>
|
||||
<spring-version>4.0.9.RELEASE</spring-version>
|
||||
<springfox-version>2.4.0</springfox-version>
|
||||
<spring-version>4.2.5.RELEASE</spring-version>
|
||||
</properties>
|
||||
</project>
|
@ -1,6 +1,6 @@
|
||||
package io.swagger.api;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class ApiException extends Exception{
|
||||
private int code;
|
||||
public ApiException (int code, String msg) {
|
||||
|
@ -5,7 +5,7 @@ import java.io.IOException;
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class ApiOriginFilter implements javax.servlet.Filter {
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response,
|
||||
|
@ -3,7 +3,7 @@ package io.swagger.api;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
@javax.xml.bind.annotation.XmlRootElement
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class ApiResponseMessage {
|
||||
public static final int ERROR = 1;
|
||||
public static final int WARNING = 2;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.swagger.api;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class NotFoundException extends ApiException {
|
||||
private int code;
|
||||
public NotFoundException (int code, String msg) {
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.api;
|
||||
import io.swagger.model.*;
|
||||
|
||||
import io.swagger.model.Pet;
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
@ -34,7 +35,7 @@ import static org.springframework.http.MediaType.*;
|
||||
@Controller
|
||||
@RequestMapping(value = "/pet", produces = {APPLICATION_JSON_VALUE})
|
||||
@Api(value = "/pet", description = "the pet API")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public interface PetApi {
|
||||
|
||||
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
||||
@ -46,12 +47,12 @@ public interface PetApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input") })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" },
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Void>> addPet(
|
||||
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ) @RequestBody Pet body
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@ -68,7 +69,7 @@ public interface PetApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 400, message = "Invalid pet value") })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.DELETE)
|
||||
default Callable<ResponseEntity<Void>> deletePet(
|
||||
@ -85,7 +86,7 @@ public interface PetApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma seperated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
@ -95,10 +96,10 @@ public interface PetApi {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid status value") })
|
||||
@RequestMapping(value = "/findByStatus",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<List<Pet>>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", defaultValue = "available") @RequestParam(value = "status", required = false, defaultValue="available") List<String> status
|
||||
default Callable<ResponseEntity<List<Pet>>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", required = true) @RequestParam(value = "status", required = true) List<String> status
|
||||
|
||||
|
||||
)
|
||||
@ -108,7 +109,7 @@ public interface PetApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "Finds Pets by tags", notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@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 = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
@ -118,10 +119,10 @@ public interface PetApi {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid tag value") })
|
||||
@RequestMapping(value = "/findByTags",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<List<Pet>>> findPetsByTags(@ApiParam(value = "Tags to filter by") @RequestParam(value = "tags", required = false) List<String> tags
|
||||
default Callable<ResponseEntity<List<Pet>>> findPetsByTags(@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags
|
||||
|
||||
|
||||
)
|
||||
@ -131,11 +132,7 @@ public interface PetApi {
|
||||
}
|
||||
|
||||
|
||||
@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, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
}),
|
||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||
@Authorization(value = "api_key")
|
||||
})
|
||||
@ApiResponses(value = {
|
||||
@ -143,11 +140,11 @@ public interface PetApi {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@ApiResponse(code = 404, message = "Pet not found") })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<Pet>> getPetById(
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId
|
||||
@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
@ -167,12 +164,12 @@ public interface PetApi {
|
||||
@ApiResponse(code = 404, message = "Pet not found"),
|
||||
@ApiResponse(code = 405, message = "Validation exception") })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" },
|
||||
method = RequestMethod.PUT)
|
||||
default Callable<ResponseEntity<Void>> updatePet(
|
||||
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ) @RequestBody Pet body
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @RequestBody Pet body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@ -189,11 +186,11 @@ public interface PetApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 405, message = "Invalid input") })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/x-www-form-urlencoded" },
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Void>> updatePetWithForm(
|
||||
@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") String petId
|
||||
@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId
|
||||
|
||||
,
|
||||
|
||||
@ -212,7 +209,7 @@ public interface PetApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "uploads an image", notes = "", response = Void.class, authorizations = {
|
||||
@ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
@ -221,10 +218,10 @@ public interface PetApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/{petId}/uploadImage",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Void>> uploadFile(
|
||||
default Callable<ResponseEntity<ModelApiResponse>> uploadFile(
|
||||
@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId
|
||||
|
||||
,
|
||||
@ -239,7 +236,7 @@ public interface PetApi {
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return () -> new ResponseEntity<Void>(HttpStatus.OK);
|
||||
return () -> new ResponseEntity<ModelApiResponse>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import static org.springframework.http.MediaType.*;
|
||||
@Controller
|
||||
@RequestMapping(value = "/store", produces = {APPLICATION_JSON_VALUE})
|
||||
@Api(value = "/store", description = "the store API")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public interface StoreApi {
|
||||
|
||||
@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)
|
||||
@ -42,7 +42,7 @@ public interface StoreApi {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@ApiResponse(code = 404, message = "Order not found") })
|
||||
@RequestMapping(value = "/order/{orderId}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.DELETE)
|
||||
default Callable<ResponseEntity<Void>> deleteOrder(
|
||||
@ -61,7 +61,7 @@ public interface StoreApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/inventory",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<Map<String, Integer>>> getInventory()
|
||||
@ -77,11 +77,11 @@ public interface StoreApi {
|
||||
@ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@ApiResponse(code = 404, message = "Order not found") })
|
||||
@RequestMapping(value = "/order/{orderId}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<Order>> getOrderById(
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") String orderId
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
@ -95,12 +95,12 @@ public interface StoreApi {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid Order") })
|
||||
@RequestMapping(value = "/order",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Order>> placeOrder(
|
||||
|
||||
@ApiParam(value = "order placed for purchasing the pet" ) @RequestBody Order body
|
||||
@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @RequestBody Order body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
|
@ -34,19 +34,19 @@ import static org.springframework.http.MediaType.*;
|
||||
@Controller
|
||||
@RequestMapping(value = "/user", produces = {APPLICATION_JSON_VALUE})
|
||||
@Api(value = "/user", description = "the user API")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public interface UserApi {
|
||||
|
||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Void>> createUser(
|
||||
|
||||
@ApiParam(value = "Created user object" ) @RequestBody User body
|
||||
@ApiParam(value = "Created user object" ,required=true ) @RequestBody User body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@ -58,12 +58,12 @@ public interface UserApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/createWithArray",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Void>> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object" ) @RequestBody List<User> body
|
||||
@ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@ -75,12 +75,12 @@ public interface UserApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/createWithList",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
default Callable<ResponseEntity<Void>> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object" ) @RequestBody List<User> body
|
||||
@ApiParam(value = "List of user object" ,required=true ) @RequestBody List<User> body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@ -93,7 +93,7 @@ public interface UserApi {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
@RequestMapping(value = "/{username}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.DELETE)
|
||||
default Callable<ResponseEntity<Void>> deleteUser(
|
||||
@ -112,7 +112,7 @@ public interface UserApi {
|
||||
@ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
@RequestMapping(value = "/{username}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<User>> getUserByName(
|
||||
@ -130,14 +130,14 @@ public interface UserApi {
|
||||
@ApiResponse(code = 200, message = "successful operation"),
|
||||
@ApiResponse(code = 400, message = "Invalid username/password supplied") })
|
||||
@RequestMapping(value = "/login",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<String>> loginUser(@ApiParam(value = "The user name for login") @RequestParam(value = "username", required = false) String username
|
||||
default Callable<ResponseEntity<String>> loginUser(@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username
|
||||
|
||||
|
||||
,
|
||||
@ApiParam(value = "The password for login in clear text") @RequestParam(value = "password", required = false) String password
|
||||
@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password
|
||||
|
||||
|
||||
)
|
||||
@ -151,7 +151,7 @@ public interface UserApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/logout",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
default Callable<ResponseEntity<Void>> logoutUser()
|
||||
@ -166,7 +166,7 @@ public interface UserApi {
|
||||
@ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||
@ApiResponse(code = 404, message = "User not found") })
|
||||
@RequestMapping(value = "/{username}",
|
||||
produces = { "application/json", "application/xml" },
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.PUT)
|
||||
default Callable<ResponseEntity<Void>> updateUser(
|
||||
@ -175,7 +175,7 @@ public interface UserApi {
|
||||
,
|
||||
|
||||
|
||||
@ApiParam(value = "Updated user object" ) @RequestBody User body
|
||||
@ApiParam(value = "Updated user object" ,required=true ) @RequestBody User body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
|
@ -20,18 +20,18 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
@EnableSwagger2 //Loads the spring beans required by the framework
|
||||
@PropertySource("classpath:swagger.properties")
|
||||
@Import(SwaggerUiConfiguration.class)
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class SwaggerConfig {
|
||||
@Bean
|
||||
ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Swagger Petstore")
|
||||
.description("This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters")
|
||||
.description("This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.")
|
||||
.license("Apache 2.0")
|
||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
||||
.termsOfServiceUrl("")
|
||||
.version("1.0.0")
|
||||
.contact(new Contact("","", "apiteam@wordnik.com"))
|
||||
.contact(new Contact("","", "apiteam@swagger.io"))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class SwaggerUiConfiguration extends WebMvcConfigurerAdapter {
|
||||
private static final String[] SERVLET_RESOURCE_LOCATIONS = { "/" };
|
||||
|
||||
|
@ -2,7 +2,7 @@ package io.swagger.configuration;
|
||||
|
||||
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class WebApplication extends AbstractAnnotationConfigDispatcherServletInitializer {
|
||||
|
||||
@Override
|
||||
|
@ -3,7 +3,7 @@ package io.swagger.configuration;
|
||||
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
|
||||
@Override
|
||||
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
|
||||
|
@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -0,0 +1,84 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class ModelApiResponse {
|
||||
|
||||
private Integer code = null;
|
||||
private String type = null;
|
||||
private String message = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("code")
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("type")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty("message")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||
return Objects.equals(code, _apiResponse.code) &&
|
||||
Objects.equals(type, _apiResponse.type) &&
|
||||
Objects.equals(message, _apiResponse.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(code, type, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ModelApiResponse {\n");
|
||||
|
||||
sb.append(" code: ").append(code).append("\n");
|
||||
sb.append(" type: ").append(type).append("\n");
|
||||
sb.append(" message: ").append(message).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
@ -23,7 +23,7 @@ public class Order {
|
||||
};
|
||||
|
||||
private StatusEnum status = null;
|
||||
private Boolean complete = null;
|
||||
private Boolean complete = false;
|
||||
|
||||
/**
|
||||
**/
|
||||
|
@ -14,7 +14,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-03T13:42:56.594+02:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-05-11T18:25:35.092+08:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user