diff --git a/bin/flaskConnexion.sh b/bin/flaskConnexion.sh
index 1745d2a3ba2..563718f9061 100755
--- a/bin/flaskConnexion.sh
+++ b/bin/flaskConnexion.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 -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l python-flask -o samples/server/petstore/flaskConnexion "
+ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l python-flask -o samples/server/petstore/flaskConnexion "
java $JAVA_OPTS -Dservice -jar $executable $ags
diff --git a/samples/server/petstore/flaskConnexion/app.py b/samples/server/petstore/flaskConnexion/app.py
index e790e0af19d..0b3ce76dd2f 100644
--- a/samples/server/petstore/flaskConnexion/app.py
+++ b/samples/server/petstore/flaskConnexion/app.py
@@ -4,5 +4,5 @@ import connexion
if __name__ == '__main__':
app = connexion.App(__name__, specification_dir='./swagger/')
- app.add_api('swagger.yaml', arguments={'title': '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'})
+ app.add_api('swagger.yaml', arguments={'title': '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.'})
app.run(port=8080)
diff --git a/samples/server/petstore/flaskConnexion/controllers/default_controller.py b/samples/server/petstore/flaskConnexion/controllers/default_controller.py
index 6e469e0c90f..e6a231aa6fe 100644
--- a/samples/server/petstore/flaskConnexion/controllers/default_controller.py
+++ b/samples/server/petstore/flaskConnexion/controllers/default_controller.py
@@ -1,29 +1,20 @@
-def add_pet(body = None) -> str:
- return 'do some magic!'
-
-def add_pet_using_byte_array(body = None) -> str:
+def add_pet(body) -> str:
return 'do some magic!'
def delete_pet(petId, apiKey = None) -> str:
return 'do some magic!'
-def find_pets_by_status(status = None) -> str:
+def find_pets_by_status(status) -> str:
return 'do some magic!'
-def find_pets_by_tags(tags = None) -> str:
+def find_pets_by_tags(tags) -> str:
return 'do some magic!'
def get_pet_by_id(petId) -> str:
return 'do some magic!'
-def get_pet_by_id_in_object(petId) -> str:
- return 'do some magic!'
-
-def pet_pet_idtesting_byte_arraytrue_get(petId) -> str:
- return 'do some magic!'
-
-def update_pet(body = None) -> str:
+def update_pet(body) -> str:
return 'do some magic!'
def update_pet_with_form(petId, name = None, status = None) -> str:
@@ -35,28 +26,22 @@ def upload_file(petId, additionalMetadata = None, file = None) -> str:
def delete_order(orderId) -> str:
return 'do some magic!'
-def find_orders_by_status(status = None) -> str:
- return 'do some magic!'
-
def get_inventory() -> str:
return 'do some magic!'
-def get_inventory_in_object() -> str:
- return 'do some magic!'
-
def get_order_by_id(orderId) -> str:
return 'do some magic!'
-def place_order(body = None) -> str:
+def place_order(body) -> str:
return 'do some magic!'
-def create_user(body = None) -> str:
+def create_user(body) -> str:
return 'do some magic!'
-def create_users_with_array_input(body = None) -> str:
+def create_users_with_array_input(body) -> str:
return 'do some magic!'
-def create_users_with_list_input(body = None) -> str:
+def create_users_with_list_input(body) -> str:
return 'do some magic!'
def delete_user(username) -> str:
@@ -65,11 +50,11 @@ def delete_user(username) -> str:
def get_user_by_name(username) -> str:
return 'do some magic!'
-def login_user(username = None, password = None) -> str:
+def login_user(username, password) -> str:
return 'do some magic!'
def logout_user() -> str:
return 'do some magic!'
-def update_user(username, body = None) -> str:
+def update_user(username, body) -> str:
return 'do some magic!'
diff --git a/samples/server/petstore/flaskConnexion/swagger/swagger.yaml b/samples/server/petstore/flaskConnexion/swagger/swagger.yaml
index 5983ddd1062..368e2c24e82 100644
--- a/samples/server/petstore/flaskConnexion/swagger/swagger.yaml
+++ b/samples/server/petstore/flaskConnexion/swagger/swagger.yaml
@@ -2,9 +2,9 @@
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"
+ \ 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://swagger.io/terms/"
@@ -15,6 +15,19 @@ info:
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 +42,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:
@@ -57,13 +70,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:
@@ -87,26 +100,22 @@ paths:
description: "Multiple status values can be provided with comma separated strings"
operationId: "controllers.default_controller.find_pets_by_status"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters:
- name: "status"
in: "query"
- description: "Status values that need to be considered for query"
- required: false
+ description: "Status values that need to be considered for filter"
+ required: true
type: "array"
items:
type: "string"
+ default: "available"
enum:
- "available"
- "pending"
- "sold"
- collectionFormat: "multi"
- default: "available"
- enum:
- - "available"
- - "pending"
- - "sold"
+ collectionFormat: "csv"
responses:
200:
description: "successful operation"
@@ -127,21 +136,21 @@ paths:
tags:
- "pet"
summary: "Finds Pets by tags"
- description: "Muliple tags can be provided with comma seperated strings. Use\
+ description: "Multiple tags can be provided with comma separated strings. Use\
\ tag1, tag2, tag3 for testing."
operationId: "controllers.default_controller.find_pets_by_tags"
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"
@@ -162,16 +171,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: "controllers.default_controller.get_pet_by_id"
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"
@@ -186,9 +194,6 @@ paths:
description: "Pet not found"
security:
- api_key: []
- - petstore_auth:
- - "write:pets"
- - "read:pets"
x-tags:
- tag: "pet"
post:
@@ -200,14 +205,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"
@@ -234,12 +240,11 @@ paths:
description: ""
operationId: "controllers.default_controller.delete_pet"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters:
- name: "api_key"
in: "header"
- description: ""
required: false
type: "string"
- name: "petId"
@@ -268,7 +273,6 @@ paths:
- "multipart/form-data"
produces:
- "application/json"
- - "application/xml"
parameters:
- name: "petId"
in: "path"
@@ -286,151 +290,17 @@ paths:
description: "file to upload"
required: false
type: "file"
- responses:
- default:
- description: "successful operation"
- security:
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- x-tags:
- - tag: "pet"
- /pet/{petId}?response=inline_arbitrary_object:
- get:
- tags:
- - "pet"
- summary: "Fake endpoint to test inline arbitrary object return by 'Find pet\
- \ by ID'"
- description: "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate\
- \ API error conditions"
- operationId: "controllers.default_controller.get_pet_by_id_in_object"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - name: "petId"
- in: "path"
- description: "ID of pet that needs to be fetched"
- required: true
- type: "integer"
- format: "int64"
responses:
200:
description: "successful operation"
schema:
- $ref: "#/definitions/inline_response_200"
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Pet not found"
- security:
- - api_key: []
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- x-tags:
- - tag: "pet"
- /pet/{petId}?testing_byte_array=true:
- get:
- tags:
- - "pet"
- summary: "Fake endpoint to test byte array return by 'Find pet by ID'"
- description: "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate\
- \ API error conditions"
- operationId: "controllers.default_controller.pet_pet_idtesting_byte_arraytrue_get"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - name: "petId"
- in: "path"
- description: "ID of pet that needs to be fetched"
- required: true
- type: "integer"
- format: "int64"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "string"
- format: "binary"
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Pet not found"
- security:
- - api_key: []
- - petstore_auth:
- - "write:pets"
- - "read:pets"
- x-tags:
- - tag: "pet"
- /pet?testing_byte_array=true:
- post:
- tags:
- - "pet"
- summary: "Fake endpoint to test byte array in body parameter for adding a new\
- \ pet to the store"
- description: ""
- operationId: "controllers.default_controller.add_pet_using_byte_array"
- consumes:
- - "application/json"
- - "application/xml"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - in: "body"
- name: "body"
- description: "Pet object in the form of byte array"
- required: false
- schema:
- type: "string"
- format: "binary"
- responses:
- 405:
- description: "Invalid input"
+ $ref: "#/definitions/ApiResponse"
security:
- petstore_auth:
- "write:pets"
- "read:pets"
x-tags:
- tag: "pet"
- /store/findByStatus:
- get:
- tags:
- - "store"
- summary: "Finds orders by status"
- description: "A single status value can be provided as a string"
- operationId: "controllers.default_controller.find_orders_by_status"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - name: "status"
- in: "query"
- description: "Status value that needs to be considered for query"
- required: false
- type: "string"
- default: "placed"
- enum:
- - "placed"
- - "approved"
- - "delivered"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "array"
- items:
- $ref: "#/definitions/Order"
- 400:
- description: "Invalid status value"
- security:
- - test_api_client_secret: []
- test_api_client_id: []
- x-tags:
- - tag: "store"
/store/inventory:
get:
tags:
@@ -440,7 +310,6 @@ paths:
operationId: "controllers.default_controller.get_inventory"
produces:
- "application/json"
- - "application/xml"
parameters: []
responses:
200:
@@ -454,28 +323,6 @@ paths:
- api_key: []
x-tags:
- tag: "store"
- /store/inventory?response=arbitrary_object:
- get:
- tags:
- - "store"
- summary: "Fake endpoint to test arbitrary object return by 'Get inventory'"
- description: "Returns an arbitrary object which is actually a map of status\
- \ codes to quantities"
- operationId: "controllers.default_controller.get_inventory_in_object"
- produces:
- - "application/json"
- - "application/xml"
- parameters: []
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "object"
- properties: {}
- security:
- - api_key: []
- x-tags:
- - tag: "store"
/store/order:
post:
tags:
@@ -484,13 +331,13 @@ paths:
description: ""
operationId: "controllers.default_controller.place_order"
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:
@@ -500,9 +347,6 @@ paths:
$ref: "#/definitions/Order"
400:
description: "Invalid Order"
- security:
- - test_api_client_secret: []
- test_api_client_id: []
x-tags:
- tag: "store"
/store/order/{orderId}:
@@ -514,14 +358,17 @@ paths:
\ values will generated exceptions"
operationId: "controllers.default_controller.get_order_by_id"
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.0
+ minimum: 1.0
+ format: "int64"
responses:
200:
description: "successful operation"
@@ -531,9 +378,6 @@ paths:
description: "Invalid ID supplied"
404:
description: "Order not found"
- security:
- - test_api_key_header: []
- - test_api_key_query: []
x-tags:
- tag: "store"
delete:
@@ -544,14 +388,15 @@ paths:
\ above 1000 or nonintegers will generate API errors"
operationId: "controllers.default_controller.delete_order"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters:
- name: "orderId"
in: "path"
description: "ID of the order that needs to be deleted"
required: true
type: "string"
+ minimum: 1.0
responses:
400:
description: "Invalid ID supplied"
@@ -567,13 +412,13 @@ paths:
description: "This can only be done by the logged in user."
operationId: "controllers.default_controller.create_user"
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:
@@ -589,13 +434,13 @@ paths:
description: ""
operationId: "controllers.default_controller.create_users_with_array_input"
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:
@@ -613,13 +458,13 @@ paths:
description: ""
operationId: "controllers.default_controller.create_users_with_list_input"
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:
@@ -637,24 +482,33 @@ paths:
description: ""
operationId: "controllers.default_controller.login_user"
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"
x-tags:
@@ -667,8 +521,8 @@ paths:
description: ""
operationId: "controllers.default_controller.logout_user"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters: []
responses:
default:
@@ -683,8 +537,8 @@ paths:
description: ""
operationId: "controllers.default_controller.get_user_by_name"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters:
- name: "username"
in: "path"
@@ -696,16 +550,6 @@ paths:
description: "successful operation"
schema:
$ref: "#/definitions/User"
- examples:
- application/json:
- id: 1
- username: "johnp"
- firstName: "John"
- lastName: "Public"
- email: "johnp@swagger.io"
- password: "-secret-"
- phone: "0123456789"
- userStatus: 0
400:
description: "Invalid username supplied"
404:
@@ -719,8 +563,8 @@ paths:
description: "This can only be done by the logged in user."
operationId: "controllers.default_controller.update_user"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters:
- name: "username"
in: "path"
@@ -730,7 +574,7 @@ paths:
- in: "body"
name: "body"
description: "Updated user object"
- required: false
+ required: true
schema:
$ref: "#/definitions/User"
responses:
@@ -747,8 +591,8 @@ paths:
description: "This can only be done by the logged in user."
operationId: "controllers.default_controller.delete_user"
produces:
- - "application/json"
- "application/xml"
+ - "application/json"
parameters:
- name: "username"
in: "path"
@@ -760,33 +604,13 @@ paths:
description: "Invalid username supplied"
404:
description: "User not found"
- security:
- - test_http_basic: []
x-tags:
- tag: "user"
securityDefinitions:
- test_api_key_header:
- type: "apiKey"
- name: "test_api_key_header"
- in: "header"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
- test_http_basic:
- type: "basic"
- test_api_client_secret:
- type: "apiKey"
- name: "x-test_api_client_secret"
- in: "header"
- test_api_client_id:
- type: "apiKey"
- name: "x-test_api_client_id"
- in: "header"
- test_api_key_query:
- type: "apiKey"
- name: "test_api_key_query"
- in: "query"
petstore_auth:
type: "oauth2"
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
@@ -795,7 +619,45 @@ securityDefinitions:
write:pets: "modify pets in your account"
read:pets: "read your pets"
definitions:
+ Order:
+ 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:
+ type: "object"
+ properties:
+ id:
+ type: "integer"
+ format: "int64"
+ name:
+ type: "string"
+ xml:
+ name: "Category"
User:
+ type: "object"
properties:
id:
type: "integer"
@@ -818,7 +680,8 @@ definitions:
description: "User Status"
xml:
name: "User"
- Category:
+ Tag:
+ type: "object"
properties:
id:
type: "integer"
@@ -826,8 +689,9 @@ definitions:
name:
type: "string"
xml:
- name: "Category"
+ name: "Tag"
Pet:
+ type: "object"
required:
- "name"
- "photoUrls"
@@ -863,163 +727,16 @@ definitions:
- "sold"
xml:
name: "Pet"
- Tag:
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Tag"
- Order:
- properties:
- id:
- type: "integer"
- format: "int64"
- readOnly: true
- 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"
- xml:
- name: "Order"
- $special[model.name]:
- properties:
- $special[property.name]:
- type: "integer"
- format: "int64"
- xml:
- name: "$special[model.name]"
- Return:
- properties:
- return:
- type: "integer"
- format: "int32"
- description: "Model for testing reserved words"
- xml:
- name: "Return"
- Name:
- required:
- - "name"
- properties:
- name:
- type: "integer"
- format: "int32"
- snake_case:
- type: "integer"
- format: "int32"
- readOnly: true
- description: "Model for testing model name same as property name"
- xml:
- name: "Name"
- 200_response:
- properties:
- name:
- type: "integer"
- format: "int32"
- description: "Model for testing model name starting with number"
- xml:
- name: "Name"
- Dog:
- allOf:
- - $ref: "#/definitions/Animal"
- - type: "object"
- properties:
- breed:
- type: "string"
- Cat:
- allOf:
- - $ref: "#/definitions/Animal"
- - type: "object"
- properties:
- declawed:
- type: "boolean"
- Animal:
+ ApiResponse:
type: "object"
- required:
- - "className"
- discriminator: "className"
properties:
- className:
- type: "string"
- format_test:
- type: "object"
- required:
- - "number"
- properties:
- integer:
- type: "integer"
- int32:
+ code:
type: "integer"
format: "int32"
- int64:
- type: "integer"
- format: "int64"
- number:
- type: "number"
- float:
- type: "number"
- format: "float"
- double:
- type: "number"
- format: "double"
- string:
+ type:
type: "string"
- byte:
+ message:
type: "string"
- format: "byte"
- binary:
- type: "string"
- format: "binary"
- date:
- type: "string"
- format: "date"
- dateTime:
- type: "string"
- format: "date-time"
- password:
- type: "string"
- format: "password"
- inline_response_200:
- required:
- - "id"
- properties:
- tags:
- type: "array"
- items:
- $ref: "#/definitions/Tag"
- id:
- type: "integer"
- format: "int64"
- category:
- type: "object"
- properties: {}
- status:
- type: "string"
- description: "pet status in the store"
- enum:
- - "available"
- - "pending"
- - "sold"
- name:
- type: "string"
- example: "doggie"
- photoUrls:
- type: "array"
- items:
- type: "string"
+externalDocs:
+ description: "Find out more about Swagger"
+ url: "http://swagger.io"
diff --git a/samples/server/petstore/java-inflector/inflector.yaml b/samples/server/petstore/java-inflector/inflector.yaml
index 8a11ca3b659..2511293c542 100644
--- a/samples/server/petstore/java-inflector/inflector.yaml
+++ b/samples/server/petstore/java-inflector/inflector.yaml
@@ -2,12 +2,15 @@ controllerPackage: io.swagger.handler
modelPackage: io.swagger.model
swaggerUrl: ./src/main/swagger/swagger.yaml
modelMappings:
- User : io.swagger.model.User
- Category : io.swagger.model.Category
- Pet : io.swagger.model.Pet
- Tag : io.swagger.model.Tag
- Order : io.swagger.model.Order
-
+ # to enable explicit mappings, use this syntax:
+ DefinitionFromSwaggerSpecification: fully.qualified.path.to.Model
+ ApiResponse : io.swagger.model.ApiResponse
+Category : io.swagger.model.Category
+Order : io.swagger.model.Order
+Pet : io.swagger.model.Pet
+Tag : io.swagger.model.Tag
+User : io.swagger.model.User
+
entityProcessors:
- json
- xml
diff --git a/samples/server/petstore/java-inflector/pom.xml b/samples/server/petstore/java-inflector/pom.xml
index ace023a70db..d93b5e8a6c5 100644
--- a/samples/server/petstore/java-inflector/pom.xml
+++ b/samples/server/petstore/java-inflector/pom.xml
@@ -19,6 +19,25 @@
target
${project.artifactId}-${project.version}
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.10
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/gen/java
+
+
+
+
+
maven-dependency-plugin
@@ -78,12 +97,21 @@
io.swagger
swagger-inflector
- 1.0.0
+ ${swagger-inflector-version}
+
+
+ sonatype-snapshots
+ https://oss.sonatype.org/content/repositories/snapshots
+
+ true
+
+
+
1.0.0
- 1.5.7
+ 1.0.4
9.2.9.v20150224
1.0.1
4.8.2
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/PetController.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/PetController.java
index 830226116e2..e05a1ffc1f2 100644
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/PetController.java
+++ b/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/PetController.java
@@ -14,7 +14,7 @@ import io.swagger.model.Pet;
import io.swagger.model.ApiResponse;
import java.io.File;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-04-15T17:39:42.971+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-04-15T17:48:04.458+08:00")
public class PetController {
/**
* Uncomment and implement as you see fit. These operations will map
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/StoreController.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/StoreController.java
index 29acd9854d3..cf96ddf68fd 100644
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/StoreController.java
+++ b/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/StoreController.java
@@ -13,7 +13,7 @@ import io.swagger.model.*;
import java.util.Map;
import io.swagger.model.Order;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-04-15T17:39:42.971+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-04-15T17:48:04.458+08:00")
public class StoreController {
/**
* Uncomment and implement as you see fit. These operations will map
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/UserController.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/UserController.java
index 6c4c282aa83..4d99da8b342 100644
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/UserController.java
+++ b/samples/server/petstore/java-inflector/src/main/java/io/swagger/handler/UserController.java
@@ -13,7 +13,7 @@ import io.swagger.model.*;
import io.swagger.model.User;
import java.util.List;
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-04-15T17:39:42.971+08:00")
+@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-04-15T17:48:04.458+08:00")
public class UserController {
/**
* Uncomment and implement as you see fit. These operations will map
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Category.java
deleted file mode 100644
index ce925e6cfb8..00000000000
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Category.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package io.swagger.model;
-
-import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-01-19T23:33:17.124+08:00")
-public class Category {
-
- private Long id = null;
- private String name = null;
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("id")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("name")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Category category = (Category) o;
- return Objects.equals(id, category.id) &&
- Objects.equals(name, category.name);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, name);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class Category {\n");
-
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
-
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Order.java
deleted file mode 100644
index 4a1505f7442..00000000000
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Order.java
+++ /dev/null
@@ -1,173 +0,0 @@
-package io.swagger.model;
-
-import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import java.util.Date;
-
-
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-01-19T23:33:17.124+08:00")
-public class Order {
-
- private Long id = null;
- private Long petId = null;
- private Integer quantity = null;
- private Date shipDate = null;
-
-
- public enum StatusEnum {
- PLACED("placed"),
- APPROVED("approved"),
- DELIVERED("delivered");
-
- private String value;
-
- StatusEnum(String value) {
- this.value = value;
- }
-
- @Override
- @JsonValue
- public String toString() {
- return value;
- }
- }
-
- private StatusEnum status = null;
- private Boolean complete = null;
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("id")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("petId")
- public Long getPetId() {
- return petId;
- }
- public void setPetId(Long petId) {
- this.petId = petId;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("quantity")
- public Integer getQuantity() {
- return quantity;
- }
- public void setQuantity(Integer quantity) {
- this.quantity = quantity;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("shipDate")
- public Date getShipDate() {
- return shipDate;
- }
- public void setShipDate(Date shipDate) {
- this.shipDate = shipDate;
- }
-
-
- /**
- * Order Status
- **/
-
- @ApiModelProperty(value = "Order Status")
- @JsonProperty("status")
- public StatusEnum getStatus() {
- return status;
- }
- public void setStatus(StatusEnum status) {
- this.status = status;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("complete")
- public Boolean getComplete() {
- return complete;
- }
- public void setComplete(Boolean complete) {
- this.complete = complete;
- }
-
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Order order = (Order) o;
- return Objects.equals(id, order.id) &&
- Objects.equals(petId, order.petId) &&
- Objects.equals(quantity, order.quantity) &&
- Objects.equals(shipDate, order.shipDate) &&
- Objects.equals(status, order.status) &&
- Objects.equals(complete, order.complete);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, petId, quantity, shipDate, status, complete);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class Order {\n");
-
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
- sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
- sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n");
- sb.append(" status: ").append(toIndentedString(status)).append("\n");
- sb.append(" complete: ").append(toIndentedString(complete)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
-
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Pet.java
deleted file mode 100644
index 1e62a0a60dd..00000000000
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Pet.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package io.swagger.model;
-
-import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import io.swagger.model.Category;
-import io.swagger.model.Tag;
-import java.util.*;
-
-
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-01-19T23:33:17.124+08:00")
-public class Pet {
-
- private Long id = null;
- private Category category = null;
- private String name = null;
- private List photoUrls = new ArrayList();
- private List tags = new ArrayList();
-
-
- public enum StatusEnum {
- AVAILABLE("available"),
- PENDING("pending"),
- SOLD("sold");
-
- private String value;
-
- StatusEnum(String value) {
- this.value = value;
- }
-
- @Override
- @JsonValue
- public String toString() {
- return value;
- }
- }
-
- private StatusEnum status = null;
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("id")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("category")
- public Category getCategory() {
- return category;
- }
- public void setCategory(Category category) {
- this.category = category;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(required = true, value = "")
- @JsonProperty("name")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(required = true, value = "")
- @JsonProperty("photoUrls")
- public List getPhotoUrls() {
- return photoUrls;
- }
- public void setPhotoUrls(List photoUrls) {
- this.photoUrls = photoUrls;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("tags")
- public List getTags() {
- return tags;
- }
- public void setTags(List tags) {
- this.tags = tags;
- }
-
-
- /**
- * pet status in the store
- **/
-
- @ApiModelProperty(value = "pet status in the store")
- @JsonProperty("status")
- public StatusEnum getStatus() {
- return status;
- }
- public void setStatus(StatusEnum status) {
- this.status = status;
- }
-
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Pet pet = (Pet) o;
- return Objects.equals(id, pet.id) &&
- Objects.equals(category, pet.category) &&
- Objects.equals(name, pet.name) &&
- Objects.equals(photoUrls, pet.photoUrls) &&
- Objects.equals(tags, pet.tags) &&
- Objects.equals(status, pet.status);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, category, name, photoUrls, tags, status);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class Pet {\n");
-
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" category: ").append(toIndentedString(category)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
- sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
- sb.append(" status: ").append(toIndentedString(status)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
-
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Tag.java
deleted file mode 100644
index c0d2e1e4c0e..00000000000
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/Tag.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package io.swagger.model;
-
-import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-01-19T23:33:17.124+08:00")
-public class Tag {
-
- private Long id = null;
- private String name = null;
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("id")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("name")
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- Tag tag = (Tag) o;
- return Objects.equals(id, tag.id) &&
- Objects.equals(name, tag.name);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, name);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class Tag {\n");
-
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
-
diff --git a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/User.java b/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/User.java
deleted file mode 100644
index e2982024306..00000000000
--- a/samples/server/petstore/java-inflector/src/main/java/io/swagger/model/User.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package io.swagger.model;
-
-import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonValue;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-
-
-
-
-@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaInflectorServerCodegen", date = "2016-01-19T23:33:17.124+08:00")
-public class User {
-
- private Long id = null;
- private String username = null;
- private String firstName = null;
- private String lastName = null;
- private String email = null;
- private String password = null;
- private String phone = null;
- private Integer userStatus = null;
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("id")
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("username")
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("firstName")
- public String getFirstName() {
- return firstName;
- }
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("lastName")
- public String getLastName() {
- return lastName;
- }
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("email")
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("password")
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
-
-
- /**
- **/
-
- @ApiModelProperty(value = "")
- @JsonProperty("phone")
- public String getPhone() {
- return phone;
- }
- public void setPhone(String phone) {
- this.phone = phone;
- }
-
-
- /**
- * User Status
- **/
-
- @ApiModelProperty(value = "User Status")
- @JsonProperty("userStatus")
- public Integer getUserStatus() {
- return userStatus;
- }
- public void setUserStatus(Integer userStatus) {
- this.userStatus = userStatus;
- }
-
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- User user = (User) o;
- return Objects.equals(id, user.id) &&
- Objects.equals(username, user.username) &&
- Objects.equals(firstName, user.firstName) &&
- Objects.equals(lastName, user.lastName) &&
- Objects.equals(email, user.email) &&
- Objects.equals(password, user.password) &&
- Objects.equals(phone, user.phone) &&
- Objects.equals(userStatus, user.userStatus);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("class User {\n");
-
- sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" username: ").append(toIndentedString(username)).append("\n");
- sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
- sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
- sb.append(" email: ").append(toIndentedString(email)).append("\n");
- sb.append(" password: ").append(toIndentedString(password)).append("\n");
- sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
- sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n");
- sb.append("}");
- return sb.toString();
- }
-
- /**
- * Convert the given object to string with each line indented by 4 spaces
- * (except the first line).
- */
- private String toIndentedString(Object o) {
- if (o == null) {
- return "null";
- }
- return o.toString().replace("\n", "\n ");
- }
-}
-
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/api/StoreApi.java
index 7b26e047746..39ffe2436a8 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/api/StoreApi.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/api/StoreApi.java
@@ -14,7 +14,7 @@ public interface StoreApi {
@Path("/store/order/{orderId}")
@Produces({ "application/xml", "application/json" })
- public Response deleteOrder(@PathParam("orderId") Long orderId);
+ public Response deleteOrder(@PathParam("orderId") String orderId);
@GET
@Path("/store/inventory")
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/ApiResponse.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/ApiResponse.java
index 68908204335..e6100b2fc6a 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/ApiResponse.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/ApiResponse.java
@@ -24,7 +24,6 @@ public class ApiResponse {
private String message = null;
-
/**
**/
@@ -34,7 +33,6 @@ public class ApiResponse {
public void setCode(Integer code) {
this.code = code;
}
-
/**
**/
@@ -44,7 +42,6 @@ public class ApiResponse {
public void setType(String type) {
this.type = type;
}
-
/**
**/
@@ -54,7 +51,6 @@ public class ApiResponse {
public void setMessage(String message) {
this.message = message;
}
-
@Override
public String toString() {
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Category.java
index d34537dc435..f2d34f77367 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Category.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Category.java
@@ -22,7 +22,6 @@ public class Category {
private String name = null;
-
/**
**/
@@ -32,7 +31,6 @@ public class Category {
public void setId(Long id) {
this.id = id;
}
-
/**
**/
@@ -42,7 +40,6 @@ public class Category {
public void setName(String name) {
this.name = name;
}
-
@Override
public String toString() {
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Order.java
index 93c120e6c5a..3a9cbf3c130 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Order.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Order.java
@@ -32,7 +32,7 @@ import javax.xml.bind.annotation.XmlType;
@XmlType(name="Order")
@XmlEnum
public enum Order {
- {values=[placed, approved, delivered], enumVars=[{name=PLACED, value=placed}, {name=APPROVED, value=approved}, {name=DELIVERED, value=delivered}]},
+ {values=[placed, approved, delivered], enumVars=[{name=PLACED, value=placed}, {name=APPROVED, value=approved}, {name=DELIVERED, value=delivered}]},
public String value() {
return name();
@@ -47,7 +47,6 @@ public enum Order {
private Boolean complete = false;
-
/**
**/
@@ -57,7 +56,6 @@ public enum Order {
public void setId(Long id) {
this.id = id;
}
-
/**
**/
@@ -67,7 +65,6 @@ public enum Order {
public void setPetId(Long petId) {
this.petId = petId;
}
-
/**
**/
@@ -77,7 +74,6 @@ public enum Order {
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
-
/**
**/
@@ -87,7 +83,6 @@ public enum Order {
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
this.shipDate = shipDate;
}
-
/**
* Order Status
**/
@@ -98,7 +93,6 @@ public enum Order {
public void setStatus(StatusEnum status) {
this.status = status;
}
-
/**
**/
@@ -108,7 +102,6 @@ public enum Order {
public void setComplete(Boolean complete) {
this.complete = complete;
}
-
@Override
public String toString() {
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Pet.java
index 979781f19e0..707f90a3af8 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Pet.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Pet.java
@@ -38,7 +38,7 @@ import javax.xml.bind.annotation.XmlType;
@XmlType(name="Pet")
@XmlEnum
public enum Pet {
- {values=[available, pending, sold], enumVars=[{name=AVAILABLE, value=available}, {name=PENDING, value=pending}, {name=SOLD, value=sold}]},
+ {values=[available, pending, sold], enumVars=[{name=AVAILABLE, value=available}, {name=PENDING, value=pending}, {name=SOLD, value=sold}]},
public String value() {
return name();
@@ -51,7 +51,6 @@ public enum Pet {
private StatusEnum status = null;
-
/**
**/
@@ -61,7 +60,6 @@ public enum Pet {
public void setId(Long id) {
this.id = id;
}
-
/**
**/
@@ -71,7 +69,6 @@ public enum Pet {
public void setCategory(Category category) {
this.category = category;
}
-
/**
**/
@@ -81,7 +78,6 @@ public enum Pet {
public void setName(String name) {
this.name = name;
}
-
/**
**/
@@ -91,7 +87,6 @@ public enum Pet {
public void setPhotoUrls(List photoUrls) {
this.photoUrls = photoUrls;
}
-
/**
**/
@@ -101,7 +96,6 @@ public enum Pet {
public void setTags(List tags) {
this.tags = tags;
}
-
/**
* pet status in the store
**/
@@ -112,7 +106,6 @@ public enum Pet {
public void setStatus(StatusEnum status) {
this.status = status;
}
-
@Override
public String toString() {
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Tag.java
index b2a2bcaaff9..1912fa6f731 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Tag.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/Tag.java
@@ -22,7 +22,6 @@ public class Tag {
private String name = null;
-
/**
**/
@@ -32,7 +31,6 @@ public class Tag {
public void setId(Long id) {
this.id = id;
}
-
/**
**/
@@ -42,7 +40,6 @@ public class Tag {
public void setName(String name) {
this.name = name;
}
-
@Override
public String toString() {
diff --git a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/User.java
index 8683a630e5c..c35af076cf6 100644
--- a/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/User.java
+++ b/samples/server/petstore/jaxrs-cxf/gen/java/io/swagger/model/User.java
@@ -34,7 +34,6 @@ public class User {
private Integer userStatus = null;
-
/**
**/
@@ -44,7 +43,6 @@ public class User {
public void setId(Long id) {
this.id = id;
}
-
/**
**/
@@ -54,7 +52,6 @@ public class User {
public void setUsername(String username) {
this.username = username;
}
-
/**
**/
@@ -64,7 +61,6 @@ public class User {
public void setFirstName(String firstName) {
this.firstName = firstName;
}
-
/**
**/
@@ -74,7 +70,6 @@ public class User {
public void setLastName(String lastName) {
this.lastName = lastName;
}
-
/**
**/
@@ -84,7 +79,6 @@ public class User {
public void setEmail(String email) {
this.email = email;
}
-
/**
**/
@@ -94,7 +88,6 @@ public class User {
public void setPassword(String password) {
this.password = password;
}
-
/**
**/
@@ -104,7 +97,6 @@ public class User {
public void setPhone(String phone) {
this.phone = phone;
}
-
/**
* User Status
**/
@@ -115,7 +107,6 @@ public class User {
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
-
@Override
public String toString() {