tla-sbuilder 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +328 -0
  3. data/VERSION +1 -0
  4. data/bin/sbuilder.rb +5 -0
  5. data/lib/cli/cli-customer.rb +420 -0
  6. data/lib/cli/cli-example.rb +92 -0
  7. data/lib/cli/cli-pet.rb +767 -0
  8. data/lib/cli/cli-text.rb +226 -0
  9. data/lib/cli/cli.rb +298 -0
  10. data/lib/sbuilder.rb +52 -0
  11. data/lib/sbuilder/constants.rb +72 -0
  12. data/lib/sbuilder/controller.rb +798 -0
  13. data/lib/sbuilder/default-sbuilder.yaml +372 -0
  14. data/lib/sbuilder/domain.rb +124 -0
  15. data/lib/sbuilder/domain_cardinality.rb +37 -0
  16. data/lib/sbuilder/domain_value.rb +81 -0
  17. data/lib/sbuilder/exception.rb +27 -0
  18. data/lib/sbuilder/extension_loader.rb +721 -0
  19. data/lib/sbuilder/factory.rb +234 -0
  20. data/lib/sbuilder/model.rb +356 -0
  21. data/lib/sbuilder/mustache/template.rb +125 -0
  22. data/lib/sbuilder/mustache/template_reader.rb +206 -0
  23. data/lib/sbuilder/mustache/template_reader_context.rb +371 -0
  24. data/lib/sbuilder/param_set.rb +132 -0
  25. data/lib/sbuilder/param_set_db.rb +20 -0
  26. data/lib/sbuilder/param_set_def.rb +57 -0
  27. data/lib/sbuilder/param_set_if.rb +68 -0
  28. data/lib/sbuilder/param_set_loader.rb +77 -0
  29. data/lib/sbuilder/param_set_loader_swagger.rb +424 -0
  30. data/lib/sbuilder/param_set_step.rb +62 -0
  31. data/lib/sbuilder/param_sets.rb +54 -0
  32. data/lib/sbuilder/parameter.rb +97 -0
  33. data/lib/sbuilder/parameter_container.rb +72 -0
  34. data/lib/sbuilder/parameter_dom.rb +70 -0
  35. data/lib/sbuilder/parameter_ref.rb +71 -0
  36. data/lib/sbuilder/resolver.rb +78 -0
  37. data/lib/sbuilder/resolver_loader.rb +79 -0
  38. data/lib/sbuilder/resolver_loader_yaml.rb +103 -0
  39. data/lib/sbuilder/resolver_rule.rb +36 -0
  40. data/lib/sbuilder/resolver_rule_match.rb +55 -0
  41. data/lib/sbuilder/resolver_rule_ref.rb +37 -0
  42. data/lib/utils/hash_inject.rb +12 -0
  43. data/lib/utils/logger.rb +80 -0
  44. data/lib/utils/netio.rb +58 -0
  45. data/lib/utils/string_inject.rb +10 -0
  46. data/lib/utils/version.rb +13 -0
  47. data/mustache/cfg/const_def.mustache +8 -0
  48. data/mustache/cfg/const_run.mustache +3 -0
  49. data/mustache/cfg/invariant-infrastructure-service.mustache +4 -0
  50. data/mustache/cfg/macro_run.mustache +6 -0
  51. data/mustache/cfg/module_footer.mustache +0 -0
  52. data/mustache/cfg/module_header.mustache +7 -0
  53. data/mustache/data-model-dump.mustache +19 -0
  54. data/mustache/data-model-footer.mustache +5 -0
  55. data/mustache/data-model-header.mustache +16 -0
  56. data/mustache/definition_types.mustache +40 -0
  57. data/mustache/domains.mustache +20 -0
  58. data/mustache/domains_assign.mustache +22 -0
  59. data/mustache/domains_run.mustache +21 -0
  60. data/mustache/extend/extend_assumptions.mustache +7 -0
  61. data/mustache/extend/extend_const.mustache +5 -0
  62. data/mustache/extend/extend_implementation.mustache +9 -0
  63. data/mustache/extend/extend_invariant.mustache +7 -0
  64. data/mustache/extend/extend_invariant_cfg.mustache +7 -0
  65. data/mustache/extend/extend_macros.mustache +19 -0
  66. data/mustache/extend/extend_operations.mustache +9 -0
  67. data/mustache/extend/extend_state.mustache +9 -0
  68. data/mustache/infrastructure-service-init.mustache +36 -0
  69. data/mustache/infrastructure-service-variables.mustache +10 -0
  70. data/mustache/interface_processes.mustache +38 -0
  71. data/mustache/interface_stubs_dummy.mustache +13 -0
  72. data/mustache/interface_types.mustache +52 -0
  73. data/mustache/markdown-header.mustache +24 -0
  74. data/mustache/markdown-toc.mustache +13 -0
  75. data/mustache/name_definition_type.mustache +5 -0
  76. data/mustache/name_domain.mustache +5 -0
  77. data/mustache/name_domain_value.mustache +5 -0
  78. data/mustache/name_domain_value_prefix.mustache +5 -0
  79. data/mustache/name_interface_response_type.mustache +6 -0
  80. data/mustache/name_interface_type.mustache +6 -0
  81. data/mustache/name_parameter_definition.mustache +5 -0
  82. data/mustache/name_parameter_type.mustache +6 -0
  83. data/mustache/name_process.mustache +6 -0
  84. data/mustache/name_type_invariant.mustache +5 -0
  85. data/mustache/name_variable.mustache +6 -0
  86. data/mustache/operator-infrastructure-service.mustache +13 -0
  87. data/mustache/possibility/module_extends.mustache +1 -0
  88. data/mustache/possibility/module_footer.mustache +1 -0
  89. data/mustache/possibility/module_header.mustache +8 -0
  90. data/mustache/possibility/possibility_definition.mustache +12 -0
  91. data/mustache/possibility/possibility_directive.mustache +1 -0
  92. data/mustache/possibility/possility_setup.mustache +28 -0
  93. data/mustache/setup/module_footer.mustache +1 -0
  94. data/mustache/setup/module_header.mustache +9 -0
  95. data/mustache/setup/operator_run.mustache +7 -0
  96. data/mustache/setup/operator_tick.mustache +2 -0
  97. data/mustache/setup/steps_run.mustache +22 -0
  98. data/mustache/setup/steps_run_bind_rule.mustache +51 -0
  99. data/mustache/setup/steps_run_bind_set.mustache +37 -0
  100. data/mustache/setup/steps_run_parameterBind.mustache +80 -0
  101. data/mustache/setup/steps_run_parameterExact.mustache +79 -0
  102. data/mustache/state_type_invariant-infrastructure-service.mustache +49 -0
  103. data/mustache/state_type_invariant.mustache +17 -0
  104. data/mustache/state_type_invariant_cfg.mustache +18 -0
  105. data/mustache/state_variables.mustache +20 -0
  106. data/mustache/tla/const_def.mustache +5 -0
  107. data/mustache/tla/const_run.mustache +3 -0
  108. data/mustache/tla/macro-infrastructure-service.mustache +14 -0
  109. data/mustache/tla/macro_run.mustache +40 -0
  110. data/mustache/tla/module_footer.mustache +2 -0
  111. data/mustache/tla/module_header.mustache +9 -0
  112. data/mustache/tla/operator_run.mustache +8 -0
  113. data/mustache/tla/operators-infrastructure-service.mustache +12 -0
  114. data/mustache/tla/plc_define_footer.mustache +1 -0
  115. data/mustache/tla/plc_define_header.mustache +1 -0
  116. data/mustache/tla/plc_define_run.mustache +59 -0
  117. data/mustache/tla/plc_footer.mustache +2 -0
  118. data/mustache/tla/plc_header.mustache +2 -0
  119. data/mustache/tla/plc_run_state.mustache +12 -0
  120. data/mustache/tla/plc_tail.mustache +8 -0
  121. data/mustache/tla/plc_translation.mustache +2 -0
  122. data/resources/schema/json_schema/draft-04.json +150 -0
  123. data/resources/schema/swagger/2.0/schema.json +1591 -0
  124. data/src-extend/README +2 -0
  125. data/src-extend/extend/extend_assumptions.mustache +7 -0
  126. data/src-extend/extend/extend_const.mustache +5 -0
  127. data/src-extend/extend/extend_implementation.mustache +9 -0
  128. data/src-extend/extend/extend_invariant.mustache +11 -0
  129. data/src-extend/extend/extend_invariant_cfg.mustache +7 -0
  130. data/src-extend/extend/extend_macros.mustache +19 -0
  131. data/src-extend/extend/extend_operations.mustache +9 -0
  132. data/src-extend/extend/extend_state.mustache +9 -0
  133. data/src-extend/extend_app/assumption +20 -0
  134. data/src-extend/extend_app/correctness +19 -0
  135. data/src-extend/extend_app/correctness.cfg +9 -0
  136. data/src-extend/extend_app/infrastructure +25 -0
  137. data/src-extend/extend_app/interface +11 -0
  138. data/src-extend/extend_app/operator +18 -0
  139. data/src-extend/extend_app/possibility +16 -0
  140. data/src-extend/extend_app/service +33 -0
  141. data/src-extend/extend_app/state +16 -0
  142. data/src-extend/extend_app/transaction +22 -0
  143. data/src/pet/assumption +29 -0
  144. data/src/pet/assumption_address_domains.tla +12 -0
  145. data/src/pet/assumption_domains.tla +16 -0
  146. data/src/pet/assumption_generic.tla +8 -0
  147. data/src/pet/assumption_id_domains.tla +2 -0
  148. data/src/pet/assumption_owner_domains.tla +14 -0
  149. data/src/pet/assumption_pet_domains.tla +16 -0
  150. data/src/pet/assumption_tag_domains.tla +13 -0
  151. data/src/pet/correctness +24 -0
  152. data/src/pet/correctness.cfg +9 -0
  153. data/src/pet/correctness_coherent_owner_address.tla +6 -0
  154. data/src/pet/correctness_pet_name.tla +4 -0
  155. data/src/pet/correctness_ref_tag.tla +13 -0
  156. data/src/pet/correctness_type_invariants.tla +12 -0
  157. data/src/pet/correctness_unique_pet.tla +3 -0
  158. data/src/pet/correctness_unique_tag.tla +3 -0
  159. data/src/pet/docs/Petstore.md +117 -0
  160. data/src/pet/extend/extend_assumptions.mustache +7 -0
  161. data/src/pet/extend/extend_implementation.mustache +9 -0
  162. data/src/pet/extend/extend_invariant.mustache +11 -0
  163. data/src/pet/extend/extend_invariant_cfg.mustache +7 -0
  164. data/src/pet/extend/extend_macros.mustache +19 -0
  165. data/src/pet/extend/extend_operations.mustache +9 -0
  166. data/src/pet/extend/extend_state.mustache +9 -0
  167. data/src/pet/infrastructure +25 -0
  168. data/src/pet/infrastructure_id_get.tla +24 -0
  169. data/src/pet/interface +12 -0
  170. data/src/pet/interface_delete_pet.tla +5 -0
  171. data/src/pet/interface_get_pet.tla +4 -0
  172. data/src/pet/interface_post_pet.tla +5 -0
  173. data/src/pet/interface_post_tag.tla +5 -0
  174. data/src/pet/interface_put_tag.tla +3 -0
  175. data/src/pet/operator +30 -0
  176. data/src/pet/operator_find_tag_by_owner_name.tla +1 -0
  177. data/src/pet/operator_get_pet.tla +4 -0
  178. data/src/pet/operator_get_pet_by_tag.tla +4 -0
  179. data/src/pet/operator_get_tag.tla +10 -0
  180. data/src/pet/operator_new_owner.tla +3 -0
  181. data/src/pet/operator_new_pet.tla +13 -0
  182. data/src/pet/operator_new_tag.tla +3 -0
  183. data/src/pet/operator_next_pet_id.tla +3 -0
  184. data/src/pet/operator_responses.tla +8 -0
  185. data/src/pet/operator_tag_exists.tla +2 -0
  186. data/src/pet/operator_tag_owner_validated.tla +2 -0
  187. data/src/pet/operator_tag_referenced.tla +4 -0
  188. data/src/pet/operator_valid_owner.tla +17 -0
  189. data/src/pet/operator_valid_pet.tla +6 -0
  190. data/src/pet/operator_valid_tag.tla +5 -0
  191. data/src/pet/possibility +18 -0
  192. data/src/pet/possibility_at_least_two_tags.tla +12 -0
  193. data/src/pet/possibility_invalid_tag_address.tla +8 -0
  194. data/src/pet/service +35 -0
  195. data/src/pet/service_pet_delete.tla +11 -0
  196. data/src/pet/service_pet_get.tla +27 -0
  197. data/src/pet/service_pet_post.tla +78 -0
  198. data/src/pet/service_tag_post.tla +53 -0
  199. data/src/pet/service_tag_put.tla +82 -0
  200. data/src/pet/state +16 -0
  201. data/src/pet/state_infra.tla +6 -0
  202. data/src/pet/state_pet.tla +5 -0
  203. data/src/pet/state_tag_id.tla +2 -0
  204. data/src/pet/transaction +23 -0
  205. data/src/pet/transaction_delete_pet.tla +13 -0
  206. data/src/pet/transaction_enter_pet.tla +13 -0
  207. data/src/pet/transaction_enter_tag.tla +56 -0
  208. data/src/pet/transaction_error.tla +23 -0
  209. data/tla-sbuilder.gemspec +43 -0
  210. metadata +353 -0
