mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 01:12:43 +00:00
fix springmvc by removing import of Object
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package io.swagger.api;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class NotFoundException extends ApiException {
|
||||
private int code;
|
||||
public NotFoundException (int code, String msg) {
|
||||
|
||||
@@ -30,7 +30,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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class PetApi {
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ public class PetApi {
|
||||
method = RequestMethod.PUT)
|
||||
public ResponseEntity<Void> updatePet(
|
||||
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -62,7 +63,8 @@ public class PetApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> addPet(
|
||||
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body)
|
||||
@ApiParam(value = "Pet object that needs to be added to the store" ) Pet body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -80,6 +82,7 @@ public class PetApi {
|
||||
method = RequestMethod.GET)
|
||||
public 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
|
||||
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -98,6 +101,7 @@ public class PetApi {
|
||||
method = RequestMethod.GET)
|
||||
public ResponseEntity<List<Pet>> findPetsByTags(@ApiParam(value = "Tags to filter by") @RequestParam(value = "tags", required = false) List<String> tags
|
||||
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -117,6 +121,7 @@ public class PetApi {
|
||||
method = RequestMethod.GET)
|
||||
public ResponseEntity<Pet> getPetById(
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -134,15 +139,18 @@ public class PetApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> updatePetWithForm(
|
||||
@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") String petId
|
||||
|
||||
,
|
||||
|
||||
|
||||
|
||||
@ApiParam(value = "Updated name of the pet" ) @RequestPart(value="name", required=false) String name,
|
||||
@ApiParam(value = "Updated name of the pet" ) @RequestPart(value="name", required=false) String name
|
||||
,
|
||||
|
||||
|
||||
|
||||
@ApiParam(value = "Updated status of the pet" ) @RequestPart(value="status", required=false) String status)
|
||||
@ApiParam(value = "Updated status of the pet" ) @RequestPart(value="status", required=false) String status
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -159,9 +167,11 @@ public class PetApi {
|
||||
method = RequestMethod.DELETE)
|
||||
public ResponseEntity<Void> deletePet(
|
||||
@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId
|
||||
|
||||
,
|
||||
|
||||
@ApiParam(value = "" ) @RequestHeader(value="apiKey", required=false) String apiKey
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -179,14 +189,17 @@ public class PetApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> uploadFile(
|
||||
@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId
|
||||
|
||||
,
|
||||
|
||||
|
||||
|
||||
@ApiParam(value = "Additional data to pass to server" ) @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,
|
||||
@ApiParam(value = "Additional data to pass to server" ) @RequestPart(value="additionalMetadata", required=false) String additionalMetadata
|
||||
,
|
||||
|
||||
|
||||
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile fileDetail)
|
||||
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
|
||||
@@ -30,7 +30,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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class StoreApi {
|
||||
|
||||
|
||||
@@ -59,7 +59,8 @@ public class StoreApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Order> placeOrder(
|
||||
|
||||
@ApiParam(value = "order placed for purchasing the pet" ) Order body)
|
||||
@ApiParam(value = "order placed for purchasing the pet" ) Order body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Order>(HttpStatus.OK);
|
||||
@@ -78,6 +79,7 @@ public class StoreApi {
|
||||
method = RequestMethod.GET)
|
||||
public ResponseEntity<Order> getOrderById(
|
||||
@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") String orderId
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -96,6 +98,7 @@ public class StoreApi {
|
||||
method = RequestMethod.DELETE)
|
||||
public ResponseEntity<Void> deleteOrder(
|
||||
@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
|
||||
@@ -30,7 +30,7 @@ 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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class UserApi {
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@ public class UserApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> createUser(
|
||||
|
||||
@ApiParam(value = "Created user object" ) User body)
|
||||
@ApiParam(value = "Created user object" ) User body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -60,7 +61,8 @@ public class UserApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> createUsersWithArrayInput(
|
||||
|
||||
@ApiParam(value = "List of user object" ) List<User> body)
|
||||
@ApiParam(value = "List of user object" ) List<User> body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -77,7 +79,8 @@ public class UserApi {
|
||||
method = RequestMethod.POST)
|
||||
public ResponseEntity<Void> createUsersWithListInput(
|
||||
|
||||
@ApiParam(value = "List of user object" ) List<User> body)
|
||||
@ApiParam(value = "List of user object" ) List<User> body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -95,9 +98,11 @@ public class UserApi {
|
||||
method = RequestMethod.GET)
|
||||
public ResponseEntity<String> loginUser(@ApiParam(value = "The user name for login") @RequestParam(value = "username", required = false) String username
|
||||
|
||||
|
||||
,
|
||||
@ApiParam(value = "The password for login in clear text") @RequestParam(value = "password", required = false) String password
|
||||
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -131,7 +136,8 @@ public class UserApi {
|
||||
|
||||
method = RequestMethod.GET)
|
||||
public ResponseEntity<User> getUserByName(
|
||||
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username
|
||||
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.",required=true ) @PathVariable("username") String username
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
@@ -150,10 +156,12 @@ public class UserApi {
|
||||
method = RequestMethod.PUT)
|
||||
public ResponseEntity<Void> updateUser(
|
||||
@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username
|
||||
|
||||
,
|
||||
|
||||
|
||||
@ApiParam(value = "Updated user object" ) User body)
|
||||
@ApiParam(value = "Updated user object" ) User body
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||
@@ -171,6 +179,7 @@ public class UserApi {
|
||||
method = RequestMethod.DELETE)
|
||||
public ResponseEntity<Void> deleteUser(
|
||||
@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username
|
||||
|
||||
)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
|
||||
@@ -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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+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 = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
|
||||
@Override
|
||||
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-08-23T14:20:14.172-07:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-09-30T16:27:59.075+08:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
Reference in New Issue
Block a user