@api-client/core 0.6.13 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +9 -2
- package/build/browser.js +12 -2
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +9 -2
- package/build/index.js +12 -2
- package/build/index.js.map +1 -1
- package/build/src/amf/AmfMixin.d.ts +395 -0
- package/build/src/amf/AmfMixin.js +1146 -0
- package/build/src/amf/AmfMixin.js.map +1 -0
- package/build/src/amf/AmfSerializer.d.ts +136 -0
- package/build/src/amf/AmfSerializer.js +1913 -0
- package/build/src/amf/AmfSerializer.js.map +1 -0
- package/build/src/amf/AmfShapeGenerator.d.ts +85 -0
- package/build/src/amf/AmfShapeGenerator.js +385 -0
- package/build/src/amf/AmfShapeGenerator.js.map +1 -0
- package/build/src/amf/AmfTypes.d.ts +24 -0
- package/build/src/amf/AmfTypes.js +122 -0
- package/build/src/amf/AmfTypes.js.map +1 -0
- package/build/src/amf/ApiExampleGenerator.d.ts +36 -0
- package/build/src/amf/ApiExampleGenerator.js +109 -0
- package/build/src/amf/ApiExampleGenerator.js.map +1 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.d.ts +67 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.js +243 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.js.map +1 -0
- package/build/src/amf/ApiSchemaGenerator.d.ts +55 -0
- package/build/src/amf/ApiSchemaGenerator.js +94 -0
- package/build/src/amf/ApiSchemaGenerator.js.map +1 -0
- package/build/src/amf/ApiSchemaValues.d.ts +98 -0
- package/build/src/amf/ApiSchemaValues.js +382 -0
- package/build/src/amf/ApiSchemaValues.js.map +1 -0
- package/build/src/amf/Utils.d.ts +41 -0
- package/build/src/amf/Utils.js +176 -0
- package/build/src/amf/Utils.js.map +1 -0
- package/build/src/amf/data-node/DataNodeBase.d.ts +31 -0
- package/build/src/amf/data-node/DataNodeBase.js +77 -0
- package/build/src/amf/data-node/DataNodeBase.js.map +1 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts +15 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.js +24 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.js.map +1 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts +13 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js +42 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js.map +1 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts +21 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.js +30 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +1 -0
- package/build/src/amf/definitions/Amf.d.ts +362 -0
- package/build/src/amf/definitions/Amf.js +2 -0
- package/build/src/amf/definitions/Amf.js.map +1 -0
- package/build/src/amf/definitions/Api.d.ts +381 -0
- package/build/src/amf/definitions/Api.js +2 -0
- package/build/src/amf/definitions/Api.js.map +1 -0
- package/build/src/amf/definitions/Base.d.ts +11 -0
- package/build/src/amf/definitions/Base.js +2 -0
- package/build/src/amf/definitions/Base.js.map +1 -0
- package/build/src/amf/definitions/Namespace.d.ts +311 -0
- package/build/src/amf/definitions/Namespace.js +330 -0
- package/build/src/amf/definitions/Namespace.js.map +1 -0
- package/build/src/amf/definitions/Shapes.d.ts +309 -0
- package/build/src/amf/definitions/Shapes.js +87 -0
- package/build/src/amf/definitions/Shapes.js.map +1 -0
- package/build/src/amf/models/AmfDataNode.d.ts +68 -0
- package/build/src/amf/models/AmfDataNode.js +188 -0
- package/build/src/amf/models/AmfDataNode.js.map +1 -0
- package/build/src/amf/shape/ShapeBase.d.ts +75 -0
- package/build/src/amf/shape/ShapeBase.js +90 -0
- package/build/src/amf/shape/ShapeBase.js.map +1 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts +46 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +406 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +1 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +84 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +820 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -0
- package/build/src/models/Thing.d.ts +17 -0
- package/build/src/models/Thing.js +19 -1
- package/build/src/models/Thing.js.map +1 -1
- package/build/src/models/data/Bindings.d.ts +161 -0
- package/build/src/models/data/Bindings.js +2 -0
- package/build/src/models/data/Bindings.js.map +1 -0
- package/build/src/models/data/DataAssociation.d.ts +135 -14
- package/build/src/models/data/DataAssociation.js +154 -21
- package/build/src/models/data/DataAssociation.js.map +1 -1
- package/build/src/models/data/DataAssociationSchema.d.ts +36 -0
- package/build/src/models/data/DataEntity.d.ts +76 -4
- package/build/src/models/data/DataEntity.js +136 -9
- package/build/src/models/data/DataEntity.js.map +1 -1
- package/build/src/models/data/DataFile.d.ts +3 -0
- package/build/src/models/data/DataFile.js +3 -0
- package/build/src/models/data/DataFile.js.map +1 -1
- package/build/src/models/data/DataModel.d.ts +1 -1
- package/build/src/models/data/DataModel.js.map +1 -1
- package/build/src/models/data/DataNamespace.d.ts +6 -0
- package/build/src/models/data/DataNamespace.js +11 -1
- package/build/src/models/data/DataNamespace.js.map +1 -1
- package/build/src/models/data/DataProperty.d.ts +131 -36
- package/build/src/models/data/DataProperty.js +200 -17
- package/build/src/models/data/DataProperty.js.map +1 -1
- package/data/apis/oas-date/oas-date.yaml +28 -0
- package/data/apis/oas-types/oas-types.yaml +159 -0
- package/data/apis/oas-unions/oas-unions.yaml +75 -0
- package/data/apis/raml-date/raml-date.raml +28 -0
- package/data/apis/recursive/recursive.raml +14 -0
- package/data/apis/schema-api/examples/person.json +14 -0
- package/data/apis/schema-api/examples/person.raml +14 -0
- package/data/apis/schema-api/examples/person.url.encoded +1 -0
- package/data/apis/schema-api/examples/person.xml +14 -0
- package/data/apis/schema-api/library/demo-types.raml +43 -0
- package/data/apis/schema-api/schema-api.raml +644 -0
- package/data/apis/schema-api/schemas/person.json +104 -0
- package/data/apis/schema-api/schemas/person.xsd +26 -0
- package/data/apis/schema-api/types/DemoPerson.raml +67 -0
- package/data/model.js +106 -0
- package/data/models/oas-date.json +637 -0
- package/data/models/oas-types.json +5352 -0
- package/data/models/oas-unions.json +1881 -0
- package/data/models/raml-date.json +1096 -0
- package/data/models/recursive.json +610 -0
- package/data/models/schema-api.json +37319 -0
- package/package.json +9 -6
- package/src/amf/AmfMixin.ts +1623 -0
- package/src/amf/AmfSerializer.ts +2028 -0
- package/src/amf/AmfShapeGenerator.ts +400 -0
- package/src/amf/AmfTypes.ts +126 -0
- package/src/amf/ApiExampleGenerator.ts +112 -0
- package/src/amf/ApiMonacoSchemaGenerator.ts +296 -0
- package/src/amf/ApiSchemaGenerator.ts +108 -0
- package/src/amf/ApiSchemaValues.ts +411 -0
- package/src/amf/Utils.ts +182 -0
- package/src/amf/data-node/DataNodeBase.ts +81 -0
- package/src/amf/data-node/JsonDataNodeGenerator.ts +26 -0
- package/src/amf/data-node/README.md +3 -0
- package/src/amf/data-node/UrlEncodedDataNodeGenerator.ts +43 -0
- package/src/amf/data-node/XmlDataNodeGenerator.ts +38 -0
- package/src/amf/definitions/Amf.ts +443 -0
- package/src/amf/definitions/Api.ts +427 -0
- package/src/amf/definitions/Base.ts +13 -0
- package/src/amf/definitions/Namespace.ts +341 -0
- package/src/amf/definitions/Shapes.ts +414 -0
- package/src/amf/models/AmfDataNode.ts +200 -0
- package/src/amf/shape/README.md +4 -0
- package/src/amf/shape/ShapeBase.ts +160 -0
- package/src/amf/shape/ShapeJsonSchemaGenerator.ts +422 -0
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +876 -0
- package/src/models/Thing.ts +25 -1
- package/src/models/data/Bindings.ts +186 -0
- package/src/models/data/DataAssociation.ts +226 -29
- package/src/models/data/DataAssociationSchema.ts +38 -0
- package/src/models/data/DataEntity.ts +170 -13
- package/src/models/data/DataFile.ts +3 -0
- package/src/models/data/DataModel.ts +1 -1
- package/src/models/data/DataNamespace.ts +16 -1
- package/src/models/data/DataProperty.ts +250 -47
- package/build/src/models/data/DataPropertySchema.d.ts +0 -125
- package/build/src/models/data/DataPropertySchema.js +0 -33
- package/build/src/models/data/DataPropertySchema.js.map +0 -1
- package/src/models/data/DataPropertySchema.ts +0 -156
|
@@ -0,0 +1 @@
|
|
|
1
|
+
id=R34fg663H9KW9MMSKISI&name=Pawel%20Psztyc&birthday=1983-10-20&gender=male&url=https%3A%2F%2Fdomain.com%2Fprofile%2Fpawel.psztyc&tagline=Some%20text%20about%20me.&language=en_GB&etag=W\244m4n5kj3gbn2nj4k4n4
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<resource error="false" type="AppPerson">
|
|
3
|
+
<id>Qawer63J73HJ6khjswuqyq62382jG21s</id>
|
|
4
|
+
<name>John Smith</name>
|
|
5
|
+
<birthday>1990-10-12</birthday>
|
|
6
|
+
<gender>male</gender>
|
|
7
|
+
<url>https://www.domain.com/people/Qawer63J73HJ6khjswuqyq62382jG21s</url>
|
|
8
|
+
<image>
|
|
9
|
+
<url>https://www.domain.com/people/Qawer63J73HJ6khjswuqyq62382jG21s/image</url>
|
|
10
|
+
<thumb>https://www.domain.com/people/Qawer63J73HJ6khjswuqyq62382jG21s/image/thumb</thumb>
|
|
11
|
+
</image>
|
|
12
|
+
<tagline>Hi, I'm John!</tagline>
|
|
13
|
+
<language>en_US</language>
|
|
14
|
+
</resource>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#%RAML 1.0 Library
|
|
2
|
+
|
|
3
|
+
types:
|
|
4
|
+
BaseResource:
|
|
5
|
+
description: |
|
|
6
|
+
API resource.
|
|
7
|
+
type: object
|
|
8
|
+
properties:
|
|
9
|
+
etag:
|
|
10
|
+
type: string
|
|
11
|
+
description: |
|
|
12
|
+
ETag of this resource for caching purposes.
|
|
13
|
+
__This property will be ignored when creating an object.__
|
|
14
|
+
Pet:
|
|
15
|
+
type: BaseResource
|
|
16
|
+
properties:
|
|
17
|
+
type:
|
|
18
|
+
type: string
|
|
19
|
+
description: The object type for child classes.
|
|
20
|
+
name:
|
|
21
|
+
type: string
|
|
22
|
+
description: The name of the pet.
|
|
23
|
+
sound:
|
|
24
|
+
type: string
|
|
25
|
+
description: The sound it makes.
|
|
26
|
+
discriminatorValue: type
|
|
27
|
+
Dog:
|
|
28
|
+
type: Pet
|
|
29
|
+
properties:
|
|
30
|
+
type:
|
|
31
|
+
default: Dog
|
|
32
|
+
sound:
|
|
33
|
+
default: Woof
|
|
34
|
+
friendly: boolean
|
|
35
|
+
Cat:
|
|
36
|
+
type: Pet
|
|
37
|
+
properties:
|
|
38
|
+
type:
|
|
39
|
+
default: Cat
|
|
40
|
+
Mamal:
|
|
41
|
+
type: object
|
|
42
|
+
properties:
|
|
43
|
+
birthDate: date-only
|
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
title: API body demo
|
|
3
|
+
version: v1
|
|
4
|
+
baseUri: http://api.domain.com/
|
|
5
|
+
|
|
6
|
+
uses:
|
|
7
|
+
ExampleType: library/demo-types.raml
|
|
8
|
+
|
|
9
|
+
types:
|
|
10
|
+
ScalarType:
|
|
11
|
+
type: string
|
|
12
|
+
description: A description.
|
|
13
|
+
displayName: Scalar type
|
|
14
|
+
ScalarWithTraits:
|
|
15
|
+
type: string
|
|
16
|
+
description: ScalarWithTraits description.
|
|
17
|
+
displayName: Scalar traits
|
|
18
|
+
default: test
|
|
19
|
+
example: other
|
|
20
|
+
pattern: "[a-zA-Z]*"
|
|
21
|
+
maxLength: 15
|
|
22
|
+
minLength: 3
|
|
23
|
+
enum:
|
|
24
|
+
- test
|
|
25
|
+
- other
|
|
26
|
+
- another
|
|
27
|
+
ScalarWithParent:
|
|
28
|
+
type: ScalarWithTraits
|
|
29
|
+
pattern: "[a-zA-Z0-9]*"
|
|
30
|
+
ScalarWithExample:
|
|
31
|
+
type: string
|
|
32
|
+
example: A string
|
|
33
|
+
ScalarWithEnum:
|
|
34
|
+
type: string
|
|
35
|
+
enum:
|
|
36
|
+
- A
|
|
37
|
+
- B
|
|
38
|
+
- C
|
|
39
|
+
SimpleObject:
|
|
40
|
+
type: object
|
|
41
|
+
minProperties: 1
|
|
42
|
+
maxProperties: 20
|
|
43
|
+
additionalProperties: true
|
|
44
|
+
description: A simple object
|
|
45
|
+
displayName: Simple object
|
|
46
|
+
properties:
|
|
47
|
+
id: string
|
|
48
|
+
name:
|
|
49
|
+
type: string
|
|
50
|
+
displayName: Name
|
|
51
|
+
example: Pawel Uchida-Psztyc
|
|
52
|
+
age?:
|
|
53
|
+
type: integer
|
|
54
|
+
example: 21
|
|
55
|
+
description: Optional person age.
|
|
56
|
+
minimum: 18
|
|
57
|
+
sex:
|
|
58
|
+
type: string
|
|
59
|
+
enum:
|
|
60
|
+
- male
|
|
61
|
+
- female
|
|
62
|
+
description: An example of an enum.
|
|
63
|
+
newsletter:
|
|
64
|
+
type: boolean
|
|
65
|
+
required: false
|
|
66
|
+
description: Whether the user wants to be added to the newsletter
|
|
67
|
+
tosAccepted:
|
|
68
|
+
type: boolean
|
|
69
|
+
default: false
|
|
70
|
+
description: Whether terms of service is accepted by the user.
|
|
71
|
+
ObjectWithParent:
|
|
72
|
+
type: SimpleObject
|
|
73
|
+
properties:
|
|
74
|
+
addedProperty:
|
|
75
|
+
type: time-only
|
|
76
|
+
age:
|
|
77
|
+
type: integer
|
|
78
|
+
required: true
|
|
79
|
+
example: 25
|
|
80
|
+
description: Age is not optional anymore.
|
|
81
|
+
ObjectWithArray:
|
|
82
|
+
type: object
|
|
83
|
+
properties:
|
|
84
|
+
tags:
|
|
85
|
+
type: string[]
|
|
86
|
+
description: These are tags
|
|
87
|
+
exampleValue:
|
|
88
|
+
type: number[]
|
|
89
|
+
example: 123
|
|
90
|
+
examplesValue:
|
|
91
|
+
type: string[]
|
|
92
|
+
examples:
|
|
93
|
+
named1: value 1
|
|
94
|
+
named2: value 2
|
|
95
|
+
defaultValue:
|
|
96
|
+
type: string[]
|
|
97
|
+
default: [A tag]
|
|
98
|
+
optionalValue:
|
|
99
|
+
type: object[]
|
|
100
|
+
required: false
|
|
101
|
+
ObjectWithArrayObject:
|
|
102
|
+
type: array
|
|
103
|
+
items: SimpleObject
|
|
104
|
+
description: Items that are another object.
|
|
105
|
+
ScalarUnion:
|
|
106
|
+
type: string | number
|
|
107
|
+
ScalarUnionDefaultNumber:
|
|
108
|
+
type: string | number
|
|
109
|
+
default: 123456
|
|
110
|
+
ScalarUnionDefaultString:
|
|
111
|
+
type: string | number
|
|
112
|
+
default: abc123
|
|
113
|
+
ScalarUnionDefaultBoolean:
|
|
114
|
+
type: string | boolean
|
|
115
|
+
default: true
|
|
116
|
+
ScalarUnionDefaultBoolean2:
|
|
117
|
+
type: string | boolean
|
|
118
|
+
default: false
|
|
119
|
+
ScalarUnionDefaultNil:
|
|
120
|
+
type: string | nil
|
|
121
|
+
default: null
|
|
122
|
+
ScalarUnionExampleNumber:
|
|
123
|
+
type: string | number
|
|
124
|
+
example: 987654
|
|
125
|
+
ScalarUnionExampleString:
|
|
126
|
+
type: string | number
|
|
127
|
+
example: 098poi
|
|
128
|
+
ScalarObjectUnion:
|
|
129
|
+
type: string | SimpleObject
|
|
130
|
+
ScalarObjectUnionExample:
|
|
131
|
+
type: string | SimpleObject
|
|
132
|
+
example:
|
|
133
|
+
id: 128a654bc54d898e43f
|
|
134
|
+
name: Pawel Uchida-Psztyc
|
|
135
|
+
age: 30
|
|
136
|
+
sex: male
|
|
137
|
+
newsletter: false
|
|
138
|
+
tosAccepted: true
|
|
139
|
+
ObjectUnions:
|
|
140
|
+
type: SimpleObject | ObjectWithParent
|
|
141
|
+
ObjectWithExample:
|
|
142
|
+
type: object
|
|
143
|
+
properties:
|
|
144
|
+
error: boolean
|
|
145
|
+
message: string
|
|
146
|
+
optional?: number
|
|
147
|
+
example:
|
|
148
|
+
error: true
|
|
149
|
+
message: Error message
|
|
150
|
+
ObjectUnionWithExample:
|
|
151
|
+
type: ObjectWithExample | ObjectWithParent
|
|
152
|
+
ObjectScalarUnionNill:
|
|
153
|
+
type: object
|
|
154
|
+
properties:
|
|
155
|
+
name: string | nil
|
|
156
|
+
UnionNill:
|
|
157
|
+
type: Address | nil
|
|
158
|
+
Parent:
|
|
159
|
+
type: object
|
|
160
|
+
properties:
|
|
161
|
+
id: string
|
|
162
|
+
ChildLvl1:
|
|
163
|
+
type: Parent
|
|
164
|
+
properties:
|
|
165
|
+
ch1: boolean
|
|
166
|
+
ChildLvl2:
|
|
167
|
+
type: ChildLvl1
|
|
168
|
+
properties:
|
|
169
|
+
ch2: string
|
|
170
|
+
FileShape:
|
|
171
|
+
type: file
|
|
172
|
+
fileTypes:
|
|
173
|
+
- application/*
|
|
174
|
+
maxLength: 100
|
|
175
|
+
Address:
|
|
176
|
+
properties:
|
|
177
|
+
street: string
|
|
178
|
+
city: string
|
|
179
|
+
XmlSimpleArray:
|
|
180
|
+
# <XmlSimpleArray>
|
|
181
|
+
# <books>one</books>
|
|
182
|
+
# <books>two</books>
|
|
183
|
+
# <books>three</books>
|
|
184
|
+
# </XmlSimpleArray>
|
|
185
|
+
properties:
|
|
186
|
+
books:
|
|
187
|
+
type: array
|
|
188
|
+
items: string
|
|
189
|
+
example: [one, two, three]
|
|
190
|
+
XmlSimpleArrayWrapped:
|
|
191
|
+
# <XmlSimpleArrayWrapped>
|
|
192
|
+
# <books>
|
|
193
|
+
# <books>one</books>
|
|
194
|
+
# <books>two</books>
|
|
195
|
+
# <books>three</books>
|
|
196
|
+
# </books>
|
|
197
|
+
# </XmlSimpleArrayWrapped>
|
|
198
|
+
properties:
|
|
199
|
+
books:
|
|
200
|
+
type: array
|
|
201
|
+
items: string
|
|
202
|
+
example: [one, two, three]
|
|
203
|
+
xml:
|
|
204
|
+
wrapped: true
|
|
205
|
+
XmlSimpleArrayWrappedNamed:
|
|
206
|
+
# <XmlSimpleArrayWrapped>
|
|
207
|
+
# <books-array>
|
|
208
|
+
# <books>one</books>
|
|
209
|
+
# <books>two</books>
|
|
210
|
+
# <books>three</books>
|
|
211
|
+
# </books-array>
|
|
212
|
+
# </XmlSimpleArrayWrapped>
|
|
213
|
+
properties:
|
|
214
|
+
books:
|
|
215
|
+
type: array
|
|
216
|
+
items: string
|
|
217
|
+
example: [one, two, three]
|
|
218
|
+
xml:
|
|
219
|
+
wrapped: true
|
|
220
|
+
name: books-array
|
|
221
|
+
XmlAttributes:
|
|
222
|
+
type: object
|
|
223
|
+
properties:
|
|
224
|
+
id:
|
|
225
|
+
type: string
|
|
226
|
+
xml:
|
|
227
|
+
attribute: true
|
|
228
|
+
name: "uuid"
|
|
229
|
+
notNamedId:
|
|
230
|
+
type: string
|
|
231
|
+
xml:
|
|
232
|
+
attribute: true
|
|
233
|
+
attributeWithExample:
|
|
234
|
+
type: string
|
|
235
|
+
example: attr example value
|
|
236
|
+
xml:
|
|
237
|
+
attribute: true
|
|
238
|
+
attributeWithDefault:
|
|
239
|
+
type: string
|
|
240
|
+
default: attr default value
|
|
241
|
+
xml:
|
|
242
|
+
attribute: true
|
|
243
|
+
optionalAttribute?:
|
|
244
|
+
type: string
|
|
245
|
+
example: a1s2
|
|
246
|
+
xml:
|
|
247
|
+
attribute: true
|
|
248
|
+
optionalProperty?:
|
|
249
|
+
type: string
|
|
250
|
+
example: abcd
|
|
251
|
+
requiredProperty:
|
|
252
|
+
type: string
|
|
253
|
+
example: efgh
|
|
254
|
+
|
|
255
|
+
XmlObjectSimple:
|
|
256
|
+
# <XmlObjectSimple>
|
|
257
|
+
# <address>
|
|
258
|
+
# <street></street>
|
|
259
|
+
# <city></city>
|
|
260
|
+
# </address>
|
|
261
|
+
# </XmlObjectSimple>
|
|
262
|
+
type: object
|
|
263
|
+
properties:
|
|
264
|
+
address:
|
|
265
|
+
type: Address
|
|
266
|
+
XmlArraySimple:
|
|
267
|
+
# <XmlArraySimple>
|
|
268
|
+
# <address>
|
|
269
|
+
# <street></street>
|
|
270
|
+
# <city></city>
|
|
271
|
+
# <street></street>
|
|
272
|
+
# <city></city>
|
|
273
|
+
# </address>
|
|
274
|
+
# </XmlArraySimple>
|
|
275
|
+
type: object
|
|
276
|
+
properties:
|
|
277
|
+
address:
|
|
278
|
+
type: Address[]
|
|
279
|
+
examples:
|
|
280
|
+
e1:
|
|
281
|
+
street: 1234 Market street
|
|
282
|
+
city: San Francisco
|
|
283
|
+
e2:
|
|
284
|
+
street: Oxford street
|
|
285
|
+
city: London
|
|
286
|
+
XmlArraySimpleWrapped:
|
|
287
|
+
# <XmlArraySimpleWrapped>
|
|
288
|
+
# <address>
|
|
289
|
+
# <Address>
|
|
290
|
+
# <street></street>
|
|
291
|
+
# <city></city>
|
|
292
|
+
# </Address>
|
|
293
|
+
# <Address>
|
|
294
|
+
# <street></street>
|
|
295
|
+
# <city></city>
|
|
296
|
+
# </Address>
|
|
297
|
+
# </address>
|
|
298
|
+
# </XmlArraySimpleWrapped>
|
|
299
|
+
type: object
|
|
300
|
+
properties:
|
|
301
|
+
address:
|
|
302
|
+
type: Address[]
|
|
303
|
+
examples:
|
|
304
|
+
e1:
|
|
305
|
+
street: 1234 Market street
|
|
306
|
+
city: San Francisco
|
|
307
|
+
e2:
|
|
308
|
+
street: Oxford street
|
|
309
|
+
city: London
|
|
310
|
+
xml:
|
|
311
|
+
wrapped: true
|
|
312
|
+
XmlArraySimpleWrappedNamed:
|
|
313
|
+
# <XmlArraySimpleWrappedNamed>
|
|
314
|
+
# <Residency>
|
|
315
|
+
# <Address>
|
|
316
|
+
# <street></street>
|
|
317
|
+
# <city></city>
|
|
318
|
+
# </Address>
|
|
319
|
+
# <Address>
|
|
320
|
+
# <street></street>
|
|
321
|
+
# <city></city>
|
|
322
|
+
# </Address>
|
|
323
|
+
# </Residency>
|
|
324
|
+
# </XmlArraySimpleWrappedNamed>
|
|
325
|
+
type: object
|
|
326
|
+
properties:
|
|
327
|
+
address:
|
|
328
|
+
type: Address[]
|
|
329
|
+
xml:
|
|
330
|
+
wrapped: true
|
|
331
|
+
name: Residency
|
|
332
|
+
XmlArrayWrappedNamed:
|
|
333
|
+
# <XmlArrayWrappedNamed>
|
|
334
|
+
# <address-array-2>
|
|
335
|
+
# <Address>
|
|
336
|
+
# <street></street>
|
|
337
|
+
# <city></city>
|
|
338
|
+
# </Address>
|
|
339
|
+
# </address-array-2>
|
|
340
|
+
# </XmlArrayWrappedNamed>
|
|
341
|
+
type: object
|
|
342
|
+
properties:
|
|
343
|
+
address:
|
|
344
|
+
type: array
|
|
345
|
+
items:
|
|
346
|
+
type: Address
|
|
347
|
+
xml:
|
|
348
|
+
wrapped: true
|
|
349
|
+
name: address-array-2
|
|
350
|
+
|
|
351
|
+
XmlSerializationObject:
|
|
352
|
+
type: object
|
|
353
|
+
properties:
|
|
354
|
+
id:
|
|
355
|
+
type: string
|
|
356
|
+
xml:
|
|
357
|
+
attribute: true
|
|
358
|
+
name: "uuid"
|
|
359
|
+
notNamedId:
|
|
360
|
+
type: string
|
|
361
|
+
xml:
|
|
362
|
+
attribute: true
|
|
363
|
+
attributeWithExample:
|
|
364
|
+
type: string
|
|
365
|
+
example: attr example value
|
|
366
|
+
xml:
|
|
367
|
+
attribute: true
|
|
368
|
+
attributeWithDefault:
|
|
369
|
+
type: string
|
|
370
|
+
default: attr default value
|
|
371
|
+
xml:
|
|
372
|
+
attribute: true
|
|
373
|
+
object:
|
|
374
|
+
# <XmlSerializationObject>
|
|
375
|
+
# ...
|
|
376
|
+
# <object>
|
|
377
|
+
#
|
|
378
|
+
# <street>one</street>
|
|
379
|
+
# <city>one</city>
|
|
380
|
+
#
|
|
381
|
+
# <street>one</street>
|
|
382
|
+
# <city>one</city>
|
|
383
|
+
#
|
|
384
|
+
# </object>
|
|
385
|
+
# ...
|
|
386
|
+
# </XmlSerializationObject>
|
|
387
|
+
type: Address[]
|
|
388
|
+
addresses:
|
|
389
|
+
# <XmlSerializationObject>
|
|
390
|
+
# ...
|
|
391
|
+
# <addresses>
|
|
392
|
+
# <Address>
|
|
393
|
+
# <street>one</street>
|
|
394
|
+
# </Address>
|
|
395
|
+
# </addresses>
|
|
396
|
+
# ...
|
|
397
|
+
# </XmlSerializationObject>
|
|
398
|
+
type: Address[]
|
|
399
|
+
xml:
|
|
400
|
+
wrapped: true
|
|
401
|
+
addresses2:
|
|
402
|
+
# <XmlSerializationObject>
|
|
403
|
+
# ...
|
|
404
|
+
# <address-array-2> <- renamed by xml.name on the `addresses2` property
|
|
405
|
+
# <Address>
|
|
406
|
+
# <street></street>
|
|
407
|
+
# <city></city>
|
|
408
|
+
# </Address>
|
|
409
|
+
# </address-array-2>
|
|
410
|
+
# ...
|
|
411
|
+
# </XmlSerializationObject>
|
|
412
|
+
type: array
|
|
413
|
+
items:
|
|
414
|
+
type: Address
|
|
415
|
+
xml:
|
|
416
|
+
wrapped: true
|
|
417
|
+
name: address-array-2
|
|
418
|
+
addresses3: # This creates <address-array-3> <Address><street></street>...</Address> ... </address-array-3>
|
|
419
|
+
# <XmlSerializationObject>
|
|
420
|
+
# ...
|
|
421
|
+
# <address-array-3>
|
|
422
|
+
# <street></street> <- items is not wrapped!
|
|
423
|
+
# <city></city>
|
|
424
|
+
# </address-array-3>
|
|
425
|
+
# ...
|
|
426
|
+
# </XmlSerializationObject>
|
|
427
|
+
type: Address[]
|
|
428
|
+
xml:
|
|
429
|
+
wrapped: true # This has no use here as it relates to an object property.
|
|
430
|
+
name: address-array-3
|
|
431
|
+
addresses4: # This creates <Address> <street></street>... </Address>
|
|
432
|
+
type: Address[]
|
|
433
|
+
xml:
|
|
434
|
+
name: address-array-4
|
|
435
|
+
invalidAttribute:
|
|
436
|
+
type: SimpleObject
|
|
437
|
+
xml:
|
|
438
|
+
attribute: true
|
|
439
|
+
namespaceElement:
|
|
440
|
+
type: string
|
|
441
|
+
example: test namespace
|
|
442
|
+
xml:
|
|
443
|
+
namespace: urn:loc.gov:books
|
|
444
|
+
namespaceWithPrefix:
|
|
445
|
+
type: string
|
|
446
|
+
example: test namespace
|
|
447
|
+
xml:
|
|
448
|
+
namespace: urn:ISBN:0-395-36341-6
|
|
449
|
+
prefix: isbn
|
|
450
|
+
optionalAttribute?:
|
|
451
|
+
type: string
|
|
452
|
+
xml:
|
|
453
|
+
attribute: true
|
|
454
|
+
optionalProperty?:
|
|
455
|
+
type: string
|
|
456
|
+
example: abcd
|
|
457
|
+
|
|
458
|
+
NoXmlSerializationObject:
|
|
459
|
+
type: object
|
|
460
|
+
properties:
|
|
461
|
+
id:
|
|
462
|
+
type: string
|
|
463
|
+
addresses:
|
|
464
|
+
type: Address[]
|
|
465
|
+
XmlComplexProperty:
|
|
466
|
+
type: object
|
|
467
|
+
properties:
|
|
468
|
+
complex:
|
|
469
|
+
type: object
|
|
470
|
+
xml:
|
|
471
|
+
wrapped: true # should not matter as this is not an array
|
|
472
|
+
namespace: urn:ISBN:0-395-36341-6
|
|
473
|
+
prefix: f
|
|
474
|
+
properties:
|
|
475
|
+
abc:
|
|
476
|
+
xml:
|
|
477
|
+
attribute: true
|
|
478
|
+
name: correctedName
|
|
479
|
+
other:
|
|
480
|
+
type: string
|
|
481
|
+
example: some property
|
|
482
|
+
XmlArray:
|
|
483
|
+
type: Address[]
|
|
484
|
+
XmlArray2:
|
|
485
|
+
type: array
|
|
486
|
+
items:
|
|
487
|
+
type: Address
|
|
488
|
+
xml:
|
|
489
|
+
name: address
|
|
490
|
+
xml:
|
|
491
|
+
name: addresses-array
|
|
492
|
+
wrapped : true
|
|
493
|
+
XmlArrayExample:
|
|
494
|
+
type: Address[]
|
|
495
|
+
example:
|
|
496
|
+
street: 1234 Market street
|
|
497
|
+
city: San Francisco
|
|
498
|
+
XmlRefSchema:
|
|
499
|
+
description: This type has included xsd schema
|
|
500
|
+
type: !include schemas/person.xsd
|
|
501
|
+
XmlRefSchemaExample:
|
|
502
|
+
description: This type has included xsd schema
|
|
503
|
+
type: !include schemas/person.xsd
|
|
504
|
+
example: !include examples/person.xml
|
|
505
|
+
JsonRefSchema:
|
|
506
|
+
description: This type has included xsd schema
|
|
507
|
+
type: !include schemas/person.json
|
|
508
|
+
LibraryRef:
|
|
509
|
+
type: ExampleType.Pet
|
|
510
|
+
properties:
|
|
511
|
+
type:
|
|
512
|
+
default: Doggie
|
|
513
|
+
xml:
|
|
514
|
+
name: petType
|
|
515
|
+
sound:
|
|
516
|
+
default: Woof
|
|
517
|
+
friendly:
|
|
518
|
+
type: boolean
|
|
519
|
+
default: true
|
|
520
|
+
StringArray:
|
|
521
|
+
type: string[]
|
|
522
|
+
StringArrayExample:
|
|
523
|
+
type: string[]
|
|
524
|
+
example: [test, other]
|
|
525
|
+
StringArrayDefault:
|
|
526
|
+
type: string[]
|
|
527
|
+
example: [test, other]
|
|
528
|
+
NumberArray:
|
|
529
|
+
type: number[]
|
|
530
|
+
NumberArrayExample:
|
|
531
|
+
type: number[]
|
|
532
|
+
example: [1, 2]
|
|
533
|
+
NumberArrayDefault:
|
|
534
|
+
type: number[]
|
|
535
|
+
default: [3, 4]
|
|
536
|
+
ScalarNumber:
|
|
537
|
+
type: number
|
|
538
|
+
ScalarNumberWithExample:
|
|
539
|
+
type: number
|
|
540
|
+
example: 24
|
|
541
|
+
|
|
542
|
+
securitySchemes:
|
|
543
|
+
Basic:
|
|
544
|
+
type: Basic Authentication
|
|
545
|
+
traits:
|
|
546
|
+
Test:
|
|
547
|
+
headers:
|
|
548
|
+
x-test: string
|
|
549
|
+
|
|
550
|
+
/schemas:
|
|
551
|
+
post:
|
|
552
|
+
body:
|
|
553
|
+
application/json:
|
|
554
|
+
type: JsonRefSchema
|
|
555
|
+
application/xml:
|
|
556
|
+
type: XmlRefSchema
|
|
557
|
+
put:
|
|
558
|
+
body:
|
|
559
|
+
application/json:
|
|
560
|
+
schema: !include schemas/person.json
|
|
561
|
+
example: !include examples/person.json
|
|
562
|
+
application/xml:
|
|
563
|
+
type: !include schemas/person.xsd
|
|
564
|
+
example: !include examples/person.xml
|
|
565
|
+
|
|
566
|
+
/parameters:
|
|
567
|
+
get:
|
|
568
|
+
queryParameters:
|
|
569
|
+
arrableStringWithExample:
|
|
570
|
+
type: string[]
|
|
571
|
+
example: ["example 1", "example 2"]
|
|
572
|
+
arrableStringWithExamples:
|
|
573
|
+
type: string[]
|
|
574
|
+
examples:
|
|
575
|
+
named1: ["example 1", "example 2"]
|
|
576
|
+
named2: ["example 3", "example 4"]
|
|
577
|
+
arrableNumberWithExamples:
|
|
578
|
+
type: number[]
|
|
579
|
+
examples:
|
|
580
|
+
named1: [1, 2]
|
|
581
|
+
named2: [3, 4]
|
|
582
|
+
arrableNumber:
|
|
583
|
+
type: number[]
|
|
584
|
+
scalarString:
|
|
585
|
+
type: string
|
|
586
|
+
scalarStringWithExample:
|
|
587
|
+
type: string
|
|
588
|
+
example: a string
|
|
589
|
+
scalarStringWithDefault:
|
|
590
|
+
type: string
|
|
591
|
+
default: test default
|
|
592
|
+
scalarStringWithExamples:
|
|
593
|
+
type: string
|
|
594
|
+
examples:
|
|
595
|
+
named1: a string 1
|
|
596
|
+
named2: a string 2
|
|
597
|
+
scalarNumber:
|
|
598
|
+
type: number
|
|
599
|
+
scalarNumberWithExample:
|
|
600
|
+
type: number
|
|
601
|
+
example: 10
|
|
602
|
+
scalarNumberWithDefault:
|
|
603
|
+
type: number
|
|
604
|
+
default: 20
|
|
605
|
+
scalarNumberWithExamples:
|
|
606
|
+
type: number
|
|
607
|
+
examples:
|
|
608
|
+
named1: 30
|
|
609
|
+
named2: 40
|
|
610
|
+
scalarBoolean:
|
|
611
|
+
type: boolean
|
|
612
|
+
scalarBooleanWithExample:
|
|
613
|
+
type: boolean
|
|
614
|
+
example: true
|
|
615
|
+
scalarBooleanWithDefault:
|
|
616
|
+
type: boolean
|
|
617
|
+
default: false
|
|
618
|
+
scalarBooleanWithExamples:
|
|
619
|
+
type: boolean
|
|
620
|
+
examples:
|
|
621
|
+
named1: true
|
|
622
|
+
named2: false
|
|
623
|
+
notRequired:
|
|
624
|
+
type: string
|
|
625
|
+
required: false
|
|
626
|
+
notRequiredDefault:
|
|
627
|
+
type: string
|
|
628
|
+
required: false
|
|
629
|
+
default: test default
|
|
630
|
+
notRequiredExample:
|
|
631
|
+
type: string
|
|
632
|
+
required: false
|
|
633
|
+
example: test example
|
|
634
|
+
notRequiredArray:
|
|
635
|
+
type: string[]
|
|
636
|
+
required: false
|
|
637
|
+
notRequiredArrayDefault:
|
|
638
|
+
type: string[]
|
|
639
|
+
required: false
|
|
640
|
+
default: [test default]
|
|
641
|
+
notRequiredArrayExample:
|
|
642
|
+
type: string[]
|
|
643
|
+
required: false
|
|
644
|
+
example: [test example]
|