forked from loafle/openapi-generator-original
Merge branch 'issue2374' of https://github.com/kolyjjj/swagger-codegen into kolyjjj-issue2374
Conflicts: samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/ApiException.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/ApiOriginFilter.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/ApiResponseMessage.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/NotFoundException.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/configuration/SwaggerConfig.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/configuration/SwaggerUiConfiguration.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/configuration/WebApplication.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/configuration/WebMvcConfiguration.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ApiResponse.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Category.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Order.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Pet.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Tag.java samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/User.java
This commit is contained in:
commit
a0b429d690
@ -32,18 +32,6 @@ public class SpringMVCServerCodegen extends JavaClientCodegen {
|
||||
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage);
|
||||
additionalProperties.put(CONFIG_PACKAGE, configPackage);
|
||||
|
||||
languageSpecificPrimitives = new HashSet<String>(
|
||||
Arrays.asList(
|
||||
"byte[]",
|
||||
"String",
|
||||
"boolean",
|
||||
"Boolean",
|
||||
"Double",
|
||||
"Integer",
|
||||
"Long",
|
||||
"Float")
|
||||
);
|
||||
|
||||
cliOptions.add(new CliOption(CONFIG_PACKAGE, "configuration package for generated code"));
|
||||
|
||||
supportedLibraries.clear();
|
||||
|
@ -29,8 +29,8 @@ import java.util.List;
|
||||
import static org.springframework.http.MediaType.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(value = "/{{baseName}}", produces = {APPLICATION_JSON_VALUE})
|
||||
@Api(value = "/{{baseName}}", description = "the {{baseName}} API")
|
||||
@RequestMapping(value = "/{{{baseName}}}", produces = {APPLICATION_JSON_VALUE})
|
||||
@Api(value = "/{{{baseName}}}", description = "the {{{baseName}}} API")
|
||||
{{>generatedAnnotation}}
|
||||
{{#operations}}
|
||||
public class {{classname}} {
|
||||
@ -44,8 +44,8 @@ public class {{classname}} {
|
||||
{{/hasMore}}{{/authMethods}}
|
||||
}{{/hasAuthMethods}})
|
||||
@io.swagger.annotations.ApiResponses(value = { {{#responses}}
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}"){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||
@RequestMapping(value = "{{path}}",
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{returnType}}}.class){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||
@RequestMapping(value = "{{{path}}}",
|
||||
{{#hasProduces}}produces = { {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}
|
||||
{{#hasConsumes}}consumes = { {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}
|
||||
method = RequestMethod.{{httpMethod}})
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.swagger.api;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class NotFoundException extends ApiException {
|
||||
private int code;
|
||||
public NotFoundException (int code, String msg) {
|
||||
|
@ -3,8 +3,8 @@ package io.swagger.api;
|
||||
import io.swagger.model.*;
|
||||
|
||||
import io.swagger.model.Pet;
|
||||
import io.swagger.model.ApiResponse;
|
||||
import java.io.File;
|
||||
import io.swagger.model.ApiResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@ -32,7 +32,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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class PetApi {
|
||||
|
||||
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
||||
@ -42,8 +42,8 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input") })
|
||||
@RequestMapping(value = "",
|
||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" },
|
||||
method = RequestMethod.POST)
|
||||
@ -64,8 +64,8 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value") })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.DELETE)
|
||||
@ -74,7 +74,7 @@ public class PetApi {
|
||||
|
||||
,
|
||||
|
||||
@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey
|
||||
@ApiParam(value = "" ) @RequestHeader(value="apiKey", required=false) String apiKey
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
@ -90,9 +90,9 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value") })
|
||||
@RequestMapping(value = "/findByStatus",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid status value", response = Pet.class) })
|
||||
@RequestMapping(value = "/findByStatus",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -113,9 +113,9 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value") })
|
||||
@RequestMapping(value = "/findByTags",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid tag value", response = Pet.class) })
|
||||
@RequestMapping(value = "/findByTags",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -133,10 +133,10 @@ public class PetApi {
|
||||
@Authorization(value = "api_key")
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found") })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
@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) })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -157,10 +157,10 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Pet not found"),
|
||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Validation exception") })
|
||||
@RequestMapping(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) })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json", "application/xml" },
|
||||
method = RequestMethod.PUT)
|
||||
@ -181,8 +181,8 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input") })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
@io.swagger.annotations.ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||
@RequestMapping(value = "/{petId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/x-www-form-urlencoded" },
|
||||
method = RequestMethod.POST)
|
||||
@ -213,8 +213,8 @@ public class PetApi {
|
||||
})
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/{petId}/uploadImage",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ApiResponse.class) })
|
||||
@RequestMapping(value = "/{petId}/uploadImage",
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
|
@ -31,14 +31,14 @@ 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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class 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)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found") })
|
||||
@RequestMapping(value = "/order/{orderId}",
|
||||
@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) })
|
||||
@RequestMapping(value = "/order/{orderId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.DELETE)
|
||||
@ -56,8 +56,8 @@ public class StoreApi {
|
||||
@Authorization(value = "api_key")
|
||||
})
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/inventory",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Integer.class) })
|
||||
@RequestMapping(value = "/inventory",
|
||||
produces = { "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -70,10 +70,10 @@ public class StoreApi {
|
||||
|
||||
@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)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "Order not found") })
|
||||
@RequestMapping(value = "/order/{orderId}",
|
||||
@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) })
|
||||
@RequestMapping(value = "/order/{orderId}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -89,9 +89,9 @@ public class StoreApi {
|
||||
|
||||
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order") })
|
||||
@RequestMapping(value = "/order",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid Order", response = Order.class) })
|
||||
@RequestMapping(value = "/order",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
|
@ -31,13 +31,13 @@ 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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
@ -53,8 +53,8 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/createWithArray",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
@RequestMapping(value = "/createWithArray",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
@ -70,8 +70,8 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/createWithList",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
@RequestMapping(value = "/createWithList",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.POST)
|
||||
@ -87,9 +87,9 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found") })
|
||||
@RequestMapping(value = "/{username}",
|
||||
@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) })
|
||||
@RequestMapping(value = "/{username}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.DELETE)
|
||||
@ -105,10 +105,10 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Get user by user name", notes = "", response = User.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found") })
|
||||
@RequestMapping(value = "/{username}",
|
||||
@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) })
|
||||
@RequestMapping(value = "/{username}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -124,9 +124,9 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation"),
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid username/password supplied") })
|
||||
@RequestMapping(value = "/login",
|
||||
@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) })
|
||||
@RequestMapping(value = "/login",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -146,8 +146,8 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/logout",
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
@RequestMapping(value = "/logout",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.GET)
|
||||
@ -160,9 +160,9 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||
@io.swagger.annotations.ApiResponses(value = {
|
||||
@io.swagger.annotations.ApiResponse(code = 400, message = "Invalid user supplied"),
|
||||
@io.swagger.annotations.ApiResponse(code = 404, message = "User not found") })
|
||||
@RequestMapping(value = "/{username}",
|
||||
@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) })
|
||||
@RequestMapping(value = "/{username}",
|
||||
produces = { "application/xml", "application/json" },
|
||||
|
||||
method = RequestMethod.PUT)
|
||||
|
@ -18,7 +18,7 @@ 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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class SwaggerConfig {
|
||||
@Bean
|
||||
ApiInfo apiInfo() {
|
||||
|
@ -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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+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-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
|
||||
@Override
|
||||
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
|
||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class ApiResponse {
|
||||
|
||||
private Integer code = null;
|
||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -13,7 +13,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -16,7 +16,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
@ -11,7 +11,7 @@ import java.util.Objects;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-15T00:38:43.027+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2016-04-14T23:14:04.836+08:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user