[core] Update parser and core to latest version (#1569)

* Update swagger-parser to 2.0.7
* Update swagger-core to 2.0.6
This commit is contained in:
William Cheng
2018-12-17 13:56:46 +08:00
committed by Jérémie Bresson
parent c05dc24e6a
commit fb15a4baf3
12 changed files with 2105 additions and 2054 deletions

View File

@@ -19,6 +19,7 @@ import io.swagger.v3.oas.models.tags.Tag;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.LinkedHashMap;
public class SerializerUtilsTest {
@@ -44,6 +45,7 @@ public class SerializerUtilsTest {
.operationId("pingOp")
.responses(new ApiResponses().addApiResponse("200", new ApiResponse().description("Ok")))));
openAPI.components(new Components().addSchemas("SomeObject", new ObjectSchema().description("An Obj").addProperties("id", new StringSchema())));
openAPI.setExtensions(new LinkedHashMap<>()); // required because swagger-core is using HashMap instead of LinkedHashMap internally.
openAPI.addExtension("x-custom", "value1");
openAPI.addExtension("x-other", "value2");
@@ -87,8 +89,8 @@ public class SerializerUtilsTest {
" id:\n" +
" type: string\n" +
" type: object\n" +
"x-other: value2\n" +
"x-custom: value1\n";
"x-custom: value1\n" +
"x-other: value2\n";
assertEquals(content, expected);
}

View File

@@ -44,7 +44,7 @@ public class ModelUtilsTest {
public void testGetAllUsedSchemas() {
final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/unusedSchemas.yaml", null, new ParseOptions()).getOpenAPI();
List<String> allUsedSchemas = ModelUtils.getAllUsedSchemas(openAPI);
Assert.assertEquals(allUsedSchemas.size(), 30);
Assert.assertEquals(allUsedSchemas.size(), 32);
Assert.assertTrue(allUsedSchemas.contains("SomeObjShared"), "contains 'SomeObjShared'");
Assert.assertTrue(allUsedSchemas.contains("SomeObj1"), "contains 'UnusedObj1'");
@@ -76,6 +76,8 @@ public class ModelUtilsTest {
Assert.assertTrue(allUsedSchemas.contains("OtherObj20"), "contains 'OtherObj20'");
Assert.assertTrue(allUsedSchemas.contains("PingDataInput21"), "contains 'PingDataInput21'");
Assert.assertTrue(allUsedSchemas.contains("PingDataOutput21"), "contains 'PingDataOutput21'");
Assert.assertTrue(allUsedSchemas.contains("SInput22"), "contains 'SInput22'");
Assert.assertTrue(allUsedSchemas.contains("SOutput22"), "contains 'SInput22'");
}
@Test

View File

@@ -127,7 +127,7 @@
"enum": ["available", "pending", "sold"]
},
"collectionFormat": "multi",
"default": "available"
"default": ["available"]
}
],
"responses": {

View File

@@ -263,6 +263,23 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PingDataOutput21'
/some/p22:
post:
operationId: op22
parameters:
- name: callbackUrl
in: query
required: true
schema:
type: string
format: uri
example: https://some-server.com
responses:
'201':
description: OK
callbacks:
sharedCallback:
$ref: "#/components/callbacks/sharedCallback22"
components:
schemas:
UnusedObj1:
@@ -507,6 +524,20 @@ components:
type: integer
reply:
type: String
SInput22:
type: object
properties:
uuid:
type: String
request:
type: String
SOutput22:
type: object
properties:
uuid:
type: String
response:
type: String
SomeObjShared:
type: object
properties:
@@ -560,4 +591,20 @@ components:
in: query
schema:
$ref: '#/components/schemas/SomeObj11'
callbacks:
sharedCallback22:
'{$request.query.callbackUrl}/shared':
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SInput22'
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SOutput22'

View File

@@ -1341,8 +1341,8 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<swagger-parser-version>2.0.4</swagger-parser-version>
<swagger-core-version>2.0.4</swagger-core-version>
<swagger-parser-version>2.0.7</swagger-parser-version>
<swagger-core-version>2.0.6</swagger-core-version>
<scala-version>2.11.1</scala-version>
<felix-version>3.3.1</felix-version>
<commons-io-version>2.4</commons-io-version>

View File

@@ -1078,6 +1078,40 @@ paths:
- pet
components:
schemas:
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
Category:
example:
name: default-name
@@ -1128,45 +1162,72 @@ components:
type: object
xml:
name: User
OuterNumber:
type: number
ArrayOfNumberOnly:
Tag:
example:
name: name
id: 1
properties:
ArrayNumber:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: number
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
xml:
name: Pet
ApiResponse:
example:
code: 0
@@ -1181,6 +1242,23 @@ components:
message:
type: string
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
Name:
description: Model for testing model name same as property name
properties:
@@ -1201,23 +1279,6 @@ components:
type: object
xml:
name: Name
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
List:
properties:
123-list:
type: string
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
200_response:
description: Model for testing model name starting with number
properties:
@@ -1229,11 +1290,10 @@ components:
type: object
xml:
name: Name
Client:
example:
client: client
ClassModel:
description: Model for testing model with "_class" property
properties:
client:
_class:
type: string
type: object
Dog:
@@ -1243,158 +1303,29 @@ components:
breed:
type: string
type: object
Enum_Test:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
Animal:
discriminator:
propertyName: className
properties:
enum_string:
enum:
- UPPER
- lower
- ""
className:
type: string
enum_string_required:
enum:
- UPPER
- lower
- ""
color:
default: red
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- enum_string_required
type: object
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
ArrayTest:
properties:
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
- className
type: object
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
format_test:
properties:
integer:
@@ -1453,70 +1384,116 @@ components:
- number
- password
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterString:
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
ClassModel:
description: Model for testing model with "_class" property
Enum_Test:
properties:
_class:
enum_string:
enum:
- UPPER
- lower
- ""
type: string
type: object
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
Animal:
discriminator:
propertyName: className
properties:
className:
type: string
color:
default: red
enum_string_required:
enum:
- UPPER
- lower
- ""
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- className
- enum_string_required
type: object
StringBooleanMap:
additionalProperties:
type: boolean
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
List:
properties:
123-list:
type: string
type: object
Client:
example:
client: client
properties:
client:
type: string
type: object
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
MapTest:
properties:
map_map_of_string:
@@ -1541,23 +1518,108 @@ components:
type: boolean
type: object
type: object
Tag:
example:
name: name
id: 1
ArrayTest:
properties:
id:
format: int64
type: integer
name:
type: string
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
ArrayOfNumberOnly:
properties:
ArrayNumber:
items:
type: number
type: array
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
type: object
OuterNumber:
type: number
OuterString:
type: string
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
StringBooleanMap:
additionalProperties:
type: boolean
type: object
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
xml:
name: Tag
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
File:
description: Must be named `File` for test.
example:
@@ -1567,68 +1629,6 @@ components:
description: Test capitalization
type: string
type: object
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
xml:
name: Pet
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
securitySchemes:
petstore_auth:
flows:
@@ -1638,9 +1638,6 @@ components:
write:pets: modify pets in your account
read:pets: read your pets
type: oauth2
http_basic_test:
scheme: basic
type: http
api_key:
in: header
name: api_key
@@ -1649,3 +1646,6 @@ components:
in: query
name: api_key_query
type: apiKey
http_basic_test:
scheme: basic
type: http

View File

@@ -1078,6 +1078,40 @@ paths:
- pet
components:
schemas:
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
Category:
example:
name: default-name
@@ -1128,45 +1162,72 @@ components:
type: object
xml:
name: User
OuterNumber:
type: number
ArrayOfNumberOnly:
Tag:
example:
name: name
id: 1
properties:
ArrayNumber:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: number
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
xml:
name: Pet
ApiResponse:
example:
code: 0
@@ -1181,6 +1242,23 @@ components:
message:
type: string
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
Name:
description: Model for testing model name same as property name
properties:
@@ -1201,23 +1279,6 @@ components:
type: object
xml:
name: Name
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
List:
properties:
123-list:
type: string
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
200_response:
description: Model for testing model name starting with number
properties:
@@ -1229,11 +1290,10 @@ components:
type: object
xml:
name: Name
Client:
example:
client: client
ClassModel:
description: Model for testing model with "_class" property
properties:
client:
_class:
type: string
type: object
Dog:
@@ -1243,158 +1303,29 @@ components:
breed:
type: string
type: object
Enum_Test:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
Animal:
discriminator:
propertyName: className
properties:
enum_string:
enum:
- UPPER
- lower
- ""
className:
type: string
enum_string_required:
enum:
- UPPER
- lower
- ""
color:
default: red
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- enum_string_required
type: object
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
ArrayTest:
properties:
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
- className
type: object
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
format_test:
properties:
integer:
@@ -1453,70 +1384,116 @@ components:
- number
- password
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterString:
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
ClassModel:
description: Model for testing model with "_class" property
Enum_Test:
properties:
_class:
enum_string:
enum:
- UPPER
- lower
- ""
type: string
type: object
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
Animal:
discriminator:
propertyName: className
properties:
className:
type: string
color:
default: red
enum_string_required:
enum:
- UPPER
- lower
- ""
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- className
- enum_string_required
type: object
StringBooleanMap:
additionalProperties:
type: boolean
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
List:
properties:
123-list:
type: string
type: object
Client:
example:
client: client
properties:
client:
type: string
type: object
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
MapTest:
properties:
map_map_of_string:
@@ -1541,23 +1518,108 @@ components:
type: boolean
type: object
type: object
Tag:
example:
name: name
id: 1
ArrayTest:
properties:
id:
format: int64
type: integer
name:
type: string
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
ArrayOfNumberOnly:
properties:
ArrayNumber:
items:
type: number
type: array
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
type: object
OuterNumber:
type: number
OuterString:
type: string
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
StringBooleanMap:
additionalProperties:
type: boolean
type: object
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
xml:
name: Tag
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
File:
description: Must be named `File` for test.
example:
@@ -1567,68 +1629,6 @@ components:
description: Test capitalization
type: string
type: object
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
xml:
name: Pet
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
securitySchemes:
petstore_auth:
flows:
@@ -1638,9 +1638,6 @@ components:
write:pets: modify pets in your account
read:pets: read your pets
type: oauth2
http_basic_test:
scheme: basic
type: http
api_key:
in: header
name: api_key
@@ -1649,3 +1646,6 @@ components:
in: query
name: api_key_query
type: apiKey
http_basic_test:
scheme: basic
type: http

View File

@@ -1148,6 +1148,40 @@ paths:
- tag: pet
components:
schemas:
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
Category:
example:
name: default-name
@@ -1198,45 +1232,72 @@ components:
type: object
xml:
name: User
OuterNumber:
type: number
ArrayOfNumberOnly:
Tag:
example:
name: name
id: 1
properties:
ArrayNumber:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: number
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
xml:
name: Pet
ApiResponse:
example:
code: 0
@@ -1251,6 +1312,23 @@ components:
message:
type: string
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
Name:
description: Model for testing model name same as property name
properties:
@@ -1271,25 +1349,6 @@ components:
type: object
xml:
name: Name
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
List:
example:
123-list: 123-list
properties:
123-list:
type: string
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
200_response:
description: Model for testing model name starting with number
properties:
@@ -1301,11 +1360,10 @@ components:
type: object
xml:
name: Name
Client:
example:
client: client
ClassModel:
description: Model for testing model with "_class" property
properties:
client:
_class:
type: string
type: object
Dog:
@@ -1315,158 +1373,29 @@ components:
breed:
type: string
type: object
Enum_Test:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
Animal:
discriminator:
propertyName: className
properties:
enum_string:
enum:
- UPPER
- lower
- ""
className:
type: string
enum_string_required:
enum:
- UPPER
- lower
- ""
color:
default: red
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- enum_string_required
type: object
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
ArrayTest:
properties:
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
- className
type: object
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
format_test:
properties:
integer:
@@ -1525,70 +1454,118 @@ components:
- number
- password
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterString:
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
ClassModel:
description: Model for testing model with "_class" property
Enum_Test:
properties:
_class:
enum_string:
enum:
- UPPER
- lower
- ""
type: string
type: object
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
Animal:
discriminator:
propertyName: className
properties:
className:
type: string
color:
default: red
enum_string_required:
enum:
- UPPER
- lower
- ""
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- className
- enum_string_required
type: object
StringBooleanMap:
additionalProperties:
type: boolean
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
List:
example:
123-list: 123-list
properties:
123-list:
type: string
type: object
Client:
example:
client: client
properties:
client:
type: string
type: object
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
MapTest:
properties:
map_map_of_string:
@@ -1613,23 +1590,108 @@ components:
type: boolean
type: object
type: object
Tag:
example:
name: name
id: 1
ArrayTest:
properties:
id:
format: int64
type: integer
name:
type: string
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
ArrayOfNumberOnly:
properties:
ArrayNumber:
items:
type: number
type: array
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
type: object
OuterNumber:
type: number
OuterString:
type: string
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
StringBooleanMap:
additionalProperties:
type: boolean
type: object
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
xml:
name: Tag
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
File:
description: Must be named `File` for test.
example:
@@ -1639,68 +1701,6 @@ components:
description: Test capitalization
type: string
type: object
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
xml:
name: Pet
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
securitySchemes:
petstore_auth:
flows:
@@ -1710,9 +1710,6 @@ components:
write:pets: modify pets in your account
read:pets: read your pets
type: oauth2
http_basic_test:
scheme: basic
type: http
api_key:
in: header
name: api_key
@@ -1721,3 +1718,6 @@ components:
in: query
name: api_key_query
type: apiKey
http_basic_test:
scheme: basic
type: http

View File

@@ -1148,6 +1148,40 @@ paths:
- tag: pet
components:
schemas:
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
Category:
example:
name: default-name
@@ -1198,45 +1232,72 @@ components:
type: object
xml:
name: User
OuterNumber:
type: number
ArrayOfNumberOnly:
Tag:
example:
name: name
id: 1
properties:
ArrayNumber:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: number
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
xml:
name: Pet
ApiResponse:
example:
code: 0
@@ -1251,6 +1312,23 @@ components:
message:
type: string
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
Name:
description: Model for testing model name same as property name
properties:
@@ -1271,25 +1349,6 @@ components:
type: object
xml:
name: Name
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
List:
example:
123-list: 123-list
properties:
123-list:
type: string
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
200_response:
description: Model for testing model name starting with number
properties:
@@ -1301,11 +1360,10 @@ components:
type: object
xml:
name: Name
Client:
example:
client: client
ClassModel:
description: Model for testing model with "_class" property
properties:
client:
_class:
type: string
type: object
Dog:
@@ -1315,158 +1373,29 @@ components:
breed:
type: string
type: object
Enum_Test:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
Animal:
discriminator:
propertyName: className
properties:
enum_string:
enum:
- UPPER
- lower
- ""
className:
type: string
enum_string_required:
enum:
- UPPER
- lower
- ""
color:
default: red
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- enum_string_required
type: object
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
ArrayTest:
properties:
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
- className
type: object
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
format_test:
properties:
integer:
@@ -1525,70 +1454,118 @@ components:
- number
- password
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterString:
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
ClassModel:
description: Model for testing model with "_class" property
Enum_Test:
properties:
_class:
enum_string:
enum:
- UPPER
- lower
- ""
type: string
type: object
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
Animal:
discriminator:
propertyName: className
properties:
className:
type: string
color:
default: red
enum_string_required:
enum:
- UPPER
- lower
- ""
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- className
- enum_string_required
type: object
StringBooleanMap:
additionalProperties:
type: boolean
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
List:
example:
123-list: 123-list
properties:
123-list:
type: string
type: object
Client:
example:
client: client
properties:
client:
type: string
type: object
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
MapTest:
properties:
map_map_of_string:
@@ -1613,23 +1590,108 @@ components:
type: boolean
type: object
type: object
Tag:
example:
name: name
id: 1
ArrayTest:
properties:
id:
format: int64
type: integer
name:
type: string
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
ArrayOfNumberOnly:
properties:
ArrayNumber:
items:
type: number
type: array
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
type: object
OuterNumber:
type: number
OuterString:
type: string
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
StringBooleanMap:
additionalProperties:
type: boolean
type: object
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
xml:
name: Tag
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
File:
description: Must be named `File` for test.
example:
@@ -1639,68 +1701,6 @@ components:
description: Test capitalization
type: string
type: object
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
xml:
name: Pet
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
securitySchemes:
petstore_auth:
flows:
@@ -1710,9 +1710,6 @@ components:
write:pets: modify pets in your account
read:pets: read your pets
type: oauth2
http_basic_test:
scheme: basic
type: http
api_key:
in: header
name: api_key
@@ -1721,3 +1718,6 @@ components:
in: query
name: api_key_query
type: apiKey
http_basic_test:
scheme: basic
type: http

View File

@@ -966,6 +966,40 @@ paths:
- $another-fake?
components:
schemas:
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
Category:
example:
name: name
@@ -1013,45 +1047,72 @@ components:
type: object
xml:
name: User
OuterNumber:
type: number
ArrayOfNumberOnly:
Tag:
example:
name: name
id: 1
properties:
ArrayNumber:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: number
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
xml:
name: Pet
ApiResponse:
example:
code: 0
@@ -1066,6 +1127,23 @@ components:
message:
type: string
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
Name:
description: Model for testing model name same as property name
properties:
@@ -1086,23 +1164,6 @@ components:
type: object
xml:
name: Name
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
List:
properties:
123-list:
type: string
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
200_response:
description: Model for testing model name starting with number
properties:
@@ -1114,11 +1175,10 @@ components:
type: object
xml:
name: Name
Client:
example:
client: client
ClassModel:
description: Model for testing model with "_class" property
properties:
client:
_class:
type: string
type: object
Dog:
@@ -1128,165 +1188,29 @@ components:
breed:
type: string
type: object
Enum_Test:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
Animal:
discriminator:
propertyName: className
properties:
enum_string:
enum:
- UPPER
- lower
- ""
className:
type: string
enum_string_required:
enum:
- UPPER
- lower
- ""
color:
default: red
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- enum_string_required
type: object
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
ArrayTest:
properties:
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
array_of_enum:
items:
enum:
- UPPER
- lower
type: string
type: array
type: object
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
- className
type: object
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
format_test:
properties:
integer:
@@ -1345,60 +1269,116 @@ components:
- number
- password
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
array_array_enum:
items:
items:
enum:
- Cat
- Dog
type: string
type: array
type: array
type: object
OuterString:
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
ClassModel:
description: Model for testing model with "_class" property
Enum_Test:
properties:
_class:
enum_string:
enum:
- UPPER
- lower
- ""
type: string
type: object
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
Animal:
discriminator:
propertyName: className
properties:
className:
type: string
color:
default: red
enum_string_required:
enum:
- UPPER
- lower
- ""
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- className
- enum_string_required
type: object
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
List:
properties:
123-list:
type: string
type: object
Client:
example:
client: client
properties:
client:
type: string
type: object
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
MapTest:
properties:
map_map_of_string:
@@ -1424,85 +1404,105 @@ components:
type: string
type: object
type: object
Tag:
example:
name: name
id: 1
ArrayTest:
properties:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
array_of_string:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
array_array_of_integer:
items:
$ref: '#/components/schemas/Tag'
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
array_of_enum:
items:
enum:
- UPPER
- lower
type: string
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
xml:
name: Pet
hasOnlyReadOnly:
NumberOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
JustNumber:
type: number
type: object
ArrayOfNumberOnly:
properties:
ArrayNumber:
items:
type: number
type: array
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
array_array_enum:
items:
items:
enum:
- Cat
- Dog
type: string
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
type: object
OuterNumber:
type: number
OuterString:
type: string
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
securitySchemes:
petstore_auth:
flows:
@@ -1512,9 +1512,6 @@ components:
write:pets: modify pets in your account
read:pets: read your pets
type: oauth2
http_basic_test:
scheme: basic
type: http
api_key:
in: header
name: api_key
@@ -1523,4 +1520,7 @@ components:
in: query
name: api_key_query
type: apiKey
http_basic_test:
scheme: basic
type: http

View File

@@ -96,6 +96,17 @@ components:
description: An additionalPropertiesObject
example: foo
type: object
aNullableContainer:
properties:
NullableThing:
nullable: true
type: string
RequiredNullableThing:
nullable: true
type: string
required:
- RequiredNullableThing
type: object
ObjectOfObjects:
description: An object of objects
properties:
@@ -119,15 +130,4 @@ components:
type: string
required:
- required_thing
aNullableContainer:
properties:
NullableThing:
nullable: true
type: string
RequiredNullableThing:
nullable: true
type: string
required:
- RequiredNullableThing
type: object

View File

@@ -1206,6 +1206,40 @@ paths:
- tag: pet
components:
schemas:
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
Category:
example:
name: default-name
@@ -1256,45 +1290,72 @@ components:
type: object
xml:
name: User
OuterNumber:
type: number
ArrayOfNumberOnly:
Tag:
example:
name: name
id: 1
properties:
ArrayNumber:
id:
format: int64
type: integer
name:
type: string
type: object
xml:
name: Tag
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: number
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
xml:
name: Pet
ApiResponse:
example:
code: 0
@@ -1309,6 +1370,23 @@ components:
message:
type: string
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
Name:
description: Model for testing model name same as property name
properties:
@@ -1329,25 +1407,6 @@ components:
type: object
xml:
name: Name
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
List:
example:
123-list: 123-list
properties:
123-list:
type: string
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
200_response:
description: Model for testing model name starting with number
properties:
@@ -1359,11 +1418,10 @@ components:
type: object
xml:
name: Name
Client:
example:
client: client
ClassModel:
description: Model for testing model with "_class" property
properties:
client:
_class:
type: string
type: object
Dog:
@@ -1373,158 +1431,29 @@ components:
breed:
type: string
type: object
Enum_Test:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
Animal:
discriminator:
propertyName: className
properties:
enum_string:
enum:
- UPPER
- lower
- ""
className:
type: string
enum_string_required:
enum:
- UPPER
- lower
- ""
color:
default: red
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- enum_string_required
type: object
Order:
example:
petId: 6
quantity: 1
id: 0
shipDate: 2000-01-23T04:56:07.000+00:00
complete: false
status: placed
properties:
id:
format: int64
type: integer
petId:
format: int64
type: integer
quantity:
format: int32
type: integer
shipDate:
format: date-time
type: string
status:
description: Order Status
enum:
- placed
- approved
- delivered
type: string
complete:
default: false
type: boolean
type: object
xml:
name: Order
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
$special[model.name]:
properties:
$special[property.name]:
format: int64
type: integer
type: object
xml:
name: $special[model.name]
Return:
description: Model for testing reserved words
properties:
return:
format: int32
type: integer
type: object
xml:
name: Return
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
ArrayTest:
properties:
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
- className
type: object
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
format_test:
properties:
integer:
@@ -1583,70 +1512,118 @@ components:
- number
- password
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterString:
EnumClass:
default: -efg
enum:
- _abc
- -efg
- (xyz)
type: string
ClassModel:
description: Model for testing model with "_class" property
Enum_Test:
properties:
_class:
enum_string:
enum:
- UPPER
- lower
- ""
type: string
type: object
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
Animal:
discriminator:
propertyName: className
properties:
className:
type: string
color:
default: red
enum_string_required:
enum:
- UPPER
- lower
- ""
type: string
enum_integer:
enum:
- 1
- -1
format: int32
type: integer
enum_number:
enum:
- 1.1
- -1.2
format: double
type: number
outerEnum:
$ref: '#/components/schemas/OuterEnum'
required:
- className
- enum_string_required
type: object
StringBooleanMap:
additionalProperties:
type: boolean
AdditionalPropertiesClass:
properties:
map_property:
additionalProperties:
type: string
type: object
map_of_map_property:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
type: object
MixedPropertiesAndAdditionalPropertiesClass:
properties:
uuid:
format: uuid
type: string
dateTime:
format: date-time
type: string
map:
additionalProperties:
$ref: '#/components/schemas/Animal'
type: object
type: object
List:
example:
123-list: 123-list
properties:
123-list:
type: string
type: object
Client:
example:
client: client
properties:
client:
type: string
type: object
ReadOnlyFirst:
properties:
bar:
readOnly: true
type: string
baz:
type: string
type: object
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
Capitalization:
properties:
smallCamel:
type: string
CapitalCamel:
type: string
small_Snake:
type: string
Capital_Snake:
type: string
SCA_ETH_Flow_Points:
type: string
ATT_NAME:
description: |
Name of the pet
type: string
type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- properties:
declawed:
type: boolean
type: object
MapTest:
properties:
map_map_of_string:
@@ -1671,23 +1648,108 @@ components:
type: boolean
type: object
type: object
Tag:
example:
name: name
id: 1
ArrayTest:
properties:
id:
format: int64
type: integer
name:
type: string
array_of_string:
items:
type: string
type: array
array_array_of_integer:
items:
items:
format: int64
type: integer
type: array
type: array
array_array_of_model:
items:
items:
$ref: '#/components/schemas/ReadOnlyFirst'
type: array
type: array
type: object
NumberOnly:
properties:
JustNumber:
type: number
type: object
ArrayOfNumberOnly:
properties:
ArrayNumber:
items:
type: number
type: array
type: object
ArrayOfArrayOfNumberOnly:
properties:
ArrayArrayNumber:
items:
items:
type: number
type: array
type: array
type: object
EnumArrays:
properties:
just_symbol:
enum:
- '>='
- $
type: string
array_enum:
items:
enum:
- fish
- crab
type: string
type: array
type: object
OuterEnum:
enum:
- placed
- approved
- delivered
type: string
OuterComposite:
example:
my_string: my_string
my_number: 0.80082819046101150206595775671303272247314453125
my_boolean: true
properties:
my_number:
type: number
my_string:
type: string
my_boolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
type: object
OuterNumber:
type: number
OuterString:
type: string
OuterBoolean:
type: boolean
x-codegen-body-parameter-name: boolean_post_body
StringBooleanMap:
additionalProperties:
type: boolean
type: object
FileSchemaTestClass:
example:
file:
sourceURI: sourceURI
files:
- sourceURI: sourceURI
- sourceURI: sourceURI
properties:
file:
$ref: '#/components/schemas/File'
files:
items:
$ref: '#/components/schemas/File'
type: array
type: object
xml:
name: Tag
AnimalFarm:
items:
$ref: '#/components/schemas/Animal'
type: array
File:
description: Must be named `File` for test.
example:
@@ -1697,68 +1759,6 @@ components:
description: Test capitalization
type: string
type: object
Pet:
example:
photoUrls:
- photoUrls
- photoUrls
name: doggie
id: 0
category:
name: default-name
id: 6
tags:
- name: name
id: 1
- name: name
id: 1
status: available
properties:
id:
format: int64
type: integer
x-is-unique: true
category:
$ref: '#/components/schemas/Category'
name:
example: doggie
type: string
photoUrls:
items:
type: string
type: array
xml:
name: photoUrl
wrapped: true
tags:
items:
$ref: '#/components/schemas/Tag'
type: array
xml:
name: tag
wrapped: true
status:
description: pet status in the store
enum:
- available
- pending
- sold
type: string
required:
- name
- photoUrls
type: object
xml:
name: Pet
hasOnlyReadOnly:
properties:
bar:
readOnly: true
type: string
foo:
readOnly: true
type: string
type: object
securitySchemes:
petstore_auth:
flows:
@@ -1768,9 +1768,6 @@ components:
write:pets: modify pets in your account
read:pets: read your pets
type: oauth2
http_basic_test:
scheme: basic
type: http
api_key:
in: header
name: api_key
@@ -1779,3 +1776,6 @@ components:
in: query
name: api_key_query
type: apiKey
http_basic_test:
scheme: basic
type: http