forked from loafle/openapi-generator-original
update sample for some server generators
This commit is contained in:
parent
0982afbca0
commit
d64751958e
@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# 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"
|
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
|
java $JAVA_OPTS -Dservice -jar $executable $ags
|
||||||
|
@ -4,5 +4,5 @@ import connexion
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = connexion.App(__name__, specification_dir='./swagger/')
|
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)
|
app.run(port=8080)
|
||||||
|
@ -1,29 +1,20 @@
|
|||||||
|
|
||||||
def add_pet(body = None) -> str:
|
def add_pet(body) -> str:
|
||||||
return 'do some magic!'
|
|
||||||
|
|
||||||
def add_pet_using_byte_array(body = None) -> str:
|
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def delete_pet(petId, apiKey = None) -> str:
|
def delete_pet(petId, apiKey = None) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def find_pets_by_status(status = None) -> str:
|
def find_pets_by_status(status) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def find_pets_by_tags(tags = None) -> str:
|
def find_pets_by_tags(tags) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def get_pet_by_id(petId) -> str:
|
def get_pet_by_id(petId) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def get_pet_by_id_in_object(petId) -> str:
|
def update_pet(body) -> str:
|
||||||
return 'do some magic!'
|
|
||||||
|
|
||||||
def pet_pet_idtesting_byte_arraytrue_get(petId) -> str:
|
|
||||||
return 'do some magic!'
|
|
||||||
|
|
||||||
def update_pet(body = None) -> str:
|
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def update_pet_with_form(petId, name = None, status = None) -> str:
|
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:
|
def delete_order(orderId) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def find_orders_by_status(status = None) -> str:
|
|
||||||
return 'do some magic!'
|
|
||||||
|
|
||||||
def get_inventory() -> str:
|
def get_inventory() -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def get_inventory_in_object() -> str:
|
|
||||||
return 'do some magic!'
|
|
||||||
|
|
||||||
def get_order_by_id(orderId) -> str:
|
def get_order_by_id(orderId) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def place_order(body = None) -> str:
|
def place_order(body) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def create_user(body = None) -> str:
|
def create_user(body) -> str:
|
||||||
return 'do some magic!'
|
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!'
|
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!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def delete_user(username) -> str:
|
def delete_user(username) -> str:
|
||||||
@ -65,11 +50,11 @@ def delete_user(username) -> str:
|
|||||||
def get_user_by_name(username) -> str:
|
def get_user_by_name(username) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def login_user(username = None, password = None) -> str:
|
def login_user(username, password) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def logout_user() -> str:
|
def logout_user() -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
|
||||||
def update_user(username, body = None) -> str:
|
def update_user(username, body) -> str:
|
||||||
return 'do some magic!'
|
return 'do some magic!'
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
info:
|
info:
|
||||||
description: "This is a sample server Petstore server. You can find out more about\
|
description: "This is a sample server Petstore server. You can find out more about\
|
||||||
\ Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net,\
|
\ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\
|
||||||
\ #swagger. For this sample, you can use the api key \"special-key\" to test\
|
\ For this sample, you can use the api key `special-key` to test the authorization\
|
||||||
\ the authorization filters"
|
\ filters."
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
title: "Swagger Petstore"
|
title: "Swagger Petstore"
|
||||||
termsOfService: "http://swagger.io/terms/"
|
termsOfService: "http://swagger.io/terms/"
|
||||||
@ -15,6 +15,19 @@ info:
|
|||||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
host: "petstore.swagger.io"
|
host: "petstore.swagger.io"
|
||||||
basePath: "/v2"
|
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:
|
schemes:
|
||||||
- "http"
|
- "http"
|
||||||
paths:
|
paths:
|
||||||
@ -29,13 +42,13 @@ paths:
|
|||||||
- "application/json"
|
- "application/json"
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "Pet object that needs to be added to the store"
|
description: "Pet object that needs to be added to the store"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Pet"
|
$ref: "#/definitions/Pet"
|
||||||
responses:
|
responses:
|
||||||
@ -57,13 +70,13 @@ paths:
|
|||||||
- "application/json"
|
- "application/json"
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "Pet object that needs to be added to the store"
|
description: "Pet object that needs to be added to the store"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Pet"
|
$ref: "#/definitions/Pet"
|
||||||
responses:
|
responses:
|
||||||
@ -87,26 +100,22 @@ paths:
|
|||||||
description: "Multiple status values can be provided with comma separated strings"
|
description: "Multiple status values can be provided with comma separated strings"
|
||||||
operationId: "controllers.default_controller.find_pets_by_status"
|
operationId: "controllers.default_controller.find_pets_by_status"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "status"
|
- name: "status"
|
||||||
in: "query"
|
in: "query"
|
||||||
description: "Status values that need to be considered for query"
|
description: "Status values that need to be considered for filter"
|
||||||
required: false
|
required: true
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
enum:
|
|
||||||
- "available"
|
|
||||||
- "pending"
|
|
||||||
- "sold"
|
|
||||||
collectionFormat: "multi"
|
|
||||||
default: "available"
|
default: "available"
|
||||||
enum:
|
enum:
|
||||||
- "available"
|
- "available"
|
||||||
- "pending"
|
- "pending"
|
||||||
- "sold"
|
- "sold"
|
||||||
|
collectionFormat: "csv"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
@ -127,21 +136,21 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- "pet"
|
- "pet"
|
||||||
summary: "Finds Pets by tags"
|
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."
|
\ tag1, tag2, tag3 for testing."
|
||||||
operationId: "controllers.default_controller.find_pets_by_tags"
|
operationId: "controllers.default_controller.find_pets_by_tags"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "tags"
|
- name: "tags"
|
||||||
in: "query"
|
in: "query"
|
||||||
description: "Tags to filter by"
|
description: "Tags to filter by"
|
||||||
required: false
|
required: true
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
collectionFormat: "multi"
|
collectionFormat: "csv"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
@ -162,16 +171,15 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- "pet"
|
- "pet"
|
||||||
summary: "Find pet by ID"
|
summary: "Find pet by ID"
|
||||||
description: "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate\
|
description: "Returns a single pet"
|
||||||
\ API error conditions"
|
|
||||||
operationId: "controllers.default_controller.get_pet_by_id"
|
operationId: "controllers.default_controller.get_pet_by_id"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "petId"
|
- name: "petId"
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "ID of pet that needs to be fetched"
|
description: "ID of pet to return"
|
||||||
required: true
|
required: true
|
||||||
type: "integer"
|
type: "integer"
|
||||||
format: "int64"
|
format: "int64"
|
||||||
@ -186,9 +194,6 @@ paths:
|
|||||||
description: "Pet not found"
|
description: "Pet not found"
|
||||||
security:
|
security:
|
||||||
- api_key: []
|
- api_key: []
|
||||||
- petstore_auth:
|
|
||||||
- "write:pets"
|
|
||||||
- "read:pets"
|
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: "pet"
|
- tag: "pet"
|
||||||
post:
|
post:
|
||||||
@ -200,14 +205,15 @@ paths:
|
|||||||
consumes:
|
consumes:
|
||||||
- "application/x-www-form-urlencoded"
|
- "application/x-www-form-urlencoded"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "petId"
|
- name: "petId"
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "ID of pet that needs to be updated"
|
description: "ID of pet that needs to be updated"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "integer"
|
||||||
|
format: "int64"
|
||||||
- name: "name"
|
- name: "name"
|
||||||
in: "formData"
|
in: "formData"
|
||||||
description: "Updated name of the pet"
|
description: "Updated name of the pet"
|
||||||
@ -234,12 +240,11 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.delete_pet"
|
operationId: "controllers.default_controller.delete_pet"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "api_key"
|
- name: "api_key"
|
||||||
in: "header"
|
in: "header"
|
||||||
description: ""
|
|
||||||
required: false
|
required: false
|
||||||
type: "string"
|
type: "string"
|
||||||
- name: "petId"
|
- name: "petId"
|
||||||
@ -268,7 +273,6 @@ paths:
|
|||||||
- "multipart/form-data"
|
- "multipart/form-data"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
- "application/json"
|
||||||
- "application/xml"
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: "petId"
|
- name: "petId"
|
||||||
in: "path"
|
in: "path"
|
||||||
@ -286,151 +290,17 @@ paths:
|
|||||||
description: "file to upload"
|
description: "file to upload"
|
||||||
required: false
|
required: false
|
||||||
type: "file"
|
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:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/inline_response_200"
|
$ref: "#/definitions/ApiResponse"
|
||||||
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"
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- "write:pets"
|
- "write:pets"
|
||||||
- "read:pets"
|
- "read:pets"
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: "pet"
|
- 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:
|
/store/inventory:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -440,7 +310,6 @@ paths:
|
|||||||
operationId: "controllers.default_controller.get_inventory"
|
operationId: "controllers.default_controller.get_inventory"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
- "application/json"
|
||||||
- "application/xml"
|
|
||||||
parameters: []
|
parameters: []
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
@ -454,28 +323,6 @@ paths:
|
|||||||
- api_key: []
|
- api_key: []
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: "store"
|
- 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:
|
/store/order:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -484,13 +331,13 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.place_order"
|
operationId: "controllers.default_controller.place_order"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "order placed for purchasing the pet"
|
description: "order placed for purchasing the pet"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Order"
|
$ref: "#/definitions/Order"
|
||||||
responses:
|
responses:
|
||||||
@ -500,9 +347,6 @@ paths:
|
|||||||
$ref: "#/definitions/Order"
|
$ref: "#/definitions/Order"
|
||||||
400:
|
400:
|
||||||
description: "Invalid Order"
|
description: "Invalid Order"
|
||||||
security:
|
|
||||||
- test_api_client_secret: []
|
|
||||||
test_api_client_id: []
|
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: "store"
|
- tag: "store"
|
||||||
/store/order/{orderId}:
|
/store/order/{orderId}:
|
||||||
@ -514,14 +358,17 @@ paths:
|
|||||||
\ values will generated exceptions"
|
\ values will generated exceptions"
|
||||||
operationId: "controllers.default_controller.get_order_by_id"
|
operationId: "controllers.default_controller.get_order_by_id"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "orderId"
|
- name: "orderId"
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "ID of pet that needs to be fetched"
|
description: "ID of pet that needs to be fetched"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "integer"
|
||||||
|
maximum: 5.0
|
||||||
|
minimum: 1.0
|
||||||
|
format: "int64"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
@ -531,9 +378,6 @@ paths:
|
|||||||
description: "Invalid ID supplied"
|
description: "Invalid ID supplied"
|
||||||
404:
|
404:
|
||||||
description: "Order not found"
|
description: "Order not found"
|
||||||
security:
|
|
||||||
- test_api_key_header: []
|
|
||||||
- test_api_key_query: []
|
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: "store"
|
- tag: "store"
|
||||||
delete:
|
delete:
|
||||||
@ -544,14 +388,15 @@ paths:
|
|||||||
\ above 1000 or nonintegers will generate API errors"
|
\ above 1000 or nonintegers will generate API errors"
|
||||||
operationId: "controllers.default_controller.delete_order"
|
operationId: "controllers.default_controller.delete_order"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "orderId"
|
- name: "orderId"
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "ID of the order that needs to be deleted"
|
description: "ID of the order that needs to be deleted"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "string"
|
||||||
|
minimum: 1.0
|
||||||
responses:
|
responses:
|
||||||
400:
|
400:
|
||||||
description: "Invalid ID supplied"
|
description: "Invalid ID supplied"
|
||||||
@ -567,13 +412,13 @@ paths:
|
|||||||
description: "This can only be done by the logged in user."
|
description: "This can only be done by the logged in user."
|
||||||
operationId: "controllers.default_controller.create_user"
|
operationId: "controllers.default_controller.create_user"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "Created user object"
|
description: "Created user object"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/User"
|
$ref: "#/definitions/User"
|
||||||
responses:
|
responses:
|
||||||
@ -589,13 +434,13 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.create_users_with_array_input"
|
operationId: "controllers.default_controller.create_users_with_array_input"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "List of user object"
|
description: "List of user object"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
@ -613,13 +458,13 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.create_users_with_list_input"
|
operationId: "controllers.default_controller.create_users_with_list_input"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "List of user object"
|
description: "List of user object"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
@ -637,24 +482,33 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.login_user"
|
operationId: "controllers.default_controller.login_user"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "username"
|
- name: "username"
|
||||||
in: "query"
|
in: "query"
|
||||||
description: "The user name for login"
|
description: "The user name for login"
|
||||||
required: false
|
required: true
|
||||||
type: "string"
|
type: "string"
|
||||||
- name: "password"
|
- name: "password"
|
||||||
in: "query"
|
in: "query"
|
||||||
description: "The password for login in clear text"
|
description: "The password for login in clear text"
|
||||||
required: false
|
required: true
|
||||||
type: "string"
|
type: "string"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
type: "string"
|
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:
|
400:
|
||||||
description: "Invalid username/password supplied"
|
description: "Invalid username/password supplied"
|
||||||
x-tags:
|
x-tags:
|
||||||
@ -667,8 +521,8 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.logout_user"
|
operationId: "controllers.default_controller.logout_user"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters: []
|
parameters: []
|
||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
@ -683,8 +537,8 @@ paths:
|
|||||||
description: ""
|
description: ""
|
||||||
operationId: "controllers.default_controller.get_user_by_name"
|
operationId: "controllers.default_controller.get_user_by_name"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "username"
|
- name: "username"
|
||||||
in: "path"
|
in: "path"
|
||||||
@ -696,16 +550,6 @@ paths:
|
|||||||
description: "successful operation"
|
description: "successful operation"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/User"
|
$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:
|
400:
|
||||||
description: "Invalid username supplied"
|
description: "Invalid username supplied"
|
||||||
404:
|
404:
|
||||||
@ -719,8 +563,8 @@ paths:
|
|||||||
description: "This can only be done by the logged in user."
|
description: "This can only be done by the logged in user."
|
||||||
operationId: "controllers.default_controller.update_user"
|
operationId: "controllers.default_controller.update_user"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "username"
|
- name: "username"
|
||||||
in: "path"
|
in: "path"
|
||||||
@ -730,7 +574,7 @@ paths:
|
|||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "Updated user object"
|
description: "Updated user object"
|
||||||
required: false
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/User"
|
$ref: "#/definitions/User"
|
||||||
responses:
|
responses:
|
||||||
@ -747,8 +591,8 @@ paths:
|
|||||||
description: "This can only be done by the logged in user."
|
description: "This can only be done by the logged in user."
|
||||||
operationId: "controllers.default_controller.delete_user"
|
operationId: "controllers.default_controller.delete_user"
|
||||||
produces:
|
produces:
|
||||||
- "application/json"
|
|
||||||
- "application/xml"
|
- "application/xml"
|
||||||
|
- "application/json"
|
||||||
parameters:
|
parameters:
|
||||||
- name: "username"
|
- name: "username"
|
||||||
in: "path"
|
in: "path"
|
||||||
@ -760,33 +604,13 @@ paths:
|
|||||||
description: "Invalid username supplied"
|
description: "Invalid username supplied"
|
||||||
404:
|
404:
|
||||||
description: "User not found"
|
description: "User not found"
|
||||||
security:
|
|
||||||
- test_http_basic: []
|
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: "user"
|
- tag: "user"
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
test_api_key_header:
|
|
||||||
type: "apiKey"
|
|
||||||
name: "test_api_key_header"
|
|
||||||
in: "header"
|
|
||||||
api_key:
|
api_key:
|
||||||
type: "apiKey"
|
type: "apiKey"
|
||||||
name: "api_key"
|
name: "api_key"
|
||||||
in: "header"
|
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:
|
petstore_auth:
|
||||||
type: "oauth2"
|
type: "oauth2"
|
||||||
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
|
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"
|
||||||
@ -795,7 +619,45 @@ securityDefinitions:
|
|||||||
write:pets: "modify pets in your account"
|
write:pets: "modify pets in your account"
|
||||||
read:pets: "read your pets"
|
read:pets: "read your pets"
|
||||||
definitions:
|
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:
|
User:
|
||||||
|
type: "object"
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
@ -818,7 +680,8 @@ definitions:
|
|||||||
description: "User Status"
|
description: "User Status"
|
||||||
xml:
|
xml:
|
||||||
name: "User"
|
name: "User"
|
||||||
Category:
|
Tag:
|
||||||
|
type: "object"
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
@ -826,8 +689,9 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: "string"
|
type: "string"
|
||||||
xml:
|
xml:
|
||||||
name: "Category"
|
name: "Tag"
|
||||||
Pet:
|
Pet:
|
||||||
|
type: "object"
|
||||||
required:
|
required:
|
||||||
- "name"
|
- "name"
|
||||||
- "photoUrls"
|
- "photoUrls"
|
||||||
@ -863,163 +727,16 @@ definitions:
|
|||||||
- "sold"
|
- "sold"
|
||||||
xml:
|
xml:
|
||||||
name: "Pet"
|
name: "Pet"
|
||||||
Tag:
|
ApiResponse:
|
||||||
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:
|
|
||||||
type: "object"
|
type: "object"
|
||||||
required:
|
|
||||||
- "className"
|
|
||||||
discriminator: "className"
|
|
||||||
properties:
|
properties:
|
||||||
className:
|
code:
|
||||||
type: "string"
|
|
||||||
format_test:
|
|
||||||
type: "object"
|
|
||||||
required:
|
|
||||||
- "number"
|
|
||||||
properties:
|
|
||||||
integer:
|
|
||||||
type: "integer"
|
|
||||||
int32:
|
|
||||||
type: "integer"
|
type: "integer"
|
||||||
format: "int32"
|
format: "int32"
|
||||||
int64:
|
type:
|
||||||
type: "integer"
|
|
||||||
format: "int64"
|
|
||||||
number:
|
|
||||||
type: "number"
|
|
||||||
float:
|
|
||||||
type: "number"
|
|
||||||
format: "float"
|
|
||||||
double:
|
|
||||||
type: "number"
|
|
||||||
format: "double"
|
|
||||||
string:
|
|
||||||
type: "string"
|
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"
|
type: "string"
|
||||||
|
externalDocs:
|
||||||
|
description: "Find out more about Swagger"
|
||||||
|
url: "http://swagger.io"
|
||||||
|
@ -2,11 +2,14 @@ controllerPackage: io.swagger.handler
|
|||||||
modelPackage: io.swagger.model
|
modelPackage: io.swagger.model
|
||||||
swaggerUrl: ./src/main/swagger/swagger.yaml
|
swaggerUrl: ./src/main/swagger/swagger.yaml
|
||||||
modelMappings:
|
modelMappings:
|
||||||
User : io.swagger.model.User
|
# to enable explicit mappings, use this syntax:
|
||||||
Category : io.swagger.model.Category
|
DefinitionFromSwaggerSpecification: fully.qualified.path.to.Model
|
||||||
Pet : io.swagger.model.Pet
|
ApiResponse : io.swagger.model.ApiResponse
|
||||||
Tag : io.swagger.model.Tag
|
Category : io.swagger.model.Category
|
||||||
Order : io.swagger.model.Order
|
Order : io.swagger.model.Order
|
||||||
|
Pet : io.swagger.model.Pet
|
||||||
|
Tag : io.swagger.model.Tag
|
||||||
|
User : io.swagger.model.User
|
||||||
|
|
||||||
entityProcessors:
|
entityProcessors:
|
||||||
- json
|
- json
|
||||||
|
@ -19,6 +19,25 @@
|
|||||||
<directory>target</directory>
|
<directory>target</directory>
|
||||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.10</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>add-source</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src/gen/java</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
@ -78,12 +97,21 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-inflector</artifactId>
|
<artifactId>swagger-inflector</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>${swagger-inflector-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>sonatype-snapshots</id>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||||
<swagger-core-version>1.5.7</swagger-core-version>
|
<swagger-inflector-version>1.0.4</swagger-inflector-version>
|
||||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||||
<logback-version>1.0.1</logback-version>
|
<logback-version>1.0.1</logback-version>
|
||||||
<junit-version>4.8.2</junit-version>
|
<junit-version>4.8.2</junit-version>
|
||||||
|
@ -14,7 +14,7 @@ import io.swagger.model.Pet;
|
|||||||
import io.swagger.model.ApiResponse;
|
import io.swagger.model.ApiResponse;
|
||||||
import java.io.File;
|
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 {
|
public class PetController {
|
||||||
/**
|
/**
|
||||||
* Uncomment and implement as you see fit. These operations will map
|
* Uncomment and implement as you see fit. These operations will map
|
||||||
|
@ -13,7 +13,7 @@ import io.swagger.model.*;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import io.swagger.model.Order;
|
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 {
|
public class StoreController {
|
||||||
/**
|
/**
|
||||||
* Uncomment and implement as you see fit. These operations will map
|
* Uncomment and implement as you see fit. These operations will map
|
||||||
|
@ -13,7 +13,7 @@ import io.swagger.model.*;
|
|||||||
import io.swagger.model.User;
|
import io.swagger.model.User;
|
||||||
import java.util.List;
|
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 {
|
public class UserController {
|
||||||
/**
|
/**
|
||||||
* Uncomment and implement as you see fit. These operations will map
|
* Uncomment and implement as you see fit. These operations will map
|
||||||
|
@ -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 ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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 ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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<String> photoUrls = new ArrayList<String>();
|
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
|
||||||
|
|
||||||
|
|
||||||
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<String> getPhotoUrls() {
|
|
||||||
return photoUrls;
|
|
||||||
}
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
@JsonProperty("tags")
|
|
||||||
public List<Tag> getTags() {
|
|
||||||
return tags;
|
|
||||||
}
|
|
||||||
public void setTags(List<Tag> 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 ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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 ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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 ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -14,7 +14,7 @@ public interface StoreApi {
|
|||||||
@Path("/store/order/{orderId}")
|
@Path("/store/order/{orderId}")
|
||||||
|
|
||||||
@Produces({ "application/xml", "application/json" })
|
@Produces({ "application/xml", "application/json" })
|
||||||
public Response deleteOrder(@PathParam("orderId") Long orderId);
|
public Response deleteOrder(@PathParam("orderId") String orderId);
|
||||||
@GET
|
@GET
|
||||||
@Path("/store/inventory")
|
@Path("/store/inventory")
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ public class ApiResponse {
|
|||||||
|
|
||||||
private String message = null;
|
private String message = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -34,7 +33,6 @@ public class ApiResponse {
|
|||||||
public void setCode(Integer code) {
|
public void setCode(Integer code) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -44,7 +42,6 @@ public class ApiResponse {
|
|||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -55,7 +52,6 @@ public class ApiResponse {
|
|||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -22,7 +22,6 @@ public class Category {
|
|||||||
|
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -32,7 +31,6 @@ public class Category {
|
|||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -43,7 +41,6 @@ public class Category {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -32,7 +32,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||||||
@XmlType(name="Order")
|
@XmlType(name="Order")
|
||||||
@XmlEnum
|
@XmlEnum
|
||||||
public enum Order {
|
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() {
|
public String value() {
|
||||||
return name();
|
return name();
|
||||||
@ -47,7 +47,6 @@ public enum Order {
|
|||||||
|
|
||||||
private Boolean complete = false;
|
private Boolean complete = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -57,7 +56,6 @@ public enum Order {
|
|||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -67,7 +65,6 @@ public enum Order {
|
|||||||
public void setPetId(Long petId) {
|
public void setPetId(Long petId) {
|
||||||
this.petId = petId;
|
this.petId = petId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -77,7 +74,6 @@ public enum Order {
|
|||||||
public void setQuantity(Integer quantity) {
|
public void setQuantity(Integer quantity) {
|
||||||
this.quantity = quantity;
|
this.quantity = quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -87,7 +83,6 @@ public enum Order {
|
|||||||
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
|
public void setShipDate(javax.xml.datatype.XMLGregorianCalendar shipDate) {
|
||||||
this.shipDate = shipDate;
|
this.shipDate = shipDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order Status
|
* Order Status
|
||||||
**/
|
**/
|
||||||
@ -98,7 +93,6 @@ public enum Order {
|
|||||||
public void setStatus(StatusEnum status) {
|
public void setStatus(StatusEnum status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -109,7 +103,6 @@ public enum Order {
|
|||||||
this.complete = complete;
|
this.complete = complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -38,7 +38,7 @@ import javax.xml.bind.annotation.XmlType;
|
|||||||
@XmlType(name="Pet")
|
@XmlType(name="Pet")
|
||||||
@XmlEnum
|
@XmlEnum
|
||||||
public enum Pet {
|
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() {
|
public String value() {
|
||||||
return name();
|
return name();
|
||||||
@ -51,7 +51,6 @@ public enum Pet {
|
|||||||
|
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -61,7 +60,6 @@ public enum Pet {
|
|||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -71,7 +69,6 @@ public enum Pet {
|
|||||||
public void setCategory(Category category) {
|
public void setCategory(Category category) {
|
||||||
this.category = category;
|
this.category = category;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -81,7 +78,6 @@ public enum Pet {
|
|||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -91,7 +87,6 @@ public enum Pet {
|
|||||||
public void setPhotoUrls(List<String> photoUrls) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.photoUrls = photoUrls;
|
this.photoUrls = photoUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -101,7 +96,6 @@ public enum Pet {
|
|||||||
public void setTags(List<Tag> tags) {
|
public void setTags(List<Tag> tags) {
|
||||||
this.tags = tags;
|
this.tags = tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@ -113,7 +107,6 @@ public enum Pet {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -22,7 +22,6 @@ public class Tag {
|
|||||||
|
|
||||||
private String name = null;
|
private String name = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -32,7 +31,6 @@ public class Tag {
|
|||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -43,7 +41,6 @@ public class Tag {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -34,7 +34,6 @@ public class User {
|
|||||||
|
|
||||||
private Integer userStatus = null;
|
private Integer userStatus = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -44,7 +43,6 @@ public class User {
|
|||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -54,7 +52,6 @@ public class User {
|
|||||||
public void setUsername(String username) {
|
public void setUsername(String username) {
|
||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -64,7 +61,6 @@ public class User {
|
|||||||
public void setFirstName(String firstName) {
|
public void setFirstName(String firstName) {
|
||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -74,7 +70,6 @@ public class User {
|
|||||||
public void setLastName(String lastName) {
|
public void setLastName(String lastName) {
|
||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -84,7 +79,6 @@ public class User {
|
|||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -94,7 +88,6 @@ public class User {
|
|||||||
public void setPassword(String password) {
|
public void setPassword(String password) {
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@ -104,7 +97,6 @@ public class User {
|
|||||||
public void setPhone(String phone) {
|
public void setPhone(String phone) {
|
||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User Status
|
* User Status
|
||||||
**/
|
**/
|
||||||
@ -116,7 +108,6 @@ public class User {
|
|||||||
this.userStatus = userStatus;
|
this.userStatus = userStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user