forked from loafle/openapi-generator-original
[Java][Spring] fix missing import for java.io.IOException (#5501)
* fix issue about import io exception for spring mvc * fix spring-mvc-petstore-j8-async script, config * update spring cloud client, restore petstore.yaml
This commit is contained in:
parent
42a5a13fef
commit
2324e927bd
@ -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 -t modules/swagger-codegen/src/main/resources/JavaSpring -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l spring --library spring-mvc -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,java8=true,async=true"
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaSpring -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json -DhideGenerationTimestamp=true,java8=true,async=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
"library": "j8-async"
|
"java8": true,
|
||||||
|
"async": true,
|
||||||
|
"library": "spring-mvc",
|
||||||
|
"artifactId": "swagger-spring-mvc-server-j8-async"
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
{{#useSpringCloudClient}}
|
{{^useSpringCloudClient}}
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
{{/useSpringCloudClient}}
|
{{/useSpringCloudClient}}
|
||||||
|
|
||||||
|
@ -17,15 +17,16 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
{{^useSpringCloudClient}}
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import java.io.IOException;
|
|
||||||
{{/useSpringCloudClient}}
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
{{#async}}
|
{{#async}}
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
{{/async}}{{/jdk8-no-delegate}}
|
{{/async}}
|
||||||
|
{{/jdk8-no-delegate}}
|
||||||
|
{{^useSpringCloudClient}}
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
|
{{/useSpringCloudClient}}
|
||||||
{{#useBeanValidation}}
|
{{#useBeanValidation}}
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
@ -1,20 +1,29 @@
|
|||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
description: >-
|
description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'
|
||||||
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
|
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: Swagger Petstore
|
title: Swagger Petstore
|
||||||
termsOfService: 'http://helloreverb.com/terms/'
|
termsOfService: 'http://swagger.io/terms/'
|
||||||
contact:
|
contact:
|
||||||
email: apiteam@wordnik.com
|
email: apiteam@swagger.io
|
||||||
license:
|
license:
|
||||||
name: Apache 2.0
|
name: Apache 2.0
|
||||||
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 +38,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:
|
||||||
@ -55,13 +64,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:
|
||||||
@ -83,13 +92,13 @@ paths:
|
|||||||
description: Multiple status values can be provided with comma separated strings
|
description: Multiple status values can be provided with comma separated strings
|
||||||
operationId: findPetsByStatus
|
operationId: findPetsByStatus
|
||||||
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 filter
|
description: Status values that need to be considered for filter
|
||||||
required: false
|
required: true
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@ -97,8 +106,8 @@ paths:
|
|||||||
- available
|
- available
|
||||||
- pending
|
- pending
|
||||||
- sold
|
- sold
|
||||||
collectionFormat: multi
|
|
||||||
default: available
|
default: available
|
||||||
|
collectionFormat: csv
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -106,13 +115,6 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Pet'
|
$ref: '#/definitions/Pet'
|
||||||
examples:
|
|
||||||
application/json:
|
|
||||||
name: Puma
|
|
||||||
type: Dog
|
|
||||||
color: Black
|
|
||||||
gender: Female
|
|
||||||
breed: Mixed
|
|
||||||
'400':
|
'400':
|
||||||
description: Invalid status value
|
description: Invalid status value
|
||||||
security:
|
security:
|
||||||
@ -124,22 +126,20 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
summary: Finds Pets by tags
|
summary: Finds Pets by tags
|
||||||
description: >-
|
description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.'
|
||||||
Multiple tags can be provided with comma separated strings. Use tag1,
|
|
||||||
tag2, tag3 for testing.
|
|
||||||
operationId: findPetsByTags
|
operationId: findPetsByTags
|
||||||
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
|
||||||
@ -158,17 +158,15 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
summary: Find pet by ID
|
summary: Find pet by ID
|
||||||
description: >-
|
description: Returns a single pet
|
||||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API
|
|
||||||
error conditions
|
|
||||||
operationId: getPetById
|
operationId: getPetById
|
||||||
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
|
||||||
@ -183,9 +181,6 @@ paths:
|
|||||||
description: Pet not found
|
description: Pet not found
|
||||||
security:
|
security:
|
||||||
- api_key: []
|
- api_key: []
|
||||||
- petstore_auth:
|
|
||||||
- 'write:pets'
|
|
||||||
- 'read:pets'
|
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
@ -195,14 +190,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
|
||||||
@ -227,12 +223,11 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: deletePet
|
operationId: deletePet
|
||||||
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
|
||||||
@ -259,7 +254,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
|
||||||
@ -278,8 +272,10 @@ paths:
|
|||||||
required: false
|
required: false
|
||||||
type: file
|
type: file
|
||||||
responses:
|
responses:
|
||||||
default:
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/ApiResponse'
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- 'write:pets'
|
- 'write:pets'
|
||||||
@ -293,7 +289,7 @@ paths:
|
|||||||
operationId: getInventory
|
operationId: getInventory
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
- application/xml
|
parameters: []
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -312,13 +308,13 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: placeOrder
|
operationId: placeOrder
|
||||||
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:
|
||||||
@ -333,19 +329,20 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- store
|
- store
|
||||||
summary: Find purchase order by ID
|
summary: Find purchase order by ID
|
||||||
description: >-
|
description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'
|
||||||
For valid response try integer IDs with value <= 5 or > 10. Other values
|
|
||||||
will generated exceptions
|
|
||||||
operationId: getOrderById
|
operationId: getOrderById
|
||||||
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
|
||||||
|
minimum: 1
|
||||||
|
format: int64
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -359,13 +356,11 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- store
|
- store
|
||||||
summary: Delete purchase order by ID
|
summary: Delete purchase order by ID
|
||||||
description: >-
|
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
For valid response try integer IDs with value < 1000. Anything above
|
|
||||||
1000 or nonintegers will generate API errors
|
|
||||||
operationId: deleteOrder
|
operationId: deleteOrder
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
|
||||||
- application/xml
|
- application/xml
|
||||||
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
- name: orderId
|
- name: orderId
|
||||||
in: path
|
in: path
|
||||||
@ -385,13 +380,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: createUser
|
operationId: createUser
|
||||||
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:
|
||||||
@ -405,13 +400,13 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: createUsersWithArrayInput
|
operationId: createUsersWithArrayInput
|
||||||
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:
|
||||||
@ -427,13 +422,13 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: createUsersWithListInput
|
operationId: createUsersWithListInput
|
||||||
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:
|
||||||
@ -449,24 +444,33 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: loginUser
|
operationId: loginUser
|
||||||
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
|
||||||
/user/logout:
|
/user/logout:
|
||||||
@ -477,8 +481,9 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: logoutUser
|
operationId: logoutUser
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
|
||||||
- application/xml
|
- application/xml
|
||||||
|
- application/json
|
||||||
|
parameters: []
|
||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -490,8 +495,8 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: getUserByName
|
operationId: getUserByName
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
|
||||||
- application/xml
|
- application/xml
|
||||||
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: path
|
in: path
|
||||||
@ -514,8 +519,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: updateUser
|
operationId: updateUser
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
|
||||||
- application/xml
|
- application/xml
|
||||||
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: path
|
in: path
|
||||||
@ -525,7 +530,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:
|
||||||
@ -540,8 +545,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: deleteUser
|
operationId: deleteUser
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
|
||||||
- application/xml
|
- application/xml
|
||||||
|
- application/json
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: path
|
in: path
|
||||||
@ -554,10 +559,6 @@ paths:
|
|||||||
'404':
|
'404':
|
||||||
description: User not found
|
description: User not found
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
api_key:
|
|
||||||
type: apiKey
|
|
||||||
name: api_key
|
|
||||||
in: header
|
|
||||||
petstore_auth:
|
petstore_auth:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
||||||
@ -565,8 +566,56 @@ securityDefinitions:
|
|||||||
scopes:
|
scopes:
|
||||||
'write:pets': modify pets in your account
|
'write:pets': modify pets in your account
|
||||||
'read:pets': read your pets
|
'read:pets': read your pets
|
||||||
|
api_key:
|
||||||
|
type: apiKey
|
||||||
|
name: api_key
|
||||||
|
in: header
|
||||||
definitions:
|
definitions:
|
||||||
|
Order:
|
||||||
|
title: Pet Order
|
||||||
|
description: An order for a pets from the pet store
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
petId:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
quantity:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
shipDate:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
description: Order Status
|
||||||
|
enum:
|
||||||
|
- placed
|
||||||
|
- approved
|
||||||
|
- delivered
|
||||||
|
complete:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
xml:
|
||||||
|
name: Order
|
||||||
|
Category:
|
||||||
|
title: Pet catehgry
|
||||||
|
description: A category for a pet
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: Category
|
||||||
User:
|
User:
|
||||||
|
title: a User
|
||||||
|
description: A User who is purchasing from the pet store
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
@ -589,7 +638,10 @@ definitions:
|
|||||||
description: User Status
|
description: User Status
|
||||||
xml:
|
xml:
|
||||||
name: User
|
name: User
|
||||||
Category:
|
Tag:
|
||||||
|
title: Pet Tag
|
||||||
|
description: A tag for a pet
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
@ -597,8 +649,11 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
xml:
|
xml:
|
||||||
name: Category
|
name: Tag
|
||||||
Pet:
|
Pet:
|
||||||
|
title: a Pet
|
||||||
|
description: A pet for sale in the pet store
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
- photoUrls
|
- photoUrls
|
||||||
@ -634,37 +689,18 @@ definitions:
|
|||||||
- sold
|
- sold
|
||||||
xml:
|
xml:
|
||||||
name: Pet
|
name: Pet
|
||||||
Tag:
|
ApiResponse:
|
||||||
|
title: An uploaded response
|
||||||
|
description: Describes the result of uploading an image resource
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
code:
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
xml:
|
|
||||||
name: Tag
|
|
||||||
Order:
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
petId:
|
|
||||||
type: integer
|
|
||||||
format: int64
|
|
||||||
quantity:
|
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
shipDate:
|
type:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
message:
|
||||||
status:
|
|
||||||
type: string
|
type: string
|
||||||
description: Order Status
|
externalDocs:
|
||||||
enum:
|
description: Find out more about Swagger
|
||||||
- placed
|
url: 'http://swagger.io'
|
||||||
- approved
|
|
||||||
- delivered
|
|
||||||
complete:
|
|
||||||
type: boolean
|
|
||||||
xml:
|
|
||||||
name: Order
|
|
||||||
|
@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-spring</artifactId>
|
<artifactId>swagger-spring-mvc-server-j8-async</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>swagger-spring</name>
|
<name>swagger-spring-mvc-server-j8-async</name>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>src/main/java</sourceDirectory>
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
@ -63,7 +63,7 @@ public interface FakeApi {
|
|||||||
produces = { "*/*" },
|
produces = { "*/*" },
|
||||||
consumes = { "*/*" },
|
consumes = { "*/*" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<Void>> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble, @RequestHeader("Accept") String accept) {
|
default CompletableFuture<ResponseEntity<Void>> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble, @RequestHeader("Accept") String accept) {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<Void>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class FakeApiController implements FakeApi {
|
public class FakeApiController implements FakeApi {
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
public FakeApiController(ObjectMapper objectMapper) {
|
||||||
|
this.objectMapper = objectMapper;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public interface PetApi {
|
|||||||
@RequestMapping(value = "/pet/findByStatus",
|
@RequestMapping(value = "/pet/findByStatus",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status, @RequestHeader("Accept") String accept) throws IOException {
|
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ public interface PetApi {
|
|||||||
@RequestMapping(value = "/pet/findByTags",
|
@RequestMapping(value = "/pet/findByTags",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags, @RequestHeader("Accept") String accept) throws IOException {
|
default CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<List<Pet>>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class PetApiController implements PetApi {
|
public class PetApiController implements PetApi {
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
public PetApiController(ObjectMapper objectMapper) {
|
||||||
|
this.objectMapper = objectMapper;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class StoreApiController implements StoreApi {
|
public class StoreApiController implements StoreApi {
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
public StoreApiController(ObjectMapper objectMapper) {
|
||||||
|
this.objectMapper = objectMapper;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public interface UserApi {
|
|||||||
@RequestMapping(value = "/user/login",
|
@RequestMapping(value = "/user/login",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
default CompletableFuture<ResponseEntity<String>> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password, @RequestHeader("Accept") String accept) throws IOException {
|
default CompletableFuture<ResponseEntity<String>> loginUser( @NotNull@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password, @RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
return CompletableFuture.completedFuture(new ResponseEntity<String>(HttpStatus.OK));
|
return CompletableFuture.completedFuture(new ResponseEntity<String>(HttpStatus.OK));
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class UserApiController implements UserApi {
|
public class UserApiController implements UserApi {
|
||||||
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
|
public UserApiController(ObjectMapper objectMapper) {
|
||||||
|
this.objectMapper = objectMapper;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package io.swagger.configuration;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home redirection to swagger api documentation
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class HomeController {
|
||||||
|
@RequestMapping(value = "/")
|
||||||
|
public String index() {
|
||||||
|
System.out.println("swagger-ui.html");
|
||||||
|
return "redirect:swagger-ui.html";
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,7 @@ import org.springframework.context.annotation.ComponentScan;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.http.converter.HttpMessageConverter;
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||||
@ -58,14 +59,23 @@ public class SwaggerUiConfiguration extends WebMvcConfigurerAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Jackson2ObjectMapperBuilder builder() {
|
||||||
|
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder()
|
||||||
|
.indentOutput(true)
|
||||||
|
.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||||
|
.dateFormat(new RFC3339DateFormat());
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||||
ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json()
|
converters.add(new MappingJackson2HttpMessageConverter(objectMapper()));
|
||||||
.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
|
||||||
.dateFormat( new RFC3339DateFormat())
|
|
||||||
.build();
|
|
||||||
converters.add(new MappingJackson2HttpMessageConverter(objectMapper));
|
|
||||||
super.configureMessageConverters(converters);
|
super.configureMessageConverters(converters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ObjectMapper objectMapper(){
|
||||||
|
return builder().build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdditionalPropertiesClass
|
* AdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
@ -38,6 +40,8 @@ public class AdditionalPropertiesClass {
|
|||||||
* @return mapProperty
|
* @return mapProperty
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, String> getMapProperty() {
|
public Map<String, String> getMapProperty() {
|
||||||
return mapProperty;
|
return mapProperty;
|
||||||
}
|
}
|
||||||
@ -64,6 +68,8 @@ public class AdditionalPropertiesClass {
|
|||||||
* @return mapOfMapProperty
|
* @return mapOfMapProperty
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
||||||
return mapOfMapProperty;
|
return mapOfMapProperty;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animal
|
* Animal
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class Animal {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getClassName() {
|
public String getClassName() {
|
||||||
return className;
|
return className;
|
||||||
}
|
}
|
||||||
@ -53,6 +57,8 @@ public class Animal {
|
|||||||
* @return color
|
* @return color
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getColor() {
|
public String getColor() {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import java.util.Objects;
|
|||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AnimalFarm
|
* AnimalFarm
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfArrayOfNumberOnly
|
* ArrayOfArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
* @return arrayArrayNumber
|
* @return arrayArrayNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<List<BigDecimal>> getArrayArrayNumber() {
|
public List<List<BigDecimal>> getArrayArrayNumber() {
|
||||||
return arrayArrayNumber;
|
return arrayArrayNumber;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfNumberOnly
|
* ArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class ArrayOfNumberOnly {
|
|||||||
* @return arrayNumber
|
* @return arrayNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<BigDecimal> getArrayNumber() {
|
public List<BigDecimal> getArrayNumber() {
|
||||||
return arrayNumber;
|
return arrayNumber;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import io.swagger.model.ReadOnlyFirst;
|
import io.swagger.model.ReadOnlyFirst;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayTest
|
* ArrayTest
|
||||||
*/
|
*/
|
||||||
@ -41,6 +43,8 @@ public class ArrayTest {
|
|||||||
* @return arrayOfString
|
* @return arrayOfString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<String> getArrayOfString() {
|
public List<String> getArrayOfString() {
|
||||||
return arrayOfString;
|
return arrayOfString;
|
||||||
}
|
}
|
||||||
@ -67,6 +71,8 @@ public class ArrayTest {
|
|||||||
* @return arrayArrayOfInteger
|
* @return arrayArrayOfInteger
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<List<Long>> getArrayArrayOfInteger() {
|
public List<List<Long>> getArrayArrayOfInteger() {
|
||||||
return arrayArrayOfInteger;
|
return arrayArrayOfInteger;
|
||||||
}
|
}
|
||||||
@ -93,6 +99,8 @@ public class ArrayTest {
|
|||||||
* @return arrayArrayOfModel
|
* @return arrayArrayOfModel
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
|
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
|
||||||
return arrayArrayOfModel;
|
return arrayArrayOfModel;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capitalization
|
* Capitalization
|
||||||
*/
|
*/
|
||||||
@ -39,6 +41,8 @@ public class Capitalization {
|
|||||||
* @return smallCamel
|
* @return smallCamel
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getSmallCamel() {
|
public String getSmallCamel() {
|
||||||
return smallCamel;
|
return smallCamel;
|
||||||
}
|
}
|
||||||
@ -57,6 +61,8 @@ public class Capitalization {
|
|||||||
* @return capitalCamel
|
* @return capitalCamel
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getCapitalCamel() {
|
public String getCapitalCamel() {
|
||||||
return capitalCamel;
|
return capitalCamel;
|
||||||
}
|
}
|
||||||
@ -75,6 +81,8 @@ public class Capitalization {
|
|||||||
* @return smallSnake
|
* @return smallSnake
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getSmallSnake() {
|
public String getSmallSnake() {
|
||||||
return smallSnake;
|
return smallSnake;
|
||||||
}
|
}
|
||||||
@ -93,6 +101,8 @@ public class Capitalization {
|
|||||||
* @return capitalSnake
|
* @return capitalSnake
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getCapitalSnake() {
|
public String getCapitalSnake() {
|
||||||
return capitalSnake;
|
return capitalSnake;
|
||||||
}
|
}
|
||||||
@ -111,6 +121,8 @@ public class Capitalization {
|
|||||||
* @return scAETHFlowPoints
|
* @return scAETHFlowPoints
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getScAETHFlowPoints() {
|
public String getScAETHFlowPoints() {
|
||||||
return scAETHFlowPoints;
|
return scAETHFlowPoints;
|
||||||
}
|
}
|
||||||
@ -129,6 +141,8 @@ public class Capitalization {
|
|||||||
* @return ATT_NAME
|
* @return ATT_NAME
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "Name of the pet ")
|
@ApiModelProperty(value = "Name of the pet ")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getATTNAME() {
|
public String getATTNAME() {
|
||||||
return ATT_NAME;
|
return ATT_NAME;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class Cat extends Animal {
|
|||||||
* @return declawed
|
* @return declawed
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Boolean getDeclawed() {
|
public Boolean getDeclawed() {
|
||||||
return declawed;
|
return declawed;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category
|
* Category
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class Category {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class Category {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model with \"_class\" property
|
* Model for testing model with \"_class\" property
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class ClassModel {
|
|||||||
* @return propertyClass
|
* @return propertyClass
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPropertyClass() {
|
public String getPropertyClass() {
|
||||||
return propertyClass;
|
return propertyClass;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client
|
* Client
|
||||||
*/
|
*/
|
||||||
@ -24,6 +26,8 @@ public class Client {
|
|||||||
* @return client
|
* @return client
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getClient() {
|
public String getClient() {
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class Dog extends Animal {
|
|||||||
* @return breed
|
* @return breed
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBreed() {
|
public String getBreed() {
|
||||||
return breed;
|
return breed;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumArrays
|
* EnumArrays
|
||||||
*/
|
*/
|
||||||
@ -92,6 +94,8 @@ public class EnumArrays {
|
|||||||
* @return justSymbol
|
* @return justSymbol
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public JustSymbolEnum getJustSymbol() {
|
public JustSymbolEnum getJustSymbol() {
|
||||||
return justSymbol;
|
return justSymbol;
|
||||||
}
|
}
|
||||||
@ -118,6 +122,8 @@ public class EnumArrays {
|
|||||||
* @return arrayEnum
|
* @return arrayEnum
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<ArrayEnumEnum> getArrayEnum() {
|
public List<ArrayEnumEnum> getArrayEnum() {
|
||||||
return arrayEnum;
|
return arrayEnum;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,9 @@ package io.swagger.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.OuterEnum;
|
import io.swagger.model.OuterEnum;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumTest
|
* EnumTest
|
||||||
*/
|
*/
|
||||||
@ -130,6 +132,8 @@ public class EnumTest {
|
|||||||
* @return enumString
|
* @return enumString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public EnumStringEnum getEnumString() {
|
public EnumStringEnum getEnumString() {
|
||||||
return enumString;
|
return enumString;
|
||||||
}
|
}
|
||||||
@ -148,6 +152,8 @@ public class EnumTest {
|
|||||||
* @return enumInteger
|
* @return enumInteger
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public EnumIntegerEnum getEnumInteger() {
|
public EnumIntegerEnum getEnumInteger() {
|
||||||
return enumInteger;
|
return enumInteger;
|
||||||
}
|
}
|
||||||
@ -166,6 +172,8 @@ public class EnumTest {
|
|||||||
* @return enumNumber
|
* @return enumNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public EnumNumberEnum getEnumNumber() {
|
public EnumNumberEnum getEnumNumber() {
|
||||||
return enumNumber;
|
return enumNumber;
|
||||||
}
|
}
|
||||||
@ -184,6 +192,8 @@ public class EnumTest {
|
|||||||
* @return outerEnum
|
* @return outerEnum
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public OuterEnum getOuterEnum() {
|
public OuterEnum getOuterEnum() {
|
||||||
return outerEnum;
|
return outerEnum;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@ import java.math.BigDecimal;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FormatTest
|
* FormatTest
|
||||||
*/
|
*/
|
||||||
@ -66,7 +68,9 @@ public class FormatTest {
|
|||||||
* @return integer
|
* @return integer
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@Min(10) @Max(100) public Integer getInteger() {
|
@Min(10) @Max(100)
|
||||||
|
@Valid
|
||||||
|
public Integer getInteger() {
|
||||||
return integer;
|
return integer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +90,9 @@ public class FormatTest {
|
|||||||
* @return int32
|
* @return int32
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@Min(20) @Max(200) public Integer getInt32() {
|
@Min(20) @Max(200)
|
||||||
|
@Valid
|
||||||
|
public Integer getInt32() {
|
||||||
return int32;
|
return int32;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +110,8 @@ public class FormatTest {
|
|||||||
* @return int64
|
* @return int64
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getInt64() {
|
public Long getInt64() {
|
||||||
return int64;
|
return int64;
|
||||||
}
|
}
|
||||||
@ -125,7 +133,9 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() {
|
@DecimalMin("32.1") @DecimalMax("543.2")
|
||||||
|
@Valid
|
||||||
|
public BigDecimal getNumber() {
|
||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +155,9 @@ public class FormatTest {
|
|||||||
* @return _float
|
* @return _float
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() {
|
@DecimalMin("54.3") @DecimalMax("987.6")
|
||||||
|
@Valid
|
||||||
|
public Float getFloat() {
|
||||||
return _float;
|
return _float;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +177,9 @@ public class FormatTest {
|
|||||||
* @return _double
|
* @return _double
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() {
|
@DecimalMin("67.8") @DecimalMax("123.4")
|
||||||
|
@Valid
|
||||||
|
public Double getDouble() {
|
||||||
return _double;
|
return _double;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +197,9 @@ public class FormatTest {
|
|||||||
* @return string
|
* @return string
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@Pattern(regexp="/[a-z]/i") public String getString() {
|
@Pattern(regexp="/[a-z]/i")
|
||||||
|
@Valid
|
||||||
|
public String getString() {
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,6 +218,8 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
@ -220,6 +238,8 @@ public class FormatTest {
|
|||||||
* @return binary
|
* @return binary
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public byte[] getBinary() {
|
public byte[] getBinary() {
|
||||||
return binary;
|
return binary;
|
||||||
}
|
}
|
||||||
@ -239,6 +259,8 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public LocalDate getDate() {
|
public LocalDate getDate() {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
@ -257,6 +279,8 @@ public class FormatTest {
|
|||||||
* @return dateTime
|
* @return dateTime
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public OffsetDateTime getDateTime() {
|
public OffsetDateTime getDateTime() {
|
||||||
return dateTime;
|
return dateTime;
|
||||||
}
|
}
|
||||||
@ -275,6 +299,8 @@ public class FormatTest {
|
|||||||
* @return uuid
|
* @return uuid
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public UUID getUuid() {
|
public UUID getUuid() {
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
@ -294,7 +320,9 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
@Size(min=10,max=64) public String getPassword() {
|
@Size(min=10,max=64)
|
||||||
|
@Valid
|
||||||
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HasOnlyReadOnly
|
* HasOnlyReadOnly
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class HasOnlyReadOnly {
|
|||||||
* @return bar
|
* @return bar
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBar() {
|
public String getBar() {
|
||||||
return bar;
|
return bar;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class HasOnlyReadOnly {
|
|||||||
* @return foo
|
* @return foo
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getFoo() {
|
public String getFoo() {
|
||||||
return foo;
|
return foo;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
*/
|
*/
|
||||||
@ -70,6 +72,8 @@ public class MapTest {
|
|||||||
* @return mapMapOfString
|
* @return mapMapOfString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, Map<String, String>> getMapMapOfString() {
|
public Map<String, Map<String, String>> getMapMapOfString() {
|
||||||
return mapMapOfString;
|
return mapMapOfString;
|
||||||
}
|
}
|
||||||
@ -96,6 +100,8 @@ public class MapTest {
|
|||||||
* @return mapOfEnumString
|
* @return mapOfEnumString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, InnerEnum> getMapOfEnumString() {
|
public Map<String, InnerEnum> getMapOfEnumString() {
|
||||||
return mapOfEnumString;
|
return mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,9 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MixedPropertiesAndAdditionalPropertiesClass
|
* MixedPropertiesAndAdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
@ -36,6 +38,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
* @return uuid
|
* @return uuid
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public UUID getUuid() {
|
public UUID getUuid() {
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
@ -54,6 +58,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
* @return dateTime
|
* @return dateTime
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public OffsetDateTime getDateTime() {
|
public OffsetDateTime getDateTime() {
|
||||||
return dateTime;
|
return dateTime;
|
||||||
}
|
}
|
||||||
@ -80,6 +86,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
* @return map
|
* @return map
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, Animal> getMap() {
|
public Map<String, Animal> getMap() {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name starting with number
|
* Model for testing model name starting with number
|
||||||
*/
|
*/
|
||||||
@ -28,6 +30,8 @@ public class Model200Response {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getName() {
|
public Integer getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -46,6 +50,8 @@ public class Model200Response {
|
|||||||
* @return propertyClass
|
* @return propertyClass
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPropertyClass() {
|
public String getPropertyClass() {
|
||||||
return propertyClass;
|
return propertyClass;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ModelApiResponse
|
* ModelApiResponse
|
||||||
*/
|
*/
|
||||||
@ -30,6 +32,8 @@ public class ModelApiResponse {
|
|||||||
* @return code
|
* @return code
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getCode() {
|
public Integer getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
@ -48,6 +52,8 @@ public class ModelApiResponse {
|
|||||||
* @return type
|
* @return type
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
@ -66,6 +72,8 @@ public class ModelApiResponse {
|
|||||||
* @return message
|
* @return message
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing reserved words
|
* Model for testing reserved words
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class ModelReturn {
|
|||||||
* @return _return
|
* @return _return
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getReturn() {
|
public Integer getReturn() {
|
||||||
return _return;
|
return _return;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name same as property name
|
* Model for testing model name same as property name
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class Name {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getName() {
|
public Integer getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -53,6 +57,8 @@ public class Name {
|
|||||||
* @return snakeCase
|
* @return snakeCase
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getSnakeCase() {
|
public Integer getSnakeCase() {
|
||||||
return snakeCase;
|
return snakeCase;
|
||||||
}
|
}
|
||||||
@ -71,6 +77,8 @@ public class Name {
|
|||||||
* @return property
|
* @return property
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getProperty() {
|
public String getProperty() {
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
@ -89,6 +97,8 @@ public class Name {
|
|||||||
* @return _123Number
|
* @return _123Number
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer get123Number() {
|
public Integer get123Number() {
|
||||||
return _123Number;
|
return _123Number;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NumberOnly
|
* NumberOnly
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class NumberOnly {
|
|||||||
* @return justNumber
|
* @return justNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public BigDecimal getJustNumber() {
|
public BigDecimal getJustNumber() {
|
||||||
return justNumber;
|
return justNumber;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order
|
* Order
|
||||||
*/
|
*/
|
||||||
@ -74,6 +76,8 @@ public class Order {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -92,6 +96,8 @@ public class Order {
|
|||||||
* @return petId
|
* @return petId
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getPetId() {
|
public Long getPetId() {
|
||||||
return petId;
|
return petId;
|
||||||
}
|
}
|
||||||
@ -110,6 +116,8 @@ public class Order {
|
|||||||
* @return quantity
|
* @return quantity
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getQuantity() {
|
public Integer getQuantity() {
|
||||||
return quantity;
|
return quantity;
|
||||||
}
|
}
|
||||||
@ -128,6 +136,8 @@ public class Order {
|
|||||||
* @return shipDate
|
* @return shipDate
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public OffsetDateTime getShipDate() {
|
public OffsetDateTime getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
}
|
}
|
||||||
@ -146,6 +156,8 @@ public class Order {
|
|||||||
* @return status
|
* @return status
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "Order Status")
|
@ApiModelProperty(value = "Order Status")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public StatusEnum getStatus() {
|
public StatusEnum getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -164,6 +176,8 @@ public class Order {
|
|||||||
* @return complete
|
* @return complete
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Boolean getComplete() {
|
public Boolean getComplete() {
|
||||||
return complete;
|
return complete;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,9 @@ package io.swagger.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +10,9 @@ import io.swagger.model.Category;
|
|||||||
import io.swagger.model.Tag;
|
import io.swagger.model.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pet
|
* Pet
|
||||||
*/
|
*/
|
||||||
@ -77,6 +79,8 @@ public class Pet {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -95,6 +99,8 @@ public class Pet {
|
|||||||
* @return category
|
* @return category
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Category getCategory() {
|
public Category getCategory() {
|
||||||
return category;
|
return category;
|
||||||
}
|
}
|
||||||
@ -114,6 +120,8 @@ public class Pet {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -138,6 +146,8 @@ public class Pet {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<String> getPhotoUrls() {
|
public List<String> getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
@ -164,6 +174,8 @@ public class Pet {
|
|||||||
* @return tags
|
* @return tags
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<Tag> getTags() {
|
public List<Tag> getTags() {
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
@ -182,6 +194,8 @@ public class Pet {
|
|||||||
* @return status
|
* @return status
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "pet status in the store")
|
@ApiModelProperty(value = "pet status in the store")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public StatusEnum getStatus() {
|
public StatusEnum getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReadOnlyFirst
|
* ReadOnlyFirst
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class ReadOnlyFirst {
|
|||||||
* @return bar
|
* @return bar
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBar() {
|
public String getBar() {
|
||||||
return bar;
|
return bar;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class ReadOnlyFirst {
|
|||||||
* @return baz
|
* @return baz
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBaz() {
|
public String getBaz() {
|
||||||
return baz;
|
return baz;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SpecialModelName
|
* SpecialModelName
|
||||||
*/
|
*/
|
||||||
@ -24,6 +26,8 @@ public class SpecialModelName {
|
|||||||
* @return specialPropertyName
|
* @return specialPropertyName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getSpecialPropertyName() {
|
public Long getSpecialPropertyName() {
|
||||||
return specialPropertyName;
|
return specialPropertyName;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag
|
* Tag
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class Tag {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class Tag {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
*/
|
*/
|
||||||
@ -45,6 +47,8 @@ public class User {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -63,6 +67,8 @@ public class User {
|
|||||||
* @return username
|
* @return username
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
@ -81,6 +87,8 @@ public class User {
|
|||||||
* @return firstName
|
* @return firstName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getFirstName() {
|
public String getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
}
|
}
|
||||||
@ -99,6 +107,8 @@ public class User {
|
|||||||
* @return lastName
|
* @return lastName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getLastName() {
|
public String getLastName() {
|
||||||
return lastName;
|
return lastName;
|
||||||
}
|
}
|
||||||
@ -117,6 +127,8 @@ public class User {
|
|||||||
* @return email
|
* @return email
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
@ -135,6 +147,8 @@ public class User {
|
|||||||
* @return password
|
* @return password
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
@ -153,6 +167,8 @@ public class User {
|
|||||||
* @return phone
|
* @return phone
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPhone() {
|
public String getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
@ -171,6 +187,8 @@ public class User {
|
|||||||
* @return userStatus
|
* @return userStatus
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "User Status")
|
@ApiModelProperty(value = "User Status")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getUserStatus() {
|
public Integer getUserStatus() {
|
||||||
return userStatus;
|
return userStatus;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
springfox.documentation.swagger.v2.path=/api-docs
|
||||||
|
server.contextPath=/v2
|
||||||
|
server.port=80
|
||||||
|
spring.jackson.date-format=io.swagger.RFC3339DateFormat
|
||||||
|
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
@ -55,6 +55,6 @@ public interface FakeApi {
|
|||||||
produces = { "*/*" },
|
produces = { "*/*" },
|
||||||
consumes = { "*/*" },
|
consumes = { "*/*" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<Void> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString, @ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray, @ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString, @ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble, @RequestHeader("Accept") String accept);
|
ResponseEntity<Void> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) List<String> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) String enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") String enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble, @RequestHeader("Accept") String accept);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public interface PetApi {
|
|||||||
@RequestMapping(value = "/pet/findByStatus",
|
@RequestMapping(value = "/pet/findByStatus",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<List<Pet>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status, @RequestHeader("Accept") String accept) throws IOException;
|
ResponseEntity<List<Pet>> findPetsByStatus( @NotNull@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status, @RequestHeader("Accept") String accept) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
@ -79,7 +79,7 @@ public interface PetApi {
|
|||||||
@RequestMapping(value = "/pet/findByTags",
|
@RequestMapping(value = "/pet/findByTags",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<List<Pet>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags, @RequestHeader("Accept") String accept) throws IOException;
|
ResponseEntity<List<Pet>> findPetsByTags( @NotNull@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags, @RequestHeader("Accept") String accept) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||||
|
@ -15,11 +15,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ public class PetApiController implements PetApi {
|
|||||||
return new ResponseEntity<Void>(HttpStatus.OK);
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseEntity<List<Pet>> findPetsByStatus( @NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status,
|
public ResponseEntity<List<Pet>> findPetsByStatus( @NotNull@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status,
|
||||||
@RequestHeader("Accept") String accept) throws IOException {
|
@RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ public class PetApiController implements PetApi {
|
|||||||
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
|
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseEntity<List<Pet>> findPetsByTags( @NotNull @ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags,
|
public ResponseEntity<List<Pet>> findPetsByTags( @NotNull@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags,
|
||||||
@RequestHeader("Accept") String accept) throws IOException {
|
@RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
|
||||||
|
@ -14,11 +14,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ public interface UserApi {
|
|||||||
@RequestMapping(value = "/user/login",
|
@RequestMapping(value = "/user/login",
|
||||||
produces = { "application/xml", "application/json" },
|
produces = { "application/xml", "application/json" },
|
||||||
method = RequestMethod.GET)
|
method = RequestMethod.GET)
|
||||||
ResponseEntity<String> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password, @RequestHeader("Accept") String accept) throws IOException;
|
ResponseEntity<String> loginUser( @NotNull@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password, @RequestHeader("Accept") String accept) throws IOException;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
||||||
|
@ -14,11 +14,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import java.io.IOException;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@ -70,8 +69,8 @@ public class UserApiController implements UserApi {
|
|||||||
return new ResponseEntity<User>(HttpStatus.OK);
|
return new ResponseEntity<User>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseEntity<String> loginUser( @NotNull @ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username,
|
public ResponseEntity<String> loginUser( @NotNull@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username,
|
||||||
@NotNull @ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password,
|
@NotNull@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password,
|
||||||
@RequestHeader("Accept") String accept) throws IOException {
|
@RequestHeader("Accept") String accept) throws IOException {
|
||||||
// do some magic!
|
// do some magic!
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdditionalPropertiesClass
|
* AdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
@ -38,6 +40,8 @@ public class AdditionalPropertiesClass {
|
|||||||
* @return mapProperty
|
* @return mapProperty
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, String> getMapProperty() {
|
public Map<String, String> getMapProperty() {
|
||||||
return mapProperty;
|
return mapProperty;
|
||||||
}
|
}
|
||||||
@ -64,6 +68,8 @@ public class AdditionalPropertiesClass {
|
|||||||
* @return mapOfMapProperty
|
* @return mapOfMapProperty
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
||||||
return mapOfMapProperty;
|
return mapOfMapProperty;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animal
|
* Animal
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class Animal {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getClassName() {
|
public String getClassName() {
|
||||||
return className;
|
return className;
|
||||||
}
|
}
|
||||||
@ -53,6 +57,8 @@ public class Animal {
|
|||||||
* @return color
|
* @return color
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getColor() {
|
public String getColor() {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import java.util.Objects;
|
|||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AnimalFarm
|
* AnimalFarm
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfArrayOfNumberOnly
|
* ArrayOfArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class ArrayOfArrayOfNumberOnly {
|
|||||||
* @return arrayArrayNumber
|
* @return arrayArrayNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<List<BigDecimal>> getArrayArrayNumber() {
|
public List<List<BigDecimal>> getArrayArrayNumber() {
|
||||||
return arrayArrayNumber;
|
return arrayArrayNumber;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfNumberOnly
|
* ArrayOfNumberOnly
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class ArrayOfNumberOnly {
|
|||||||
* @return arrayNumber
|
* @return arrayNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<BigDecimal> getArrayNumber() {
|
public List<BigDecimal> getArrayNumber() {
|
||||||
return arrayNumber;
|
return arrayNumber;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import io.swagger.model.ReadOnlyFirst;
|
import io.swagger.model.ReadOnlyFirst;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayTest
|
* ArrayTest
|
||||||
*/
|
*/
|
||||||
@ -41,6 +43,8 @@ public class ArrayTest {
|
|||||||
* @return arrayOfString
|
* @return arrayOfString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<String> getArrayOfString() {
|
public List<String> getArrayOfString() {
|
||||||
return arrayOfString;
|
return arrayOfString;
|
||||||
}
|
}
|
||||||
@ -67,6 +71,8 @@ public class ArrayTest {
|
|||||||
* @return arrayArrayOfInteger
|
* @return arrayArrayOfInteger
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<List<Long>> getArrayArrayOfInteger() {
|
public List<List<Long>> getArrayArrayOfInteger() {
|
||||||
return arrayArrayOfInteger;
|
return arrayArrayOfInteger;
|
||||||
}
|
}
|
||||||
@ -93,6 +99,8 @@ public class ArrayTest {
|
|||||||
* @return arrayArrayOfModel
|
* @return arrayArrayOfModel
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
|
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
|
||||||
return arrayArrayOfModel;
|
return arrayArrayOfModel;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Capitalization
|
* Capitalization
|
||||||
*/
|
*/
|
||||||
@ -39,6 +41,8 @@ public class Capitalization {
|
|||||||
* @return smallCamel
|
* @return smallCamel
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getSmallCamel() {
|
public String getSmallCamel() {
|
||||||
return smallCamel;
|
return smallCamel;
|
||||||
}
|
}
|
||||||
@ -57,6 +61,8 @@ public class Capitalization {
|
|||||||
* @return capitalCamel
|
* @return capitalCamel
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getCapitalCamel() {
|
public String getCapitalCamel() {
|
||||||
return capitalCamel;
|
return capitalCamel;
|
||||||
}
|
}
|
||||||
@ -75,6 +81,8 @@ public class Capitalization {
|
|||||||
* @return smallSnake
|
* @return smallSnake
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getSmallSnake() {
|
public String getSmallSnake() {
|
||||||
return smallSnake;
|
return smallSnake;
|
||||||
}
|
}
|
||||||
@ -93,6 +101,8 @@ public class Capitalization {
|
|||||||
* @return capitalSnake
|
* @return capitalSnake
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getCapitalSnake() {
|
public String getCapitalSnake() {
|
||||||
return capitalSnake;
|
return capitalSnake;
|
||||||
}
|
}
|
||||||
@ -111,6 +121,8 @@ public class Capitalization {
|
|||||||
* @return scAETHFlowPoints
|
* @return scAETHFlowPoints
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getScAETHFlowPoints() {
|
public String getScAETHFlowPoints() {
|
||||||
return scAETHFlowPoints;
|
return scAETHFlowPoints;
|
||||||
}
|
}
|
||||||
@ -129,6 +141,8 @@ public class Capitalization {
|
|||||||
* @return ATT_NAME
|
* @return ATT_NAME
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "Name of the pet ")
|
@ApiModelProperty(value = "Name of the pet ")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getATTNAME() {
|
public String getATTNAME() {
|
||||||
return ATT_NAME;
|
return ATT_NAME;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cat
|
* Cat
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class Cat extends Animal {
|
|||||||
* @return declawed
|
* @return declawed
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Boolean getDeclawed() {
|
public Boolean getDeclawed() {
|
||||||
return declawed;
|
return declawed;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category
|
* Category
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class Category {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class Category {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model with \"_class\" property
|
* Model for testing model with \"_class\" property
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class ClassModel {
|
|||||||
* @return propertyClass
|
* @return propertyClass
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPropertyClass() {
|
public String getPropertyClass() {
|
||||||
return propertyClass;
|
return propertyClass;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client
|
* Client
|
||||||
*/
|
*/
|
||||||
@ -24,6 +26,8 @@ public class Client {
|
|||||||
* @return client
|
* @return client
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getClient() {
|
public String getClient() {
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.Animal;
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dog
|
* Dog
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class Dog extends Animal {
|
|||||||
* @return breed
|
* @return breed
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBreed() {
|
public String getBreed() {
|
||||||
return breed;
|
return breed;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumArrays
|
* EnumArrays
|
||||||
*/
|
*/
|
||||||
@ -92,6 +94,8 @@ public class EnumArrays {
|
|||||||
* @return justSymbol
|
* @return justSymbol
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public JustSymbolEnum getJustSymbol() {
|
public JustSymbolEnum getJustSymbol() {
|
||||||
return justSymbol;
|
return justSymbol;
|
||||||
}
|
}
|
||||||
@ -118,6 +122,8 @@ public class EnumArrays {
|
|||||||
* @return arrayEnum
|
* @return arrayEnum
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<ArrayEnumEnum> getArrayEnum() {
|
public List<ArrayEnumEnum> getArrayEnum() {
|
||||||
return arrayEnum;
|
return arrayEnum;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,9 @@ package io.swagger.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import io.swagger.model.OuterEnum;
|
import io.swagger.model.OuterEnum;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumTest
|
* EnumTest
|
||||||
*/
|
*/
|
||||||
@ -130,6 +132,8 @@ public class EnumTest {
|
|||||||
* @return enumString
|
* @return enumString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public EnumStringEnum getEnumString() {
|
public EnumStringEnum getEnumString() {
|
||||||
return enumString;
|
return enumString;
|
||||||
}
|
}
|
||||||
@ -148,6 +152,8 @@ public class EnumTest {
|
|||||||
* @return enumInteger
|
* @return enumInteger
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public EnumIntegerEnum getEnumInteger() {
|
public EnumIntegerEnum getEnumInteger() {
|
||||||
return enumInteger;
|
return enumInteger;
|
||||||
}
|
}
|
||||||
@ -166,6 +172,8 @@ public class EnumTest {
|
|||||||
* @return enumNumber
|
* @return enumNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public EnumNumberEnum getEnumNumber() {
|
public EnumNumberEnum getEnumNumber() {
|
||||||
return enumNumber;
|
return enumNumber;
|
||||||
}
|
}
|
||||||
@ -184,6 +192,8 @@ public class EnumTest {
|
|||||||
* @return outerEnum
|
* @return outerEnum
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public OuterEnum getOuterEnum() {
|
public OuterEnum getOuterEnum() {
|
||||||
return outerEnum;
|
return outerEnum;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@ import java.math.BigDecimal;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FormatTest
|
* FormatTest
|
||||||
*/
|
*/
|
||||||
@ -66,7 +68,9 @@ public class FormatTest {
|
|||||||
* @return integer
|
* @return integer
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@Min(10) @Max(100) public Integer getInteger() {
|
@Min(10) @Max(100)
|
||||||
|
@Valid
|
||||||
|
public Integer getInteger() {
|
||||||
return integer;
|
return integer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +90,9 @@ public class FormatTest {
|
|||||||
* @return int32
|
* @return int32
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@Min(20) @Max(200) public Integer getInt32() {
|
@Min(20) @Max(200)
|
||||||
|
@Valid
|
||||||
|
public Integer getInt32() {
|
||||||
return int32;
|
return int32;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +110,8 @@ public class FormatTest {
|
|||||||
* @return int64
|
* @return int64
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getInt64() {
|
public Long getInt64() {
|
||||||
return int64;
|
return int64;
|
||||||
}
|
}
|
||||||
@ -125,7 +133,9 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() {
|
@DecimalMin("32.1") @DecimalMax("543.2")
|
||||||
|
@Valid
|
||||||
|
public BigDecimal getNumber() {
|
||||||
return number;
|
return number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +155,9 @@ public class FormatTest {
|
|||||||
* @return _float
|
* @return _float
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() {
|
@DecimalMin("54.3") @DecimalMax("987.6")
|
||||||
|
@Valid
|
||||||
|
public Float getFloat() {
|
||||||
return _float;
|
return _float;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +177,9 @@ public class FormatTest {
|
|||||||
* @return _double
|
* @return _double
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() {
|
@DecimalMin("67.8") @DecimalMax("123.4")
|
||||||
|
@Valid
|
||||||
|
public Double getDouble() {
|
||||||
return _double;
|
return _double;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +197,9 @@ public class FormatTest {
|
|||||||
* @return string
|
* @return string
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@Pattern(regexp="/[a-z]/i") public String getString() {
|
@Pattern(regexp="/[a-z]/i")
|
||||||
|
@Valid
|
||||||
|
public String getString() {
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,6 +218,8 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
@ -220,6 +238,8 @@ public class FormatTest {
|
|||||||
* @return binary
|
* @return binary
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public byte[] getBinary() {
|
public byte[] getBinary() {
|
||||||
return binary;
|
return binary;
|
||||||
}
|
}
|
||||||
@ -239,6 +259,8 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public LocalDate getDate() {
|
public LocalDate getDate() {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
@ -257,6 +279,8 @@ public class FormatTest {
|
|||||||
* @return dateTime
|
* @return dateTime
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public DateTime getDateTime() {
|
public DateTime getDateTime() {
|
||||||
return dateTime;
|
return dateTime;
|
||||||
}
|
}
|
||||||
@ -275,6 +299,8 @@ public class FormatTest {
|
|||||||
* @return uuid
|
* @return uuid
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public UUID getUuid() {
|
public UUID getUuid() {
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
@ -294,7 +320,9 @@ public class FormatTest {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
@Size(min=10,max=64) public String getPassword() {
|
@Size(min=10,max=64)
|
||||||
|
@Valid
|
||||||
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HasOnlyReadOnly
|
* HasOnlyReadOnly
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class HasOnlyReadOnly {
|
|||||||
* @return bar
|
* @return bar
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBar() {
|
public String getBar() {
|
||||||
return bar;
|
return bar;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class HasOnlyReadOnly {
|
|||||||
* @return foo
|
* @return foo
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getFoo() {
|
public String getFoo() {
|
||||||
return foo;
|
return foo;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest
|
* MapTest
|
||||||
*/
|
*/
|
||||||
@ -70,6 +72,8 @@ public class MapTest {
|
|||||||
* @return mapMapOfString
|
* @return mapMapOfString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, Map<String, String>> getMapMapOfString() {
|
public Map<String, Map<String, String>> getMapMapOfString() {
|
||||||
return mapMapOfString;
|
return mapMapOfString;
|
||||||
}
|
}
|
||||||
@ -96,6 +100,8 @@ public class MapTest {
|
|||||||
* @return mapOfEnumString
|
* @return mapOfEnumString
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, InnerEnum> getMapOfEnumString() {
|
public Map<String, InnerEnum> getMapOfEnumString() {
|
||||||
return mapOfEnumString;
|
return mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,9 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MixedPropertiesAndAdditionalPropertiesClass
|
* MixedPropertiesAndAdditionalPropertiesClass
|
||||||
*/
|
*/
|
||||||
@ -36,6 +38,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
* @return uuid
|
* @return uuid
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public UUID getUuid() {
|
public UUID getUuid() {
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
@ -54,6 +58,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
* @return dateTime
|
* @return dateTime
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public DateTime getDateTime() {
|
public DateTime getDateTime() {
|
||||||
return dateTime;
|
return dateTime;
|
||||||
}
|
}
|
||||||
@ -80,6 +86,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
|||||||
* @return map
|
* @return map
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Map<String, Animal> getMap() {
|
public Map<String, Animal> getMap() {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name starting with number
|
* Model for testing model name starting with number
|
||||||
*/
|
*/
|
||||||
@ -28,6 +30,8 @@ public class Model200Response {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getName() {
|
public Integer getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -46,6 +50,8 @@ public class Model200Response {
|
|||||||
* @return propertyClass
|
* @return propertyClass
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPropertyClass() {
|
public String getPropertyClass() {
|
||||||
return propertyClass;
|
return propertyClass;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ModelApiResponse
|
* ModelApiResponse
|
||||||
*/
|
*/
|
||||||
@ -30,6 +32,8 @@ public class ModelApiResponse {
|
|||||||
* @return code
|
* @return code
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getCode() {
|
public Integer getCode() {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
@ -48,6 +52,8 @@ public class ModelApiResponse {
|
|||||||
* @return type
|
* @return type
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
@ -66,6 +72,8 @@ public class ModelApiResponse {
|
|||||||
* @return message
|
* @return message
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing reserved words
|
* Model for testing reserved words
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class ModelReturn {
|
|||||||
* @return _return
|
* @return _return
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getReturn() {
|
public Integer getReturn() {
|
||||||
return _return;
|
return _return;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name same as property name
|
* Model for testing model name same as property name
|
||||||
*/
|
*/
|
||||||
@ -35,6 +37,8 @@ public class Name {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getName() {
|
public Integer getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -53,6 +57,8 @@ public class Name {
|
|||||||
* @return snakeCase
|
* @return snakeCase
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getSnakeCase() {
|
public Integer getSnakeCase() {
|
||||||
return snakeCase;
|
return snakeCase;
|
||||||
}
|
}
|
||||||
@ -71,6 +77,8 @@ public class Name {
|
|||||||
* @return property
|
* @return property
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getProperty() {
|
public String getProperty() {
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
@ -89,6 +97,8 @@ public class Name {
|
|||||||
* @return _123Number
|
* @return _123Number
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer get123Number() {
|
public Integer get123Number() {
|
||||||
return _123Number;
|
return _123Number;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NumberOnly
|
* NumberOnly
|
||||||
*/
|
*/
|
||||||
@ -25,6 +27,8 @@ public class NumberOnly {
|
|||||||
* @return justNumber
|
* @return justNumber
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public BigDecimal getJustNumber() {
|
public BigDecimal getJustNumber() {
|
||||||
return justNumber;
|
return justNumber;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order
|
* Order
|
||||||
*/
|
*/
|
||||||
@ -74,6 +76,8 @@ public class Order {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -92,6 +96,8 @@ public class Order {
|
|||||||
* @return petId
|
* @return petId
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getPetId() {
|
public Long getPetId() {
|
||||||
return petId;
|
return petId;
|
||||||
}
|
}
|
||||||
@ -110,6 +116,8 @@ public class Order {
|
|||||||
* @return quantity
|
* @return quantity
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getQuantity() {
|
public Integer getQuantity() {
|
||||||
return quantity;
|
return quantity;
|
||||||
}
|
}
|
||||||
@ -128,6 +136,8 @@ public class Order {
|
|||||||
* @return shipDate
|
* @return shipDate
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public DateTime getShipDate() {
|
public DateTime getShipDate() {
|
||||||
return shipDate;
|
return shipDate;
|
||||||
}
|
}
|
||||||
@ -146,6 +156,8 @@ public class Order {
|
|||||||
* @return status
|
* @return status
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "Order Status")
|
@ApiModelProperty(value = "Order Status")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public StatusEnum getStatus() {
|
public StatusEnum getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -164,6 +176,8 @@ public class Order {
|
|||||||
* @return complete
|
* @return complete
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Boolean getComplete() {
|
public Boolean getComplete() {
|
||||||
return complete;
|
return complete;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,9 @@ package io.swagger.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +10,9 @@ import io.swagger.model.Category;
|
|||||||
import io.swagger.model.Tag;
|
import io.swagger.model.Tag;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pet
|
* Pet
|
||||||
*/
|
*/
|
||||||
@ -77,6 +79,8 @@ public class Pet {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -95,6 +99,8 @@ public class Pet {
|
|||||||
* @return category
|
* @return category
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Category getCategory() {
|
public Category getCategory() {
|
||||||
return category;
|
return category;
|
||||||
}
|
}
|
||||||
@ -114,6 +120,8 @@ public class Pet {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(example = "doggie", required = true, value = "")
|
@ApiModelProperty(example = "doggie", required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -138,6 +146,8 @@ public class Pet {
|
|||||||
**/
|
**/
|
||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<String> getPhotoUrls() {
|
public List<String> getPhotoUrls() {
|
||||||
return photoUrls;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
@ -164,6 +174,8 @@ public class Pet {
|
|||||||
* @return tags
|
* @return tags
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public List<Tag> getTags() {
|
public List<Tag> getTags() {
|
||||||
return tags;
|
return tags;
|
||||||
}
|
}
|
||||||
@ -182,6 +194,8 @@ public class Pet {
|
|||||||
* @return status
|
* @return status
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "pet status in the store")
|
@ApiModelProperty(value = "pet status in the store")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public StatusEnum getStatus() {
|
public StatusEnum getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReadOnlyFirst
|
* ReadOnlyFirst
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class ReadOnlyFirst {
|
|||||||
* @return bar
|
* @return bar
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(readOnly = true, value = "")
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBar() {
|
public String getBar() {
|
||||||
return bar;
|
return bar;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class ReadOnlyFirst {
|
|||||||
* @return baz
|
* @return baz
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getBaz() {
|
public String getBaz() {
|
||||||
return baz;
|
return baz;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SpecialModelName
|
* SpecialModelName
|
||||||
*/
|
*/
|
||||||
@ -24,6 +26,8 @@ public class SpecialModelName {
|
|||||||
* @return specialPropertyName
|
* @return specialPropertyName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getSpecialPropertyName() {
|
public Long getSpecialPropertyName() {
|
||||||
return specialPropertyName;
|
return specialPropertyName;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag
|
* Tag
|
||||||
*/
|
*/
|
||||||
@ -27,6 +29,8 @@ public class Tag {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -45,6 +49,8 @@ public class Tag {
|
|||||||
* @return name
|
* @return name
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User
|
* User
|
||||||
*/
|
*/
|
||||||
@ -45,6 +47,8 @@ public class User {
|
|||||||
* @return id
|
* @return id
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@ -63,6 +67,8 @@ public class User {
|
|||||||
* @return username
|
* @return username
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
@ -81,6 +87,8 @@ public class User {
|
|||||||
* @return firstName
|
* @return firstName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getFirstName() {
|
public String getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
}
|
}
|
||||||
@ -99,6 +107,8 @@ public class User {
|
|||||||
* @return lastName
|
* @return lastName
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getLastName() {
|
public String getLastName() {
|
||||||
return lastName;
|
return lastName;
|
||||||
}
|
}
|
||||||
@ -117,6 +127,8 @@ public class User {
|
|||||||
* @return email
|
* @return email
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
@ -135,6 +147,8 @@ public class User {
|
|||||||
* @return password
|
* @return password
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
@ -153,6 +167,8 @@ public class User {
|
|||||||
* @return phone
|
* @return phone
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public String getPhone() {
|
public String getPhone() {
|
||||||
return phone;
|
return phone;
|
||||||
}
|
}
|
||||||
@ -171,6 +187,8 @@ public class User {
|
|||||||
* @return userStatus
|
* @return userStatus
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "User Status")
|
@ApiModelProperty(value = "User Status")
|
||||||
|
|
||||||
|
@Valid
|
||||||
public Integer getUserStatus() {
|
public Integer getUserStatus() {
|
||||||
return userStatus;
|
return userStatus;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user