diff --git a/bin/spring-mvc-petstore-j8-async-server.sh b/bin/spring-mvc-petstore-j8-async-server.sh
index 1dd6f039836..fb092630f39 100755
--- a/bin/spring-mvc-petstore-j8-async-server.sh
+++ b/bin/spring-mvc-petstore-j8-async-server.sh
@@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
-ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaSpring -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l spring --library spring-mvc -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,java8=true,async=true"
+ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaSpring -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,java8=true,async=true"
java $JAVA_OPTS -jar $executable $ags
diff --git a/bin/spring-mvc-petstore-j8-async.json b/bin/spring-mvc-petstore-j8-async.json
index c19430ec9ab..92baa989c36 100644
--- a/bin/spring-mvc-petstore-j8-async.json
+++ b/bin/spring-mvc-petstore-j8-async.json
@@ -1,3 +1,6 @@
{
- "library": "j8-async"
+ "java8": true,
+ "async": true,
+ "library": "spring-mvc",
+ "artifactId": "swagger-spring-mvc-server-j8-async"
}
diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/api.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/api.mustache
index 610c97e4117..66b73539ca1 100644
--- a/modules/swagger-codegen/src/main/resources/JavaSpring/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaSpring/api.mustache
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-{{#useSpringCloudClient}}
+{{^useSpringCloudClient}}
import java.io.IOException;
{{/useSpringCloudClient}}
diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/apiController.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/apiController.mustache
index c2f437970ab..bef1835b9a2 100644
--- a/modules/swagger-codegen/src/main/resources/JavaSpring/apiController.mustache
+++ b/modules/swagger-codegen/src/main/resources/JavaSpring/apiController.mustache
@@ -17,15 +17,16 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-{{^useSpringCloudClient}}
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-{{/useSpringCloudClient}}
import java.util.List;
{{#async}}
import java.util.concurrent.Callable;
-{{/async}}{{/jdk8-no-delegate}}
+{{/async}}
+{{/jdk8-no-delegate}}
+{{^useSpringCloudClient}}
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+{{/useSpringCloudClient}}
{{#useBeanValidation}}
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml b/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml
index 692689565da..e3ba184ea57 100644
--- a/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml
+++ b/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml
@@ -1,20 +1,29 @@
swagger: '2.0'
info:
- description: >-
- This is a sample server Petstore server. You can find out more about
- Swagger at http://swagger.io 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.'
version: 1.0.0
title: Swagger Petstore
- termsOfService: 'http://helloreverb.com/terms/'
+ termsOfService: 'http://swagger.io/terms/'
contact:
- email: apiteam@wordnik.com
+ email: apiteam@swagger.io
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
host: petstore.swagger.io
basePath: /v2
+tags:
+ - name: pet
+ description: Everything about your Pets
+ externalDocs:
+ description: Find out more
+ url: 'http://swagger.io'
+ - name: store
+ description: Access to Petstore orders
+ - name: user
+ description: Operations about user
+ externalDocs:
+ description: Find out more about our store
+ url: 'http://swagger.io'
schemes:
- http
paths:
@@ -29,13 +38,13 @@ paths:
- application/json
- application/xml
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
- required: false
+ required: true
schema:
$ref: '#/definitions/Pet'
responses:
@@ -55,13 +64,13 @@ paths:
- application/json
- application/xml
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
- required: false
+ required: true
schema:
$ref: '#/definitions/Pet'
responses:
@@ -83,13 +92,13 @@ paths:
description: Multiple status values can be provided with comma separated strings
operationId: findPetsByStatus
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: status
in: query
description: Status values that need to be considered for filter
- required: false
+ required: true
type: array
items:
type: string
@@ -97,8 +106,8 @@ paths:
- available
- pending
- sold
- collectionFormat: multi
- default: available
+ default: available
+ collectionFormat: csv
responses:
'200':
description: successful operation
@@ -106,13 +115,6 @@ paths:
type: array
items:
$ref: '#/definitions/Pet'
- examples:
- application/json:
- name: Puma
- type: Dog
- color: Black
- gender: Female
- breed: Mixed
'400':
description: Invalid status value
security:
@@ -124,22 +126,20 @@ paths:
tags:
- pet
summary: Finds Pets by tags
- description: >-
- Multiple tags can be provided with comma separated strings. Use tag1,
- tag2, tag3 for testing.
+ description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.'
operationId: findPetsByTags
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: tags
in: query
description: Tags to filter by
- required: false
+ required: true
type: array
items:
type: string
- collectionFormat: multi
+ collectionFormat: csv
responses:
'200':
description: successful operation
@@ -158,17 +158,15 @@ paths:
tags:
- pet
summary: Find pet by ID
- description: >-
- Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API
- error conditions
+ description: Returns a single pet
operationId: getPetById
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: petId
in: path
- description: ID of pet that needs to be fetched
+ description: ID of pet to return
required: true
type: integer
format: int64
@@ -183,9 +181,6 @@ paths:
description: Pet not found
security:
- api_key: []
- - petstore_auth:
- - 'write:pets'
- - 'read:pets'
post:
tags:
- pet
@@ -195,14 +190,15 @@ paths:
consumes:
- application/x-www-form-urlencoded
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: petId
in: path
description: ID of pet that needs to be updated
required: true
- type: string
+ type: integer
+ format: int64
- name: name
in: formData
description: Updated name of the pet
@@ -227,12 +223,11 @@ paths:
description: ''
operationId: deletePet
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: api_key
in: header
- description: ''
required: false
type: string
- name: petId
@@ -259,7 +254,6 @@ paths:
- multipart/form-data
produces:
- application/json
- - application/xml
parameters:
- name: petId
in: path
@@ -278,8 +272,10 @@ paths:
required: false
type: file
responses:
- default:
+ '200':
description: successful operation
+ schema:
+ $ref: '#/definitions/ApiResponse'
security:
- petstore_auth:
- 'write:pets'
@@ -293,7 +289,7 @@ paths:
operationId: getInventory
produces:
- application/json
- - application/xml
+ parameters: []
responses:
'200':
description: successful operation
@@ -312,13 +308,13 @@ paths:
description: ''
operationId: placeOrder
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- in: body
name: body
description: order placed for purchasing the pet
- required: false
+ required: true
schema:
$ref: '#/definitions/Order'
responses:
@@ -333,19 +329,20 @@ paths:
tags:
- store
summary: Find purchase order by ID
- description: >-
- For valid response try integer IDs with value <= 5 or > 10. Other values
- will generated exceptions
+ description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'
operationId: getOrderById
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: orderId
in: path
description: ID of pet that needs to be fetched
required: true
- type: string
+ type: integer
+ maximum: 5
+ minimum: 1
+ format: int64
responses:
'200':
description: successful operation
@@ -359,13 +356,11 @@ paths:
tags:
- store
summary: Delete purchase order by ID
- description: >-
- For valid response try integer IDs with value < 1000. Anything above
- 1000 or nonintegers will generate API errors
+ description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
operationId: deleteOrder
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: orderId
in: path
@@ -385,13 +380,13 @@ paths:
description: This can only be done by the logged in user.
operationId: createUser
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- in: body
name: body
description: Created user object
- required: false
+ required: true
schema:
$ref: '#/definitions/User'
responses:
@@ -405,13 +400,13 @@ paths:
description: ''
operationId: createUsersWithArrayInput
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- in: body
name: body
description: List of user object
- required: false
+ required: true
schema:
type: array
items:
@@ -427,13 +422,13 @@ paths:
description: ''
operationId: createUsersWithListInput
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- in: body
name: body
description: List of user object
- required: false
+ required: true
schema:
type: array
items:
@@ -449,24 +444,33 @@ paths:
description: ''
operationId: loginUser
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: username
in: query
description: The user name for login
- required: false
+ required: true
type: string
- name: password
in: query
description: The password for login in clear text
- required: false
+ required: true
type: string
responses:
'200':
description: successful operation
schema:
type: string
+ headers:
+ X-Rate-Limit:
+ type: integer
+ format: int32
+ description: calls per hour allowed by the user
+ X-Expires-After:
+ type: string
+ format: date-time
+ description: date in UTC when toekn expires
'400':
description: Invalid username/password supplied
/user/logout:
@@ -477,8 +481,9 @@ paths:
description: ''
operationId: logoutUser
produces:
- - application/json
- application/xml
+ - application/json
+ parameters: []
responses:
default:
description: successful operation
@@ -490,8 +495,8 @@ paths:
description: ''
operationId: getUserByName
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: username
in: path
@@ -514,8 +519,8 @@ paths:
description: This can only be done by the logged in user.
operationId: updateUser
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: username
in: path
@@ -525,7 +530,7 @@ paths:
- in: body
name: body
description: Updated user object
- required: false
+ required: true
schema:
$ref: '#/definitions/User'
responses:
@@ -540,8 +545,8 @@ paths:
description: This can only be done by the logged in user.
operationId: deleteUser
produces:
- - application/json
- application/xml
+ - application/json
parameters:
- name: username
in: path
@@ -554,10 +559,6 @@ paths:
'404':
description: User not found
securityDefinitions:
- api_key:
- type: apiKey
- name: api_key
- in: header
petstore_auth:
type: oauth2
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
@@ -565,8 +566,56 @@ securityDefinitions:
scopes:
'write:pets': modify pets in your account
'read:pets': read your pets
+ api_key:
+ type: apiKey
+ name: api_key
+ in: header
definitions:
+ Order:
+ title: Pet Order
+ description: An order for a pets from the pet store
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ petId:
+ type: integer
+ format: int64
+ quantity:
+ type: integer
+ format: int32
+ shipDate:
+ type: string
+ format: date-time
+ status:
+ type: string
+ description: Order Status
+ enum:
+ - placed
+ - approved
+ - delivered
+ complete:
+ type: boolean
+ default: false
+ xml:
+ name: Order
+ Category:
+ title: Pet catehgry
+ description: A category for a pet
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int64
+ name:
+ type: string
+ xml:
+ name: Category
User:
+ title: a User
+ description: A User who is purchasing from the pet store
+ type: object
properties:
id:
type: integer
@@ -589,7 +638,10 @@ definitions:
description: User Status
xml:
name: User
- Category:
+ Tag:
+ title: Pet Tag
+ description: A tag for a pet
+ type: object
properties:
id:
type: integer
@@ -597,8 +649,11 @@ definitions:
name:
type: string
xml:
- name: Category
+ name: Tag
Pet:
+ title: a Pet
+ description: A pet for sale in the pet store
+ type: object
required:
- name
- photoUrls
@@ -634,37 +689,18 @@ definitions:
- sold
xml:
name: Pet
- Tag:
+ ApiResponse:
+ title: An uploaded response
+ description: Describes the result of uploading an image resource
+ type: object
properties:
- id:
- type: integer
- format: int64
- name:
- type: string
- xml:
- name: Tag
- Order:
- properties:
- id:
- type: integer
- format: int64
- petId:
- type: integer
- format: int64
- quantity:
+ code:
type: integer
format: int32
- shipDate:
+ type:
type: string
- format: date-time
- status:
+ message:
type: string
- description: Order Status
- enum:
- - placed
- - approved
- - delivered
- complete:
- type: boolean
- xml:
- name: Order
+externalDocs:
+ description: Find out more about Swagger
+ url: 'http://swagger.io'
diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java
index 679c5f52294..1db2a92e259 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/PetApi.java
@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java
index b4364dce026..e0b3f270f39 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/StoreApi.java
@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java
index b13dffed5ba..faee8f71acc 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/io/swagger/api/UserApi.java
@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/server/petstore/spring-mvc-j8-async/pom.xml b/samples/server/petstore/spring-mvc-j8-async/pom.xml
index 73502d0c277..27c113c405f 100644
--- a/samples/server/petstore/spring-mvc-j8-async/pom.xml
+++ b/samples/server/petstore/spring-mvc-j8-async/pom.xml
@@ -1,9 +1,9 @@
4.0.0
io.swagger
- swagger-spring
+ swagger-spring-mvc-server-j8-async
jar
- swagger-spring
+ swagger-spring-mvc-server-j8-async
1.0.0
src/main/java
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApiController.java
index a104b82369c..c9bf94efe6a 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApiController.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/FakeApiController.java
@@ -1,7 +1,8 @@
package io.swagger.api;
import org.springframework.stereotype.Controller;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApiController.java
index 80d34c1330b..5dd78a0e768 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApiController.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/PetApiController.java
@@ -1,7 +1,8 @@
package io.swagger.api;
import org.springframework.stereotype.Controller;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApiController.java
index 6df7665845d..652923c800b 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApiController.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/StoreApiController.java
@@ -1,7 +1,8 @@
package io.swagger.api;
import org.springframework.stereotype.Controller;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApiController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApiController.java
index b6cc5715e70..5afeac776dd 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApiController.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/api/UserApiController.java
@@ -1,7 +1,8 @@
package io.swagger.api;
import org.springframework.stereotype.Controller;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/configuration/HomeController.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/configuration/HomeController.java
new file mode 100644
index 00000000000..f8328099284
--- /dev/null
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/configuration/HomeController.java
@@ -0,0 +1,16 @@
+package io.swagger.configuration;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * Home redirection to swagger api documentation
+ */
+@Controller
+public class HomeController {
+ @RequestMapping(value = "/")
+ public String index() {
+ System.out.println("swagger-ui.html");
+ return "redirect:swagger-ui.html";
+ }
+}
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/resources/application.properties b/samples/server/petstore/spring-mvc-j8-async/src/main/resources/application.properties
new file mode 100644
index 00000000000..a72d110dea9
--- /dev/null
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/resources/application.properties
@@ -0,0 +1,5 @@
+springfox.documentation.swagger.v2.path=/api-docs
+server.contextPath=/v2
+server.port=80
+spring.jackson.date-format=io.swagger.RFC3339DateFormat
+spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
index c008eba7f55..f6093ba101c 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApi.java
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
index 5e7502a8e28..4199a81f8e1 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeApiController.java
@@ -16,11 +16,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
import java.util.List;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java
index ee2826b8553..bd3568f20e1 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApi.java
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApiController.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApiController.java
index 6826ed0998a..cfeb3390d9a 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/FakeClassnameTestApiController.java
@@ -13,11 +13,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
import java.util.List;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java
index 8fc4d1e7cb7..1227aedbbd7 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApi.java
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApiController.java
index 7bf9498f0ef..66e1dbda18d 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/PetApiController.java
@@ -15,11 +15,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
import java.util.List;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java
index cc6459f6442..fb8f3d706f5 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApi.java
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApiController.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApiController.java
index b05a6c92bbf..6154d9c2639 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/StoreApiController.java
@@ -14,11 +14,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
import java.util.List;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java
index 390c3ff657c..adc0d21d30b 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApi.java
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
import java.util.List;
import javax.validation.constraints.*;
diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApiController.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApiController.java
index b9c71138aa9..24b7e18b995 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/api/UserApiController.java
@@ -14,11 +14,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
import java.util.List;
-
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
import javax.validation.constraints.*;
import javax.validation.Valid;