@@ -0,0 +1,1591 @@
1
+ {
2
+ "title": "A JSON Schema for Swagger 2.0 API.",
3
+ "id": "http://swagger.io/v2/schema.json#",
4
+ "$schema": "http://json-schema.org/draft-04/schema#",
5
+ "type": "object",
6
+ "required": [
7
+ "swagger",
8
+ "info",
9
+ "paths"
10
+ ],
11
+ "additionalProperties": false,
12
+ "patternProperties": {
13
+ "^x-": {
14
+ "$ref": "#/definitions/vendorExtension"
15
+ }
16
+ },
17
+ "properties": {
18
+ "swagger": {
19
+ "type": "string",
20
+ "enum": [
21
+ "2.0"
22
+ ],
23
+ "description": "The Swagger version of this document."
24
+ },
25
+ "info": {
26
+ "$ref": "#/definitions/info"
27
+ },
28
+ "host": {
29
+ "type": "string",
30
+ "pattern": "^[^{}/ :\\\\]+(?::\\d+)?$",
31
+ "description": "The host (name or ip) of the API. Example: 'swagger.io'"
32
+ },
33
+ "basePath": {
34
+ "type": "string",
35
+ "pattern": "^/",
36
+ "description": "The base path to the API. Example: '/api'."
37
+ },
38
+ "schemes": {
39
+ "$ref": "#/definitions/schemesList"
40
+ },
41
+ "consumes": {
42
+ "description": "A list of MIME types accepted by the API.",
43
+ "$ref": "#/definitions/mediaTypeList"
44
+ },
45
+ "produces": {
46
+ "description": "A list of MIME types the API can produce.",
47
+ "$ref": "#/definitions/mediaTypeList"
48
+ },
49
+ "paths": {
50
+ "$ref": "#/definitions/paths"
51
+ },
52
+ "definitions": {
53
+ "$ref": "#/definitions/definitions"
54
+ },
55
+ "parameters": {
56
+ "$ref": "#/definitions/parameterDefinitions"
57
+ },
58
+ "responses": {
59
+ "$ref": "#/definitions/responseDefinitions"
60
+ },
61
+ "security": {
62
+ "$ref": "#/definitions/security"
63
+ },
64
+ "securityDefinitions": {
65
+ "$ref": "#/definitions/securityDefinitions"
66
+ },
67
+ "tags": {
68
+ "type": "array",
69
+ "items": {
70
+ "$ref": "#/definitions/tag"
71
+ },
72
+ "uniqueItems": true
73
+ },
74
+ "externalDocs": {
75
+ "$ref": "#/definitions/externalDocs"
76
+ }
77
+ },
78
+ "definitions": {
79
+ "info": {
80
+ "type": "object",
81
+ "description": "General information about the API.",
82
+ "required": [
83
+ "version",
84
+ "title"
85
+ ],
86
+ "additionalProperties": false,
87
+ "patternProperties": {
88
+ "^x-": {
89
+ "$ref": "#/definitions/vendorExtension"
90
+ }
91
+ },
92
+ "properties": {
93
+ "title": {
94
+ "type": "string",
95
+ "description": "A unique and precise title of the API."
96
+ },
97
+ "version": {
98
+ "type": "string",
99
+ "description": "A semantic version number of the API."
100
+ },
101
+ "description": {
102
+ "type": "string",
103
+ "description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."
104
+ },
105
+ "termsOfService": {
106
+ "type": "string",
107
+ "description": "The terms of service for the API."
108
+ },
109
+ "contact": {
110
+ "$ref": "#/definitions/contact"
111
+ },
112
+ "license": {
113
+ "$ref": "#/definitions/license"
114
+ }
115
+ }
116
+ },
117
+ "contact": {
118
+ "type": "object",
119
+ "description": "Contact information for the owners of the API.",
120
+ "additionalProperties": false,
121
+ "properties": {
122
+ "name": {
123
+ "type": "string",
124
+ "description": "The identifying name of the contact person/organization."
125
+ },
126
+ "url": {
127
+ "type": "string",
128
+ "description": "The URL pointing to the contact information.",
129
+ "format": "uri"
130
+ },
131
+ "email": {
132
+ "type": "string",
133
+ "description": "The email address of the contact person/organization.",
134
+ "format": "email"
135
+ }
136
+ },
137
+ "patternProperties": {
138
+ "^x-": {
139
+ "$ref": "#/definitions/vendorExtension"
140
+ }
141
+ }
142
+ },
143
+ "license": {
144
+ "type": "object",
145
+ "required": [
146
+ "name"
147
+ ],
148
+ "additionalProperties": false,
149
+ "properties": {
150
+ "name": {
151
+ "type": "string",
152
+ "description": "The name of the license type. It's encouraged to use an OSI compatible license."
153
+ },
154
+ "url": {
155
+ "type": "string",
156
+ "description": "The URL pointing to the license.",
157
+ "format": "uri"
158
+ }
159
+ },
160
+ "patternProperties": {
161
+ "^x-": {
162
+ "$ref": "#/definitions/vendorExtension"
163
+ }
164
+ }
165
+ },
166
+ "paths": {
167
+ "type": "object",
168
+ "description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
169
+ "patternProperties": {
170
+ "^x-": {
171
+ "$ref": "#/definitions/vendorExtension"
172
+ },
173
+ "^/": {
174
+ "$ref": "#/definitions/pathItem"
175
+ }
176
+ },
177
+ "additionalProperties": false
178
+ },
179
+ "definitions": {
180
+ "type": "object",
181
+ "additionalProperties": {
182
+ "$ref": "#/definitions/schema"
183
+ },
184
+ "description": "One or more JSON objects describing the schemas being consumed and produced by the API."
185
+ },
186
+ "parameterDefinitions": {
187
+ "type": "object",
188
+ "additionalProperties": {
189
+ "$ref": "#/definitions/parameter"
190
+ },
191
+ "description": "One or more JSON representations for parameters"
192
+ },
193
+ "responseDefinitions": {
194
+ "type": "object",
195
+ "additionalProperties": {
196
+ "$ref": "#/definitions/response"
197
+ },
198
+ "description": "One or more JSON representations for parameters"
199
+ },
200
+ "externalDocs": {
201
+ "type": "object",
202
+ "additionalProperties": false,
203
+ "description": "information about external documentation",
204
+ "required": [
205
+ "url"
206
+ ],
207
+ "properties": {
208
+ "description": {
209
+ "type": "string"
210
+ },
211
+ "url": {
212
+ "type": "string",
213
+ "format": "uri"
214
+ }
215
+ },
216
+ "patternProperties": {
217
+ "^x-": {
218
+ "$ref": "#/definitions/vendorExtension"
219
+ }
220
+ }
221
+ },
222
+ "examples": {
223
+ "type": "object",
224
+ "additionalProperties": true
225
+ },
226
+ "mimeType": {
227
+ "type": "string",
228
+ "description": "The MIME type of the HTTP message."
229
+ },
230
+ "operation": {
231
+ "type": "object",
232
+ "required": [
233
+ "responses"
234
+ ],
235
+ "additionalProperties": false,
236
+ "patternProperties": {
237
+ "^x-": {
238
+ "$ref": "#/definitions/vendorExtension"
239
+ }
240
+ },
241
+ "properties": {
242
+ "tags": {
243
+ "type": "array",
244
+ "items": {
245
+ "type": "string"
246
+ },
247
+ "uniqueItems": true
248
+ },
249
+ "summary": {
250
+ "type": "string",
251
+ "description": "A brief summary of the operation."
252
+ },
253
+ "description": {
254
+ "type": "string",
255
+ "description": "A longer description of the operation, GitHub Flavored Markdown is allowed."
256
+ },
257
+ "externalDocs": {
258
+ "$ref": "#/definitions/externalDocs"
259
+ },
260
+ "operationId": {
261
+ "type": "string",
262
+ "description": "A unique identifier of the operation."
263
+ },
264
+ "produces": {
265
+ "description": "A list of MIME types the API can produce.",
266
+ "$ref": "#/definitions/mediaTypeList"
267
+ },
268
+ "consumes": {
269
+ "description": "A list of MIME types the API can consume.",
270
+ "$ref": "#/definitions/mediaTypeList"
271
+ },
272
+ "parameters": {
273
+ "$ref": "#/definitions/parametersList"
274
+ },
275
+ "responses": {
276
+ "$ref": "#/definitions/responses"
277
+ },
278
+ "schemes": {
279
+ "$ref": "#/definitions/schemesList"
280
+ },
281
+ "deprecated": {
282
+ "type": "boolean",
283
+ "default": false
284
+ },
285
+ "security": {
286
+ "$ref": "#/definitions/security"
287
+ }
288
+ }
289
+ },
290
+ "pathItem": {
291
+ "type": "object",
292
+ "additionalProperties": false,
293
+ "patternProperties": {
294
+ "^x-": {
295
+ "$ref": "#/definitions/vendorExtension"
296
+ }
297
+ },
298
+ "properties": {
299
+ "$ref": {
300
+ "type": "string"
301
+ },
302
+ "get": {
303
+ "$ref": "#/definitions/operation"
304
+ },
305
+ "put": {
306
+ "$ref": "#/definitions/operation"
307
+ },
308
+ "post": {
309
+ "$ref": "#/definitions/operation"
310
+ },
311
+ "delete": {
312
+ "$ref": "#/definitions/operation"
313
+ },
314
+ "options": {
315
+ "$ref": "#/definitions/operation"
316
+ },
317
+ "head": {
318
+ "$ref": "#/definitions/operation"
319
+ },
320
+ "patch": {
321
+ "$ref": "#/definitions/operation"
322
+ },
323
+ "parameters": {
324
+ "$ref": "#/definitions/parametersList"
325
+ }
326
+ }
327
+ },
328
+ "responses": {
329
+ "type": "object",
330
+ "description": "Response objects names can either be any valid HTTP status code or 'default'.",
331
+ "minProperties": 1,
332
+ "additionalProperties": false,
333
+ "patternProperties": {
334
+ "^([0-9]{3})$|^(default)$": {
335
+ "$ref": "#/definitions/responseValue"
336
+ },
337
+ "^x-": {
338
+ "$ref": "#/definitions/vendorExtension"
339
+ }
340
+ },
341
+ "not": {
342
+ "type": "object",
343
+ "additionalProperties": false,
344
+ "patternProperties": {
345
+ "^x-": {
346
+ "$ref": "#/definitions/vendorExtension"
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "responseValue": {
352
+ "oneOf": [
353
+ {
354
+ "$ref": "#/definitions/response"
355
+ },
356
+ {
357
+ "$ref": "#/definitions/jsonReference"
358
+ }
359
+ ]
360
+ },
361
+ "response": {
362
+ "type": "object",
363
+ "required": [
364
+ "description"
365
+ ],
366
+ "properties": {
367
+ "description": {
368
+ "type": "string"
369
+ },
370
+ "schema": {
371
+ "oneOf": [
372
+ {
373
+ "$ref": "#/definitions/schema"
374
+ },
375
+ {
376
+ "$ref": "#/definitions/fileSchema"
377
+ }
378
+ ]
379
+ },
380
+ "headers": {
381
+ "$ref": "#/definitions/headers"
382
+ },
383
+ "examples": {
384
+ "$ref": "#/definitions/examples"
385
+ }
386
+ },
387
+ "additionalProperties": false,
388
+ "patternProperties": {
389
+ "^x-": {
390
+ "$ref": "#/definitions/vendorExtension"
391
+ }
392
+ }
393
+ },
394
+ "headers": {
395
+ "type": "object",
396
+ "additionalProperties": {
397
+ "$ref": "#/definitions/header"
398
+ }
399
+ },
400
+ "header": {
401
+ "type": "object",
402
+ "additionalProperties": false,
403
+ "required": [
404
+ "type"
405
+ ],
406
+ "properties": {
407
+ "type": {
408
+ "type": "string",
409
+ "enum": [
410
+ "string",
411
+ "number",
412
+ "integer",
413
+ "boolean",
414
+ "array"
415
+ ]
416
+ },
417
+ "format": {
418
+ "type": "string"
419
+ },
420
+ "items": {
421
+ "$ref": "#/definitions/primitivesItems"
422
+ },
423
+ "collectionFormat": {
424
+ "$ref": "#/definitions/collectionFormat"
425
+ },
426
+ "default": {
427
+ "$ref": "#/definitions/default"
428
+ },
429
+ "maximum": {
430
+ "$ref": "#/definitions/maximum"
431
+ },
432
+ "exclusiveMaximum": {
433
+ "$ref": "#/definitions/exclusiveMaximum"
434
+ },
435
+ "minimum": {
436
+ "$ref": "#/definitions/minimum"
437
+ },
438
+ "exclusiveMinimum": {
439
+ "$ref": "#/definitions/exclusiveMinimum"
440
+ },
441
+ "maxLength": {
442
+ "$ref": "#/definitions/maxLength"
443
+ },
444
+ "minLength": {
445
+ "$ref": "#/definitions/minLength"
446
+ },
447
+ "pattern": {
448
+ "$ref": "#/definitions/pattern"
449
+ },
450
+ "maxItems": {
451
+ "$ref": "#/definitions/maxItems"
452
+ },
453
+ "minItems": {
454
+ "$ref": "#/definitions/minItems"
455
+ },
456
+ "uniqueItems": {
457
+ "$ref": "#/definitions/uniqueItems"
458
+ },
459
+ "enum": {
460
+ "$ref": "#/definitions/enum"
461
+ },
462
+ "multipleOf": {
463
+ "$ref": "#/definitions/multipleOf"
464
+ },
465
+ "description": {
466
+ "type": "string"
467
+ }
468
+ },
469
+ "patternProperties": {
470
+ "^x-": {
471
+ "$ref": "#/definitions/vendorExtension"
472
+ }
473
+ }
474
+ },
475
+ "vendorExtension": {
476
+ "description": "Any property starting with x- is valid.",
477
+ "additionalProperties": true,
478
+ "additionalItems": true
479
+ },
480
+ "bodyParameter": {
481
+ "type": "object",
482
+ "required": [
483
+ "name",
484
+ "in",
485
+ "schema"
486
+ ],
487
+ "patternProperties": {
488
+ "^x-": {
489
+ "$ref": "#/definitions/vendorExtension"
490
+ }
491
+ },
492
+ "properties": {
493
+ "description": {
494
+ "type": "string",
495
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
496
+ },
497
+ "name": {
498
+ "type": "string",
499
+ "description": "The name of the parameter."
500
+ },
501
+ "in": {
502
+ "type": "string",
503
+ "description": "Determines the location of the parameter.",
504
+ "enum": [
505
+ "body"
506
+ ]
507
+ },
508
+ "required": {
509
+ "type": "boolean",
510
+ "description": "Determines whether or not this parameter is required or optional.",
511
+ "default": false
512
+ },
513
+ "schema": {
514
+ "$ref": "#/definitions/schema"
515
+ }
516
+ },
517
+ "additionalProperties": false
518
+ },
519
+ "headerParameterSubSchema": {
520
+ "additionalProperties": false,
521
+ "patternProperties": {
522
+ "^x-": {
523
+ "$ref": "#/definitions/vendorExtension"
524
+ }
525
+ },
526
+ "properties": {
527
+ "required": {
528
+ "type": "boolean",
529
+ "description": "Determines whether or not this parameter is required or optional.",
530
+ "default": false
531
+ },
532
+ "in": {
533
+ "type": "string",
534
+ "description": "Determines the location of the parameter.",
535
+ "enum": [
536
+ "header"
537
+ ]
538
+ },
539
+ "description": {
540
+ "type": "string",
541
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
542
+ },
543
+ "name": {
544
+ "type": "string",
545
+ "description": "The name of the parameter."
546
+ },
547
+ "type": {
548
+ "type": "string",
549
+ "enum": [
550
+ "string",
551
+ "number",
552
+ "boolean",
553
+ "integer",
554
+ "array"
555
+ ]
556
+ },
557
+ "format": {
558
+ "type": "string"
559
+ },
560
+ "items": {
561
+ "$ref": "#/definitions/primitivesItems"
562
+ },
563
+ "collectionFormat": {
564
+ "$ref": "#/definitions/collectionFormat"
565
+ },
566
+ "default": {
567
+ "$ref": "#/definitions/default"
568
+ },
569
+ "maximum": {
570
+ "$ref": "#/definitions/maximum"
571
+ },
572
+ "exclusiveMaximum": {
573
+ "$ref": "#/definitions/exclusiveMaximum"
574
+ },
575
+ "minimum": {
576
+ "$ref": "#/definitions/minimum"
577
+ },
578
+ "exclusiveMinimum": {
579
+ "$ref": "#/definitions/exclusiveMinimum"
580
+ },
581
+ "maxLength": {
582
+ "$ref": "#/definitions/maxLength"
583
+ },
584
+ "minLength": {
585
+ "$ref": "#/definitions/minLength"
586
+ },
587
+ "pattern": {
588
+ "$ref": "#/definitions/pattern"
589
+ },
590
+ "maxItems": {
591
+ "$ref": "#/definitions/maxItems"
592
+ },
593
+ "minItems": {
594
+ "$ref": "#/definitions/minItems"
595
+ },
596
+ "uniqueItems": {
597
+ "$ref": "#/definitions/uniqueItems"
598
+ },
599
+ "enum": {
600
+ "$ref": "#/definitions/enum"
601
+ },
602
+ "multipleOf": {
603
+ "$ref": "#/definitions/multipleOf"
604
+ }
605
+ }
606
+ },
607
+ "queryParameterSubSchema": {
608
+ "additionalProperties": false,
609
+ "patternProperties": {
610
+ "^x-": {
611
+ "$ref": "#/definitions/vendorExtension"
612
+ }
613
+ },
614
+ "properties": {
615
+ "required": {
616
+ "type": "boolean",
617
+ "description": "Determines whether or not this parameter is required or optional.",
618
+ "default": false
619
+ },
620
+ "in": {
621
+ "type": "string",
622
+ "description": "Determines the location of the parameter.",
623
+ "enum": [
624
+ "query"
625
+ ]
626
+ },
627
+ "description": {
628
+ "type": "string",
629
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
630
+ },
631
+ "name": {
632
+ "type": "string",
633
+ "description": "The name of the parameter."
634
+ },
635
+ "allowEmptyValue": {
636
+ "type": "boolean",
637
+ "default": false,
638
+ "description": "allows sending a parameter by name only or with an empty value."
639
+ },
640
+ "type": {
641
+ "type": "string",
642
+ "enum": [
643
+ "string",
644
+ "number",
645
+ "boolean",
646
+ "integer",
647
+ "array"
648
+ ]
649
+ },
650
+ "format": {
651
+ "type": "string"
652
+ },
653
+ "items": {
654
+ "$ref": "#/definitions/primitivesItems"
655
+ },
656
+ "collectionFormat": {
657
+ "$ref": "#/definitions/collectionFormatWithMulti"
658
+ },
659
+ "default": {
660
+ "$ref": "#/definitions/default"
661
+ },
662
+ "maximum": {
663
+ "$ref": "#/definitions/maximum"
664
+ },
665
+ "exclusiveMaximum": {
666
+ "$ref": "#/definitions/exclusiveMaximum"
667
+ },
668
+ "minimum": {
669
+ "$ref": "#/definitions/minimum"
670
+ },
671
+ "exclusiveMinimum": {
672
+ "$ref": "#/definitions/exclusiveMinimum"
673
+ },
674
+ "maxLength": {
675
+ "$ref": "#/definitions/maxLength"
676
+ },
677
+ "minLength": {
678
+ "$ref": "#/definitions/minLength"
679
+ },
680
+ "pattern": {
681
+ "$ref": "#/definitions/pattern"
682
+ },
683
+ "maxItems": {
684
+ "$ref": "#/definitions/maxItems"
685
+ },
686
+ "minItems": {
687
+ "$ref": "#/definitions/minItems"
688
+ },
689
+ "uniqueItems": {
690
+ "$ref": "#/definitions/uniqueItems"
691
+ },
692
+ "enum": {
693
+ "$ref": "#/definitions/enum"
694
+ },
695
+ "multipleOf": {
696
+ "$ref": "#/definitions/multipleOf"
697
+ }
698
+ }
699
+ },
700
+ "formDataParameterSubSchema": {
701
+ "additionalProperties": false,
702
+ "patternProperties": {
703
+ "^x-": {
704
+ "$ref": "#/definitions/vendorExtension"
705
+ }
706
+ },
707
+ "properties": {
708
+ "required": {
709
+ "type": "boolean",
710
+ "description": "Determines whether or not this parameter is required or optional.",
711
+ "default": false
712
+ },
713
+ "in": {
714
+ "type": "string",
715
+ "description": "Determines the location of the parameter.",
716
+ "enum": [
717
+ "formData"
718
+ ]
719
+ },
720
+ "description": {
721
+ "type": "string",
722
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
723
+ },
724
+ "name": {
725
+ "type": "string",
726
+ "description": "The name of the parameter."
727
+ },
728
+ "allowEmptyValue": {
729
+ "type": "boolean",
730
+ "default": false,
731
+ "description": "allows sending a parameter by name only or with an empty value."
732
+ },
733
+ "type": {
734
+ "type": "string",
735
+ "enum": [
736
+ "string",
737
+ "number",
738
+ "boolean",
739
+ "integer",
740
+ "array",
741
+ "file"
742
+ ]
743
+ },
744
+ "format": {
745
+ "type": "string"
746
+ },
747
+ "items": {
748
+ "$ref": "#/definitions/primitivesItems"
749
+ },
750
+ "collectionFormat": {
751
+ "$ref": "#/definitions/collectionFormatWithMulti"
752
+ },
753
+ "default": {
754
+ "$ref": "#/definitions/default"
755
+ },
756
+ "maximum": {
757
+ "$ref": "#/definitions/maximum"
758
+ },
759
+ "exclusiveMaximum": {
760
+ "$ref": "#/definitions/exclusiveMaximum"
761
+ },
762
+ "minimum": {
763
+ "$ref": "#/definitions/minimum"
764
+ },
765
+ "exclusiveMinimum": {
766
+ "$ref": "#/definitions/exclusiveMinimum"
767
+ },
768
+ "maxLength": {
769
+ "$ref": "#/definitions/maxLength"
770
+ },
771
+ "minLength": {
772
+ "$ref": "#/definitions/minLength"
773
+ },
774
+ "pattern": {
775
+ "$ref": "#/definitions/pattern"
776
+ },
777
+ "maxItems": {
778
+ "$ref": "#/definitions/maxItems"
779
+ },
780
+ "minItems": {
781
+ "$ref": "#/definitions/minItems"
782
+ },
783
+ "uniqueItems": {
784
+ "$ref": "#/definitions/uniqueItems"
785
+ },
786
+ "enum": {
787
+ "$ref": "#/definitions/enum"
788
+ },
789
+ "multipleOf": {
790
+ "$ref": "#/definitions/multipleOf"
791
+ }
792
+ }
793
+ },
794
+ "pathParameterSubSchema": {
795
+ "additionalProperties": false,
796
+ "patternProperties": {
797
+ "^x-": {
798
+ "$ref": "#/definitions/vendorExtension"
799
+ }
800
+ },
801
+ "required": [
802
+ "required"
803
+ ],
804
+ "properties": {
805
+ "required": {
806
+ "type": "boolean",
807
+ "enum": [
808
+ true
809
+ ],
810
+ "description": "Determines whether or not this parameter is required or optional."
811
+ },
812
+ "in": {
813
+ "type": "string",
814
+ "description": "Determines the location of the parameter.",
815
+ "enum": [
816
+ "path"
817
+ ]
818
+ },
819
+ "description": {
820
+ "type": "string",
821
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
822
+ },
823
+ "name": {
824
+ "type": "string",
825
+ "description": "The name of the parameter."
826
+ },
827
+ "type": {
828
+ "type": "string",
829
+ "enum": [
830
+ "string",
831
+ "number",
832
+ "boolean",
833
+ "integer",
834
+ "array"
835
+ ]
836
+ },
837
+ "format": {
838
+ "type": "string"
839
+ },
840
+ "items": {
841
+ "$ref": "#/definitions/primitivesItems"
842
+ },
843
+ "collectionFormat": {
844
+ "$ref": "#/definitions/collectionFormat"
845
+ },
846
+ "default": {
847
+ "$ref": "#/definitions/default"
848
+ },
849
+ "maximum": {
850
+ "$ref": "#/definitions/maximum"
851
+ },
852
+ "exclusiveMaximum": {
853
+ "$ref": "#/definitions/exclusiveMaximum"
854
+ },
855
+ "minimum": {
856
+ "$ref": "#/definitions/minimum"
857
+ },
858
+ "exclusiveMinimum": {
859
+ "$ref": "#/definitions/exclusiveMinimum"
860
+ },
861
+ "maxLength": {
862
+ "$ref": "#/definitions/maxLength"
863
+ },
864
+ "minLength": {
865
+ "$ref": "#/definitions/minLength"
866
+ },
867
+ "pattern": {
868
+ "$ref": "#/definitions/pattern"
869
+ },
870
+ "maxItems": {
871
+ "$ref": "#/definitions/maxItems"
872
+ },
873
+ "minItems": {
874
+ "$ref": "#/definitions/minItems"
875
+ },
876
+ "uniqueItems": {
877
+ "$ref": "#/definitions/uniqueItems"
878
+ },
879
+ "enum": {
880
+ "$ref": "#/definitions/enum"
881
+ },
882
+ "multipleOf": {
883
+ "$ref": "#/definitions/multipleOf"
884
+ }
885
+ }
886
+ },
887
+ "nonBodyParameter": {
888
+ "type": "object",
889
+ "required": [
890
+ "name",
891
+ "in",
892
+ "type"
893
+ ],
894
+ "oneOf": [
895
+ {
896
+ "$ref": "#/definitions/headerParameterSubSchema"
897
+ },
898
+ {
899
+ "$ref": "#/definitions/formDataParameterSubSchema"
900
+ },
901
+ {
902
+ "$ref": "#/definitions/queryParameterSubSchema"
903
+ },
904
+ {
905
+ "$ref": "#/definitions/pathParameterSubSchema"
906
+ }
907
+ ]
908
+ },
909
+ "parameter": {
910
+ "oneOf": [
911
+ {
912
+ "$ref": "#/definitions/bodyParameter"
913
+ },
914
+ {
915
+ "$ref": "#/definitions/nonBodyParameter"
916
+ }
917
+ ]
918
+ },
919
+ "schema": {
920
+ "type": "object",
921
+ "description": "A deterministic version of a JSON Schema object.",
922
+ "patternProperties": {
923
+ "^x-": {
924
+ "$ref": "#/definitions/vendorExtension"
925
+ }
926
+ },
927
+ "properties": {
928
+ "$ref": {
929
+ "type": "string"
930
+ },
931
+ "format": {
932
+ "type": "string"
933
+ },
934
+ "title": {
935
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
936
+ },
937
+ "description": {
938
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/description"
939
+ },
940
+ "default": {
941
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/default"
942
+ },
943
+ "multipleOf": {
944
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
945
+ },
946
+ "maximum": {
947
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
948
+ },
949
+ "exclusiveMaximum": {
950
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
951
+ },
952
+ "minimum": {
953
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
954
+ },
955
+ "exclusiveMinimum": {
956
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
957
+ },
958
+ "maxLength": {
959
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
960
+ },
961
+ "minLength": {
962
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
963
+ },
964
+ "pattern": {
965
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
966
+ },
967
+ "maxItems": {
968
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
969
+ },
970
+ "minItems": {
971
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
972
+ },
973
+ "uniqueItems": {
974
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
975
+ },
976
+ "maxProperties": {
977
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
978
+ },
979
+ "minProperties": {
980
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
981
+ },
982
+ "required": {
983
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
984
+ },
985
+ "enum": {
986
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
987
+ },
988
+ "additionalProperties": {
989
+ "anyOf": [
990
+ {
991
+ "$ref": "#/definitions/schema"
992
+ },
993
+ {
994
+ "type": "boolean"
995
+ }
996
+ ],
997
+ "default": {}
998
+ },
999
+ "type": {
1000
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/type"
1001
+ },
1002
+ "items": {
1003
+ "anyOf": [
1004
+ {
1005
+ "$ref": "#/definitions/schema"
1006
+ },
1007
+ {
1008
+ "type": "array",
1009
+ "minItems": 1,
1010
+ "items": {
1011
+ "$ref": "#/definitions/schema"
1012
+ }
1013
+ }
1014
+ ],
1015
+ "default": {}
1016
+ },
1017
+ "allOf": {
1018
+ "type": "array",
1019
+ "minItems": 1,
1020
+ "items": {
1021
+ "$ref": "#/definitions/schema"
1022
+ }
1023
+ },
1024
+ "properties": {
1025
+ "type": "object",
1026
+ "additionalProperties": {
1027
+ "$ref": "#/definitions/schema"
1028
+ },
1029
+ "default": {}
1030
+ },
1031
+ "discriminator": {
1032
+ "type": "string"
1033
+ },
1034
+ "readOnly": {
1035
+ "type": "boolean",
1036
+ "default": false
1037
+ },
1038
+ "xml": {
1039
+ "$ref": "#/definitions/xml"
1040
+ },
1041
+ "externalDocs": {
1042
+ "$ref": "#/definitions/externalDocs"
1043
+ },
1044
+ "example": {}
1045
+ },
1046
+ "additionalProperties": false
1047
+ },
1048
+ "fileSchema": {
1049
+ "type": "object",
1050
+ "description": "A deterministic version of a JSON Schema object.",
1051
+ "patternProperties": {
1052
+ "^x-": {
1053
+ "$ref": "#/definitions/vendorExtension"
1054
+ }
1055
+ },
1056
+ "required": [
1057
+ "type"
1058
+ ],
1059
+ "properties": {
1060
+ "format": {
1061
+ "type": "string"
1062
+ },
1063
+ "title": {
1064
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
1065
+ },
1066
+ "description": {
1067
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/description"
1068
+ },
1069
+ "default": {
1070
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/default"
1071
+ },
1072
+ "required": {
1073
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
1074
+ },
1075
+ "type": {
1076
+ "type": "string",
1077
+ "enum": [
1078
+ "file"
1079
+ ]
1080
+ },
1081
+ "readOnly": {
1082
+ "type": "boolean",
1083
+ "default": false
1084
+ },
1085
+ "externalDocs": {
1086
+ "$ref": "#/definitions/externalDocs"
1087
+ },
1088
+ "example": {}
1089
+ },
1090
+ "additionalProperties": false
1091
+ },
1092
+ "primitivesItems": {
1093
+ "type": "object",
1094
+ "additionalProperties": false,
1095
+ "properties": {
1096
+ "type": {
1097
+ "type": "string",
1098
+ "enum": [
1099
+ "string",
1100
+ "number",
1101
+ "integer",
1102
+ "boolean",
1103
+ "array"
1104
+ ]
1105
+ },
1106
+ "format": {
1107
+ "type": "string"
1108
+ },
1109
+ "items": {
1110
+ "$ref": "#/definitions/primitivesItems"
1111
+ },
1112
+ "collectionFormat": {
1113
+ "$ref": "#/definitions/collectionFormat"
1114
+ },
1115
+ "default": {
1116
+ "$ref": "#/definitions/default"
1117
+ },
1118
+ "maximum": {
1119
+ "$ref": "#/definitions/maximum"
1120
+ },
1121
+ "exclusiveMaximum": {
1122
+ "$ref": "#/definitions/exclusiveMaximum"
1123
+ },
1124
+ "minimum": {
1125
+ "$ref": "#/definitions/minimum"
1126
+ },
1127
+ "exclusiveMinimum": {
1128
+ "$ref": "#/definitions/exclusiveMinimum"
1129
+ },
1130
+ "maxLength": {
1131
+ "$ref": "#/definitions/maxLength"
1132
+ },
1133
+ "minLength": {
1134
+ "$ref": "#/definitions/minLength"
1135
+ },
1136
+ "pattern": {
1137
+ "$ref": "#/definitions/pattern"
1138
+ },
1139
+ "maxItems": {
1140
+ "$ref": "#/definitions/maxItems"
1141
+ },
1142
+ "minItems": {
1143
+ "$ref": "#/definitions/minItems"
1144
+ },
1145
+ "uniqueItems": {
1146
+ "$ref": "#/definitions/uniqueItems"
1147
+ },
1148
+ "enum": {
1149
+ "$ref": "#/definitions/enum"
1150
+ },
1151
+ "multipleOf": {
1152
+ "$ref": "#/definitions/multipleOf"
1153
+ }
1154
+ },
1155
+ "patternProperties": {
1156
+ "^x-": {
1157
+ "$ref": "#/definitions/vendorExtension"
1158
+ }
1159
+ }
1160
+ },
1161
+ "security": {
1162
+ "type": "array",
1163
+ "items": {
1164
+ "$ref": "#/definitions/securityRequirement"
1165
+ },
1166
+ "uniqueItems": true
1167
+ },
1168
+ "securityRequirement": {
1169
+ "type": "object",
1170
+ "additionalProperties": {
1171
+ "type": "array",
1172
+ "items": {
1173
+ "type": "string"
1174
+ },
1175
+ "uniqueItems": true
1176
+ }
1177
+ },
1178
+ "xml": {
1179
+ "type": "object",
1180
+ "additionalProperties": false,
1181
+ "properties": {
1182
+ "name": {
1183
+ "type": "string"
1184
+ },
1185
+ "namespace": {
1186
+ "type": "string"
1187
+ },
1188
+ "prefix": {
1189
+ "type": "string"
1190
+ },
1191
+ "attribute": {
1192
+ "type": "boolean",
1193
+ "default": false
1194
+ },
1195
+ "wrapped": {
1196
+ "type": "boolean",
1197
+ "default": false
1198
+ }
1199
+ },
1200
+ "patternProperties": {
1201
+ "^x-": {
1202
+ "$ref": "#/definitions/vendorExtension"
1203
+ }
1204
+ }
1205
+ },
1206
+ "tag": {
1207
+ "type": "object",
1208
+ "additionalProperties": false,
1209
+ "required": [
1210
+ "name"
1211
+ ],
1212
+ "properties": {
1213
+ "name": {
1214
+ "type": "string"
1215
+ },
1216
+ "description": {
1217
+ "type": "string"
1218
+ },
1219
+ "externalDocs": {
1220
+ "$ref": "#/definitions/externalDocs"
1221
+ }
1222
+ },
1223
+ "patternProperties": {
1224
+ "^x-": {
1225
+ "$ref": "#/definitions/vendorExtension"
1226
+ }
1227
+ }
1228
+ },
1229
+ "securityDefinitions": {
1230
+ "type": "object",
1231
+ "additionalProperties": {
1232
+ "oneOf": [
1233
+ {
1234
+ "$ref": "#/definitions/basicAuthenticationSecurity"
1235
+ },
1236
+ {
1237
+ "$ref": "#/definitions/apiKeySecurity"
1238
+ },
1239
+ {
1240
+ "$ref": "#/definitions/oauth2ImplicitSecurity"
1241
+ },
1242
+ {
1243
+ "$ref": "#/definitions/oauth2PasswordSecurity"
1244
+ },
1245
+ {
1246
+ "$ref": "#/definitions/oauth2ApplicationSecurity"
1247
+ },
1248
+ {
1249
+ "$ref": "#/definitions/oauth2AccessCodeSecurity"
1250
+ }
1251
+ ]
1252
+ }
1253
+ },
1254
+ "basicAuthenticationSecurity": {
1255
+ "type": "object",
1256
+ "additionalProperties": false,
1257
+ "required": [
1258
+ "type"
1259
+ ],
1260
+ "properties": {
1261
+ "type": {
1262
+ "type": "string",
1263
+ "enum": [
1264
+ "basic"
1265
+ ]
1266
+ },
1267
+ "description": {
1268
+ "type": "string"
1269
+ }
1270
+ },
1271
+ "patternProperties": {
1272
+ "^x-": {
1273
+ "$ref": "#/definitions/vendorExtension"
1274
+ }
1275
+ }
1276
+ },
1277
+ "apiKeySecurity": {
1278
+ "type": "object",
1279
+ "additionalProperties": false,
1280
+ "required": [
1281
+ "type",
1282
+ "name",
1283
+ "in"
1284
+ ],
1285
+ "properties": {
1286
+ "type": {
1287
+ "type": "string",
1288
+ "enum": [
1289
+ "apiKey"
1290
+ ]
1291
+ },
1292
+ "name": {
1293
+ "type": "string"
1294
+ },
1295
+ "in": {
1296
+ "type": "string",
1297
+ "enum": [
1298
+ "header",
1299
+ "query"
1300
+ ]
1301
+ },
1302
+ "description": {
1303
+ "type": "string"
1304
+ }
1305
+ },
1306
+ "patternProperties": {
1307
+ "^x-": {
1308
+ "$ref": "#/definitions/vendorExtension"
1309
+ }
1310
+ }
1311
+ },
1312
+ "oauth2ImplicitSecurity": {
1313
+ "type": "object",
1314
+ "additionalProperties": false,
1315
+ "required": [
1316
+ "type",
1317
+ "flow",
1318
+ "authorizationUrl"
1319
+ ],
1320
+ "properties": {
1321
+ "type": {
1322
+ "type": "string",
1323
+ "enum": [
1324
+ "oauth2"
1325
+ ]
1326
+ },
1327
+ "flow": {
1328
+ "type": "string",
1329
+ "enum": [
1330
+ "implicit"
1331
+ ]
1332
+ },
1333
+ "scopes": {
1334
+ "$ref": "#/definitions/oauth2Scopes"
1335
+ },
1336
+ "authorizationUrl": {
1337
+ "type": "string",
1338
+ "format": "uri"
1339
+ },
1340
+ "description": {
1341
+ "type": "string"
1342
+ }
1343
+ },
1344
+ "patternProperties": {
1345
+ "^x-": {
1346
+ "$ref": "#/definitions/vendorExtension"
1347
+ }
1348
+ }
1349
+ },
1350
+ "oauth2PasswordSecurity": {
1351
+ "type": "object",
1352
+ "additionalProperties": false,
1353
+ "required": [
1354
+ "type",
1355
+ "flow",
1356
+ "tokenUrl"
1357
+ ],
1358
+ "properties": {
1359
+ "type": {
1360
+ "type": "string",
1361
+ "enum": [
1362
+ "oauth2"
1363
+ ]
1364
+ },
1365
+ "flow": {
1366
+ "type": "string",
1367
+ "enum": [
1368
+ "password"
1369
+ ]
1370
+ },
1371
+ "scopes": {
1372
+ "$ref": "#/definitions/oauth2Scopes"
1373
+ },
1374
+ "tokenUrl": {
1375
+ "type": "string",
1376
+ "format": "uri"
1377
+ },
1378
+ "description": {
1379
+ "type": "string"
1380
+ }
1381
+ },
1382
+ "patternProperties": {
1383
+ "^x-": {
1384
+ "$ref": "#/definitions/vendorExtension"
1385
+ }
1386
+ }
1387
+ },
1388
+ "oauth2ApplicationSecurity": {
1389
+ "type": "object",
1390
+ "additionalProperties": false,
1391
+ "required": [
1392
+ "type",
1393
+ "flow",
1394
+ "tokenUrl"
1395
+ ],
1396
+ "properties": {
1397
+ "type": {
1398
+ "type": "string",
1399
+ "enum": [
1400
+ "oauth2"
1401
+ ]
1402
+ },
1403
+ "flow": {
1404
+ "type": "string",
1405
+ "enum": [
1406
+ "application"
1407
+ ]
1408
+ },
1409
+ "scopes": {
1410
+ "$ref": "#/definitions/oauth2Scopes"
1411
+ },
1412
+ "tokenUrl": {
1413
+ "type": "string",
1414
+ "format": "uri"
1415
+ },
1416
+ "description": {
1417
+ "type": "string"
1418
+ }
1419
+ },
1420
+ "patternProperties": {
1421
+ "^x-": {
1422
+ "$ref": "#/definitions/vendorExtension"
1423
+ }
1424
+ }
1425
+ },
1426
+ "oauth2AccessCodeSecurity": {
1427
+ "type": "object",
1428
+ "additionalProperties": false,
1429
+ "required": [
1430
+ "type",
1431
+ "flow",
1432
+ "authorizationUrl",
1433
+ "tokenUrl"
1434
+ ],
1435
+ "properties": {
1436
+ "type": {
1437
+ "type": "string",
1438
+ "enum": [
1439
+ "oauth2"
1440
+ ]
1441
+ },
1442
+ "flow": {
1443
+ "type": "string",
1444
+ "enum": [
1445
+ "accessCode"
1446
+ ]
1447
+ },
1448
+ "scopes": {
1449
+ "$ref": "#/definitions/oauth2Scopes"
1450
+ },
1451
+ "authorizationUrl": {
1452
+ "type": "string",
1453
+ "format": "uri"
1454
+ },
1455
+ "tokenUrl": {
1456
+ "type": "string",
1457
+ "format": "uri"
1458
+ },
1459
+ "description": {
1460
+ "type": "string"
1461
+ }
1462
+ },
1463
+ "patternProperties": {
1464
+ "^x-": {
1465
+ "$ref": "#/definitions/vendorExtension"
1466
+ }
1467
+ }
1468
+ },
1469
+ "oauth2Scopes": {
1470
+ "type": "object",
1471
+ "additionalProperties": {
1472
+ "type": "string"
1473
+ }
1474
+ },
1475
+ "mediaTypeList": {
1476
+ "type": "array",
1477
+ "items": {
1478
+ "$ref": "#/definitions/mimeType"
1479
+ },
1480
+ "uniqueItems": true
1481
+ },
1482
+ "parametersList": {
1483
+ "type": "array",
1484
+ "description": "The parameters needed to send a valid API call.",
1485
+ "additionalItems": false,
1486
+ "items": {
1487
+ "oneOf": [
1488
+ {
1489
+ "$ref": "#/definitions/parameter"
1490
+ },
1491
+ {
1492
+ "$ref": "#/definitions/jsonReference"
1493
+ }
1494
+ ]
1495
+ },
1496
+ "uniqueItems": true
1497
+ },
1498
+ "schemesList": {
1499
+ "type": "array",
1500
+ "description": "The transfer protocol of the API.",
1501
+ "items": {
1502
+ "type": "string",
1503
+ "enum": [
1504
+ "http",
1505
+ "https",
1506
+ "ws",
1507
+ "wss"
1508
+ ]
1509
+ },
1510
+ "uniqueItems": true
1511
+ },
1512
+ "collectionFormat": {
1513
+ "type": "string",
1514
+ "enum": [
1515
+ "csv",
1516
+ "ssv",
1517
+ "tsv",
1518
+ "pipes"
1519
+ ],
1520
+ "default": "csv"
1521
+ },
1522
+ "collectionFormatWithMulti": {
1523
+ "type": "string",
1524
+ "enum": [
1525
+ "csv",
1526
+ "ssv",
1527
+ "tsv",
1528
+ "pipes",
1529
+ "multi"
1530
+ ],
1531
+ "default": "csv"
1532
+ },
1533
+ "title": {
1534
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
1535
+ },
1536
+ "description": {
1537
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/description"
1538
+ },
1539
+ "default": {
1540
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/default"
1541
+ },
1542
+ "multipleOf": {
1543
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
1544
+ },
1545
+ "maximum": {
1546
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
1547
+ },
1548
+ "exclusiveMaximum": {
1549
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
1550
+ },
1551
+ "minimum": {
1552
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
1553
+ },
1554
+ "exclusiveMinimum": {
1555
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
1556
+ },
1557
+ "maxLength": {
1558
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
1559
+ },
1560
+ "minLength": {
1561
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
1562
+ },
1563
+ "pattern": {
1564
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
1565
+ },
1566
+ "maxItems": {
1567
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
1568
+ },
1569
+ "minItems": {
1570
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
1571
+ },
1572
+ "uniqueItems": {
1573
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
1574
+ },
1575
+ "enum": {
1576
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
1577
+ },
1578
+ "jsonReference": {
1579
+ "type": "object",
1580
+ "required": [
1581
+ "$ref"
1582
+ ],
1583
+ "additionalProperties": false,
1584
+ "properties": {
1585
+ "$ref": {
1586
+ "type": "string"
1587
+ }
1588
+ }
1589
+ }
1590
+ }
1591
+ }