openapi_validator 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 822e3bc70b1809c2ac07cdde19399631aa6ff7f17210cf254bf7b567dd68633f
4
+ data.tar.gz: d274a51ea8c4bb5ef61357402168518a6601fe1ba41779e1119e520703cbfed2
5
+ SHA512:
6
+ metadata.gz: a8e28dca08cb8d1dee75db18dab8753cfec98cb997b8abc6f6508b40990bc78618af4ac33a680edc9a5ea2e858d38f9c859b112d876b0513f49ab03bb23c14f9
7
+ data.tar.gz: c9e7a6b794fcb8b7477881114a12146c325ac72876543d40e9efb9fb6de0edb8cce73762250a67959af5d8388bf4d69da80ce62de325a0c2c4d40fdc9d84d680
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.1
7
+ before_install: gem install bundler -v 2.0.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in openapi_validator.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,41 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ openapi_validator (0.1.0)
5
+ json-schema (~> 2.8)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.6.0)
11
+ public_suffix (>= 2.0.2, < 4.0)
12
+ diff-lcs (1.3)
13
+ json-schema (2.8.1)
14
+ addressable (>= 2.4)
15
+ public_suffix (3.0.3)
16
+ rake (10.5.0)
17
+ rspec (3.8.0)
18
+ rspec-core (~> 3.8.0)
19
+ rspec-expectations (~> 3.8.0)
20
+ rspec-mocks (~> 3.8.0)
21
+ rspec-core (3.8.0)
22
+ rspec-support (~> 3.8.0)
23
+ rspec-expectations (3.8.2)
24
+ diff-lcs (>= 1.2.0, < 2.0)
25
+ rspec-support (~> 3.8.0)
26
+ rspec-mocks (3.8.0)
27
+ diff-lcs (>= 1.2.0, < 2.0)
28
+ rspec-support (~> 3.8.0)
29
+ rspec-support (3.8.0)
30
+
31
+ PLATFORMS
32
+ ruby
33
+
34
+ DEPENDENCIES
35
+ bundler (~> 2.0)
36
+ openapi_validator!
37
+ rake (~> 10.0)
38
+ rspec (~> 3.0)
39
+
40
+ BUNDLED WITH
41
+ 2.0.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Svyatoslav Kryukov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # OpenapiValidator
2
+
3
+ Validator used for [openapi_rspec](https://github.com/llcmedsolutions/openapi_rspec)
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'openapi_validator'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install openapi_validator
20
+
21
+ ## Usage
22
+
23
+ See rspec for examples.
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/llcmedsolutions/openapi_validator.
34
+
35
+ ## License
36
+
37
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "openapi_validator"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,1245 @@
1
+ {
2
+ "title": "A JSON Schema for OpenAPI 3.0.",
3
+ "id": "http://openapis.org/v3/schema.json#",
4
+ "$schema": "http://json-schema.org/draft-04/schema#",
5
+ "type": "object",
6
+ "description": "This is the root document object of the OpenAPI document.",
7
+ "required": [
8
+ "openapi",
9
+ "info",
10
+ "paths"
11
+ ],
12
+ "additionalProperties": false,
13
+ "patternProperties": {
14
+ "^x-": {
15
+ "$ref": "#/definitions/specificationExtension"
16
+ }
17
+ },
18
+ "properties": {
19
+ "openapi": {
20
+ "type": "string"
21
+ },
22
+ "info": {
23
+ "$ref": "#/definitions/info"
24
+ },
25
+ "servers": {
26
+ "type": "array",
27
+ "items": {
28
+ "$ref": "#/definitions/server"
29
+ },
30
+ "uniqueItems": true
31
+ },
32
+ "paths": {
33
+ "$ref": "#/definitions/paths"
34
+ },
35
+ "components": {
36
+ "$ref": "#/definitions/components"
37
+ },
38
+ "security": {
39
+ "type": "array",
40
+ "items": {
41
+ "$ref": "#/definitions/securityRequirement"
42
+ },
43
+ "uniqueItems": true
44
+ },
45
+ "tags": {
46
+ "type": "array",
47
+ "items": {
48
+ "$ref": "#/definitions/tag"
49
+ },
50
+ "uniqueItems": true
51
+ },
52
+ "externalDocs": {
53
+ "$ref": "#/definitions/externalDocs"
54
+ }
55
+ },
56
+ "definitions": {
57
+ "info": {
58
+ "type": "object",
59
+ "description": "The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.",
60
+ "required": [
61
+ "title",
62
+ "version"
63
+ ],
64
+ "additionalProperties": false,
65
+ "patternProperties": {
66
+ "^x-": {
67
+ "$ref": "#/definitions/specificationExtension"
68
+ }
69
+ },
70
+ "properties": {
71
+ "title": {
72
+ "type": "string"
73
+ },
74
+ "description": {
75
+ "type": "string"
76
+ },
77
+ "termsOfService": {
78
+ "type": "string"
79
+ },
80
+ "contact": {
81
+ "$ref": "#/definitions/contact"
82
+ },
83
+ "license": {
84
+ "$ref": "#/definitions/license"
85
+ },
86
+ "version": {
87
+ "type": "string"
88
+ }
89
+ }
90
+ },
91
+ "contact": {
92
+ "type": "object",
93
+ "description": "Contact information for the exposed API.",
94
+ "additionalProperties": false,
95
+ "patternProperties": {
96
+ "^x-": {
97
+ "$ref": "#/definitions/specificationExtension"
98
+ }
99
+ },
100
+ "properties": {
101
+ "name": {
102
+ "type": "string"
103
+ },
104
+ "url": {
105
+ "type": "string",
106
+ "format": "uri"
107
+ },
108
+ "email": {
109
+ "type": "string",
110
+ "format": "email"
111
+ }
112
+ }
113
+ },
114
+ "license": {
115
+ "type": "object",
116
+ "description": "License information for the exposed API.",
117
+ "required": [
118
+ "name"
119
+ ],
120
+ "additionalProperties": false,
121
+ "patternProperties": {
122
+ "^x-": {
123
+ "$ref": "#/definitions/specificationExtension"
124
+ }
125
+ },
126
+ "properties": {
127
+ "name": {
128
+ "type": "string"
129
+ },
130
+ "url": {
131
+ "type": "string"
132
+ }
133
+ }
134
+ },
135
+ "server": {
136
+ "type": "object",
137
+ "description": "An object representing a Server.",
138
+ "required": [
139
+ "url"
140
+ ],
141
+ "additionalProperties": false,
142
+ "patternProperties": {
143
+ "^x-": {
144
+ "$ref": "#/definitions/specificationExtension"
145
+ }
146
+ },
147
+ "properties": {
148
+ "url": {
149
+ "type": "string"
150
+ },
151
+ "description": {
152
+ "type": "string"
153
+ },
154
+ "variables": {
155
+ "$ref": "#/definitions/serverVariables"
156
+ }
157
+ }
158
+ },
159
+ "serverVariable": {
160
+ "type": "object",
161
+ "description": "An object representing a Server Variable for server URL template substitution.",
162
+ "required": [
163
+ "default"
164
+ ],
165
+ "additionalProperties": false,
166
+ "patternProperties": {
167
+ "^x-": {
168
+ "$ref": "#/definitions/specificationExtension"
169
+ }
170
+ },
171
+ "properties": {
172
+ "enum": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "string"
176
+ },
177
+ "uniqueItems": true
178
+ },
179
+ "default": {
180
+ "type": "string"
181
+ },
182
+ "description": {
183
+ "type": "string"
184
+ }
185
+ }
186
+ },
187
+ "components": {
188
+ "type": "object",
189
+ "description": "Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.",
190
+ "additionalProperties": false,
191
+ "patternProperties": {
192
+ "^x-": {
193
+ "$ref": "#/definitions/specificationExtension"
194
+ }
195
+ },
196
+ "properties": {
197
+ "schemas": {
198
+ "$ref": "#/definitions/schemasOrReferences"
199
+ },
200
+ "responses": {
201
+ "$ref": "#/definitions/responsesOrReferences"
202
+ },
203
+ "parameters": {
204
+ "$ref": "#/definitions/parametersOrReferences"
205
+ },
206
+ "examples": {
207
+ "$ref": "#/definitions/examplesOrReferences"
208
+ },
209
+ "requestBodies": {
210
+ "$ref": "#/definitions/requestBodiesOrReferences"
211
+ },
212
+ "headers": {
213
+ "$ref": "#/definitions/headersOrReferences"
214
+ },
215
+ "securitySchemes": {
216
+ "$ref": "#/definitions/securitySchemesOrReferences"
217
+ },
218
+ "links": {
219
+ "$ref": "#/definitions/linksOrReferences"
220
+ },
221
+ "callbacks": {
222
+ "$ref": "#/definitions/callbacksOrReferences"
223
+ }
224
+ }
225
+ },
226
+ "paths": {
227
+ "type": "object",
228
+ "description": "Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.",
229
+ "additionalProperties": false,
230
+ "patternProperties": {
231
+ "^/": {
232
+ "$ref": "#/definitions/pathItem"
233
+ },
234
+ "^x-": {
235
+ "$ref": "#/definitions/specificationExtension"
236
+ }
237
+ }
238
+ },
239
+ "pathItem": {
240
+ "type": "object",
241
+ "description": "Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.",
242
+ "additionalProperties": false,
243
+ "patternProperties": {
244
+ "^x-": {
245
+ "$ref": "#/definitions/specificationExtension"
246
+ }
247
+ },
248
+ "properties": {
249
+ "$ref": {
250
+ "type": "string"
251
+ },
252
+ "summary": {
253
+ "type": "string"
254
+ },
255
+ "description": {
256
+ "type": "string"
257
+ },
258
+ "get": {
259
+ "$ref": "#/definitions/operation"
260
+ },
261
+ "put": {
262
+ "$ref": "#/definitions/operation"
263
+ },
264
+ "post": {
265
+ "$ref": "#/definitions/operation"
266
+ },
267
+ "delete": {
268
+ "$ref": "#/definitions/operation"
269
+ },
270
+ "options": {
271
+ "$ref": "#/definitions/operation"
272
+ },
273
+ "head": {
274
+ "$ref": "#/definitions/operation"
275
+ },
276
+ "patch": {
277
+ "$ref": "#/definitions/operation"
278
+ },
279
+ "trace": {
280
+ "$ref": "#/definitions/operation"
281
+ },
282
+ "servers": {
283
+ "type": "array",
284
+ "items": {
285
+ "$ref": "#/definitions/server"
286
+ },
287
+ "uniqueItems": true
288
+ },
289
+ "parameters": {
290
+ "type": "array",
291
+ "items": {
292
+ "$ref": "#/definitions/parameterOrReference"
293
+ },
294
+ "uniqueItems": true
295
+ }
296
+ }
297
+ },
298
+ "operation": {
299
+ "type": "object",
300
+ "description": "Describes a single API operation on a path.",
301
+ "required": [
302
+ "responses"
303
+ ],
304
+ "additionalProperties": false,
305
+ "patternProperties": {
306
+ "^x-": {
307
+ "$ref": "#/definitions/specificationExtension"
308
+ }
309
+ },
310
+ "properties": {
311
+ "tags": {
312
+ "type": "array",
313
+ "items": {
314
+ "type": "string"
315
+ },
316
+ "uniqueItems": true
317
+ },
318
+ "summary": {
319
+ "type": "string"
320
+ },
321
+ "description": {
322
+ "type": "string"
323
+ },
324
+ "externalDocs": {
325
+ "$ref": "#/definitions/externalDocs"
326
+ },
327
+ "operationId": {
328
+ "type": "string"
329
+ },
330
+ "parameters": {
331
+ "type": "array",
332
+ "items": {
333
+ "$ref": "#/definitions/parameterOrReference"
334
+ },
335
+ "uniqueItems": true
336
+ },
337
+ "requestBody": {
338
+ "$ref": "#/definitions/requestBodyOrReference"
339
+ },
340
+ "responses": {
341
+ "$ref": "#/definitions/responses"
342
+ },
343
+ "callbacks": {
344
+ "$ref": "#/definitions/callbacksOrReferences"
345
+ },
346
+ "deprecated": {
347
+ "type": "boolean"
348
+ },
349
+ "security": {
350
+ "type": "array",
351
+ "items": {
352
+ "$ref": "#/definitions/securityRequirement"
353
+ },
354
+ "uniqueItems": true
355
+ },
356
+ "servers": {
357
+ "type": "array",
358
+ "items": {
359
+ "$ref": "#/definitions/server"
360
+ },
361
+ "uniqueItems": true
362
+ }
363
+ }
364
+ },
365
+ "externalDocs": {
366
+ "type": "object",
367
+ "description": "Allows referencing an external resource for extended documentation.",
368
+ "required": [
369
+ "url"
370
+ ],
371
+ "additionalProperties": false,
372
+ "patternProperties": {
373
+ "^x-": {
374
+ "$ref": "#/definitions/specificationExtension"
375
+ }
376
+ },
377
+ "properties": {
378
+ "description": {
379
+ "type": "string"
380
+ },
381
+ "url": {
382
+ "type": "string"
383
+ }
384
+ }
385
+ },
386
+ "parameter": {
387
+ "type": "object",
388
+ "description": "Describes a single operation parameter. A unique parameter is defined by a combination of a name and location.",
389
+ "required": [
390
+ "name",
391
+ "in"
392
+ ],
393
+ "additionalProperties": false,
394
+ "patternProperties": {
395
+ "^x-": {
396
+ "$ref": "#/definitions/specificationExtension"
397
+ }
398
+ },
399
+ "properties": {
400
+ "name": {
401
+ "type": "string"
402
+ },
403
+ "in": {
404
+ "type": "string"
405
+ },
406
+ "description": {
407
+ "type": "string"
408
+ },
409
+ "required": {
410
+ "type": "boolean"
411
+ },
412
+ "deprecated": {
413
+ "type": "boolean"
414
+ },
415
+ "allowEmptyValue": {
416
+ "type": "boolean"
417
+ },
418
+ "style": {
419
+ "type": "string"
420
+ },
421
+ "explode": {
422
+ "type": "boolean"
423
+ },
424
+ "allowReserved": {
425
+ "type": "boolean"
426
+ },
427
+ "schema": {
428
+ "$ref": "#/definitions/schemaOrReference"
429
+ },
430
+ "example": {
431
+ "$ref": "#/definitions/any"
432
+ },
433
+ "examples": {
434
+ "$ref": "#/definitions/examplesOrReferences"
435
+ },
436
+ "content": {
437
+ "$ref": "#/definitions/mediaTypes"
438
+ }
439
+ }
440
+ },
441
+ "requestBody": {
442
+ "type": "object",
443
+ "description": "Describes a single request body.",
444
+ "required": [
445
+ "content"
446
+ ],
447
+ "additionalProperties": false,
448
+ "patternProperties": {
449
+ "^x-": {
450
+ "$ref": "#/definitions/specificationExtension"
451
+ }
452
+ },
453
+ "properties": {
454
+ "description": {
455
+ "type": "string"
456
+ },
457
+ "content": {
458
+ "$ref": "#/definitions/mediaTypes"
459
+ },
460
+ "required": {
461
+ "type": "boolean"
462
+ }
463
+ }
464
+ },
465
+ "mediaType": {
466
+ "type": "object",
467
+ "description": "Each Media Type Object provides schema and examples for the media type identified by its key.",
468
+ "additionalProperties": false,
469
+ "patternProperties": {
470
+ "^x-": {
471
+ "$ref": "#/definitions/specificationExtension"
472
+ }
473
+ },
474
+ "properties": {
475
+ "schema": {
476
+ "$ref": "#/definitions/schemaOrReference"
477
+ },
478
+ "example": {
479
+ "$ref": "#/definitions/any"
480
+ },
481
+ "examples": {
482
+ "$ref": "#/definitions/examplesOrReferences"
483
+ },
484
+ "encoding": {
485
+ "$ref": "#/definitions/encodings"
486
+ }
487
+ }
488
+ },
489
+ "encoding": {
490
+ "type": "object",
491
+ "description": "A single encoding definition applied to a single schema property.",
492
+ "additionalProperties": false,
493
+ "patternProperties": {
494
+ "^x-": {
495
+ "$ref": "#/definitions/specificationExtension"
496
+ }
497
+ },
498
+ "properties": {
499
+ "contentType": {
500
+ "type": "string"
501
+ },
502
+ "headers": {
503
+ "$ref": "#/definitions/headersOrReferences"
504
+ },
505
+ "style": {
506
+ "type": "string"
507
+ },
508
+ "explode": {
509
+ "type": "boolean"
510
+ },
511
+ "allowReserved": {
512
+ "type": "boolean"
513
+ }
514
+ }
515
+ },
516
+ "responses": {
517
+ "type": "object",
518
+ "description": "A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call.",
519
+ "additionalProperties": false,
520
+ "patternProperties": {
521
+ "^([0-9X]{3})$": {
522
+ "$ref": "#/definitions/responseOrReference"
523
+ },
524
+ "^x-": {
525
+ "$ref": "#/definitions/specificationExtension"
526
+ }
527
+ },
528
+ "properties": {
529
+ "default": {
530
+ "$ref": "#/definitions/responseOrReference"
531
+ }
532
+ }
533
+ },
534
+ "response": {
535
+ "type": "object",
536
+ "description": "Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.",
537
+ "required": [
538
+ "description"
539
+ ],
540
+ "additionalProperties": false,
541
+ "patternProperties": {
542
+ "^x-": {
543
+ "$ref": "#/definitions/specificationExtension"
544
+ }
545
+ },
546
+ "properties": {
547
+ "description": {
548
+ "type": "string"
549
+ },
550
+ "headers": {
551
+ "$ref": "#/definitions/headersOrReferences"
552
+ },
553
+ "content": {
554
+ "$ref": "#/definitions/mediaTypes"
555
+ },
556
+ "links": {
557
+ "$ref": "#/definitions/linksOrReferences"
558
+ }
559
+ }
560
+ },
561
+ "callback": {
562
+ "type": "object",
563
+ "description": "A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.",
564
+ "additionalProperties": false,
565
+ "patternProperties": {
566
+ "^": {
567
+ "$ref": "#/definitions/pathItem"
568
+ },
569
+ "^x-": {
570
+ "$ref": "#/definitions/specificationExtension"
571
+ }
572
+ }
573
+ },
574
+ "example": {
575
+ "type": "object",
576
+ "description": "",
577
+ "additionalProperties": false,
578
+ "patternProperties": {
579
+ "^x-": {
580
+ "$ref": "#/definitions/specificationExtension"
581
+ }
582
+ },
583
+ "properties": {
584
+ "summary": {
585
+ "type": "string"
586
+ },
587
+ "description": {
588
+ "type": "string"
589
+ },
590
+ "value": {
591
+ "$ref": "#/definitions/any"
592
+ },
593
+ "externalValue": {
594
+ "type": "string"
595
+ }
596
+ }
597
+ },
598
+ "link": {
599
+ "type": "object",
600
+ "description": "The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.",
601
+ "additionalProperties": false,
602
+ "patternProperties": {
603
+ "^x-": {
604
+ "$ref": "#/definitions/specificationExtension"
605
+ }
606
+ },
607
+ "properties": {
608
+ "operationRef": {
609
+ "type": "string"
610
+ },
611
+ "operationId": {
612
+ "type": "string"
613
+ },
614
+ "parameters": {
615
+ "$ref": "#/definitions/anysOrExpressions"
616
+ },
617
+ "requestBody": {
618
+ "$ref": "#/definitions/anyOrExpression"
619
+ },
620
+ "description": {
621
+ "type": "string"
622
+ },
623
+ "server": {
624
+ "$ref": "#/definitions/server"
625
+ }
626
+ }
627
+ },
628
+ "header": {
629
+ "type": "object",
630
+ "description": "The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`).",
631
+ "additionalProperties": false,
632
+ "patternProperties": {
633
+ "^x-": {
634
+ "$ref": "#/definitions/specificationExtension"
635
+ }
636
+ },
637
+ "properties": {
638
+ "description": {
639
+ "type": "string"
640
+ },
641
+ "required": {
642
+ "type": "boolean"
643
+ },
644
+ "deprecated": {
645
+ "type": "boolean"
646
+ },
647
+ "allowEmptyValue": {
648
+ "type": "boolean"
649
+ },
650
+ "style": {
651
+ "type": "string"
652
+ },
653
+ "explode": {
654
+ "type": "boolean"
655
+ },
656
+ "allowReserved": {
657
+ "type": "boolean"
658
+ },
659
+ "schema": {
660
+ "$ref": "#/definitions/schemaOrReference"
661
+ },
662
+ "example": {
663
+ "$ref": "#/definitions/any"
664
+ },
665
+ "examples": {
666
+ "$ref": "#/definitions/examplesOrReferences"
667
+ },
668
+ "content": {
669
+ "$ref": "#/definitions/mediaTypes"
670
+ }
671
+ }
672
+ },
673
+ "tag": {
674
+ "type": "object",
675
+ "description": "Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.",
676
+ "required": [
677
+ "name"
678
+ ],
679
+ "additionalProperties": false,
680
+ "patternProperties": {
681
+ "^x-": {
682
+ "$ref": "#/definitions/specificationExtension"
683
+ }
684
+ },
685
+ "properties": {
686
+ "name": {
687
+ "type": "string"
688
+ },
689
+ "description": {
690
+ "type": "string"
691
+ },
692
+ "externalDocs": {
693
+ "$ref": "#/definitions/externalDocs"
694
+ }
695
+ }
696
+ },
697
+ "reference": {
698
+ "type": "object",
699
+ "description": "A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.",
700
+ "required": [
701
+ "$ref"
702
+ ],
703
+ "additionalProperties": false,
704
+ "properties": {
705
+ "$ref": {
706
+ "type": "string"
707
+ }
708
+ }
709
+ },
710
+ "schema": {
711
+ "type": "object",
712
+ "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.",
713
+ "additionalProperties": false,
714
+ "patternProperties": {
715
+ "^x-": {
716
+ "$ref": "#/definitions/specificationExtension"
717
+ }
718
+ },
719
+ "properties": {
720
+ "nullable": {
721
+ "type": "boolean"
722
+ },
723
+ "discriminator": {
724
+ "$ref": "#/definitions/discriminator"
725
+ },
726
+ "readOnly": {
727
+ "type": "boolean"
728
+ },
729
+ "writeOnly": {
730
+ "type": "boolean"
731
+ },
732
+ "xml": {
733
+ "$ref": "#/definitions/xml"
734
+ },
735
+ "externalDocs": {
736
+ "$ref": "#/definitions/externalDocs"
737
+ },
738
+ "example": {
739
+ "$ref": "#/definitions/any"
740
+ },
741
+ "deprecated": {
742
+ "type": "boolean"
743
+ },
744
+ "title": {
745
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
746
+ },
747
+ "multipleOf": {
748
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
749
+ },
750
+ "maximum": {
751
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
752
+ },
753
+ "exclusiveMaximum": {
754
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
755
+ },
756
+ "minimum": {
757
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
758
+ },
759
+ "exclusiveMinimum": {
760
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
761
+ },
762
+ "maxLength": {
763
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maxLength"
764
+ },
765
+ "minLength": {
766
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minLength"
767
+ },
768
+ "pattern": {
769
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
770
+ },
771
+ "maxItems": {
772
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maxItems"
773
+ },
774
+ "minItems": {
775
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minItems"
776
+ },
777
+ "uniqueItems": {
778
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
779
+ },
780
+ "maxProperties": {
781
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maxProperties"
782
+ },
783
+ "minProperties": {
784
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minProperties"
785
+ },
786
+ "required": {
787
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/required"
788
+ },
789
+ "enum": {
790
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
791
+ },
792
+ "type": {
793
+ "type": "string"
794
+ },
795
+ "allOf": {
796
+ "type": "array",
797
+ "items": {
798
+ "$ref": "#/definitions/schemaOrReference"
799
+ },
800
+ "minItems": 1
801
+ },
802
+ "oneOf": {
803
+ "type": "array",
804
+ "items": {
805
+ "$ref": "#/definitions/schemaOrReference"
806
+ },
807
+ "minItems": 1
808
+ },
809
+ "anyOf": {
810
+ "type": "array",
811
+ "items": {
812
+ "$ref": "#/definitions/schemaOrReference"
813
+ },
814
+ "minItems": 1
815
+ },
816
+ "not": {
817
+ "$ref": "#/definitions/schema"
818
+ },
819
+ "items": {
820
+ "anyOf": [
821
+ {
822
+ "$ref": "#/definitions/schemaOrReference"
823
+ },
824
+ {
825
+ "type": "array",
826
+ "items": {
827
+ "$ref": "#/definitions/schemaOrReference"
828
+ },
829
+ "minItems": 1
830
+ }
831
+ ]
832
+ },
833
+ "properties": {
834
+ "type": "object",
835
+ "additionalProperties": {
836
+ "$ref": "#/definitions/schemaOrReference"
837
+ }
838
+ },
839
+ "additionalProperties": {
840
+ "oneOf": [
841
+ {
842
+ "$ref": "#/definitions/schemaOrReference"
843
+ },
844
+ {
845
+ "type": "boolean"
846
+ }
847
+ ]
848
+ },
849
+ "default": {
850
+ "$ref": "#/definitions/defaultType"
851
+ },
852
+ "description": {
853
+ "type": "string"
854
+ },
855
+ "format": {
856
+ "type": "string"
857
+ }
858
+ }
859
+ },
860
+ "discriminator": {
861
+ "type": "object",
862
+ "description": "When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered.",
863
+ "required": [
864
+ "propertyName"
865
+ ],
866
+ "additionalProperties": false,
867
+ "properties": {
868
+ "propertyName": {
869
+ "type": "string"
870
+ },
871
+ "mapping": {
872
+ "$ref": "#/definitions/strings"
873
+ }
874
+ }
875
+ },
876
+ "xml": {
877
+ "type": "object",
878
+ "description": "A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.",
879
+ "additionalProperties": false,
880
+ "patternProperties": {
881
+ "^x-": {
882
+ "$ref": "#/definitions/specificationExtension"
883
+ }
884
+ },
885
+ "properties": {
886
+ "name": {
887
+ "type": "string"
888
+ },
889
+ "namespace": {
890
+ "type": "string"
891
+ },
892
+ "prefix": {
893
+ "type": "string"
894
+ },
895
+ "attribute": {
896
+ "type": "boolean"
897
+ },
898
+ "wrapped": {
899
+ "type": "boolean"
900
+ }
901
+ }
902
+ },
903
+ "securityScheme": {
904
+ "type": "object",
905
+ "description": "Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery.",
906
+ "required": [
907
+ "type"
908
+ ],
909
+ "additionalProperties": false,
910
+ "patternProperties": {
911
+ "^x-": {
912
+ "$ref": "#/definitions/specificationExtension"
913
+ }
914
+ },
915
+ "properties": {
916
+ "type": {
917
+ "type": "string"
918
+ },
919
+ "description": {
920
+ "type": "string"
921
+ },
922
+ "name": {
923
+ "type": "string"
924
+ },
925
+ "in": {
926
+ "type": "string"
927
+ },
928
+ "scheme": {
929
+ "type": "string"
930
+ },
931
+ "bearerFormat": {
932
+ "type": "string"
933
+ },
934
+ "flows": {
935
+ "$ref": "#/definitions/oauthFlows"
936
+ },
937
+ "openIdConnectUrl": {
938
+ "type": "string"
939
+ }
940
+ }
941
+ },
942
+ "oauthFlows": {
943
+ "type": "object",
944
+ "description": "Allows configuration of the supported OAuth Flows.",
945
+ "additionalProperties": false,
946
+ "patternProperties": {
947
+ "^x-": {
948
+ "$ref": "#/definitions/specificationExtension"
949
+ }
950
+ },
951
+ "properties": {
952
+ "implicit": {
953
+ "$ref": "#/definitions/oauthFlow"
954
+ },
955
+ "password": {
956
+ "$ref": "#/definitions/oauthFlow"
957
+ },
958
+ "clientCredentials": {
959
+ "$ref": "#/definitions/oauthFlow"
960
+ },
961
+ "authorizationCode": {
962
+ "$ref": "#/definitions/oauthFlow"
963
+ }
964
+ }
965
+ },
966
+ "oauthFlow": {
967
+ "type": "object",
968
+ "description": "Configuration details for a supported OAuth Flow",
969
+ "additionalProperties": false,
970
+ "patternProperties": {
971
+ "^x-": {
972
+ "$ref": "#/definitions/specificationExtension"
973
+ }
974
+ },
975
+ "properties": {
976
+ "authorizationUrl": {
977
+ "type": "string"
978
+ },
979
+ "tokenUrl": {
980
+ "type": "string"
981
+ },
982
+ "refreshUrl": {
983
+ "type": "string"
984
+ },
985
+ "scopes": {
986
+ "$ref": "#/definitions/strings"
987
+ }
988
+ }
989
+ },
990
+ "securityRequirement": {
991
+ "type": "object",
992
+ "description": "Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request.",
993
+ "additionalProperties": false,
994
+ "patternProperties": {
995
+ "^[a-zA-Z0-9\\.\\-_]+$": {
996
+ "type": "array",
997
+ "items": {
998
+ "type": "string"
999
+ },
1000
+ "uniqueItems": true
1001
+ }
1002
+ }
1003
+ },
1004
+ "anyOrExpression": {
1005
+ "oneOf": [
1006
+ {
1007
+ "$ref": "#/definitions/any"
1008
+ },
1009
+ {
1010
+ "$ref": "#/definitions/expression"
1011
+ }
1012
+ ]
1013
+ },
1014
+ "callbackOrReference": {
1015
+ "oneOf": [
1016
+ {
1017
+ "$ref": "#/definitions/callback"
1018
+ },
1019
+ {
1020
+ "$ref": "#/definitions/reference"
1021
+ }
1022
+ ]
1023
+ },
1024
+ "exampleOrReference": {
1025
+ "oneOf": [
1026
+ {
1027
+ "$ref": "#/definitions/example"
1028
+ },
1029
+ {
1030
+ "$ref": "#/definitions/reference"
1031
+ }
1032
+ ]
1033
+ },
1034
+ "headerOrReference": {
1035
+ "oneOf": [
1036
+ {
1037
+ "$ref": "#/definitions/header"
1038
+ },
1039
+ {
1040
+ "$ref": "#/definitions/reference"
1041
+ }
1042
+ ]
1043
+ },
1044
+ "linkOrReference": {
1045
+ "oneOf": [
1046
+ {
1047
+ "$ref": "#/definitions/link"
1048
+ },
1049
+ {
1050
+ "$ref": "#/definitions/reference"
1051
+ }
1052
+ ]
1053
+ },
1054
+ "parameterOrReference": {
1055
+ "oneOf": [
1056
+ {
1057
+ "$ref": "#/definitions/parameter"
1058
+ },
1059
+ {
1060
+ "$ref": "#/definitions/reference"
1061
+ }
1062
+ ]
1063
+ },
1064
+ "requestBodyOrReference": {
1065
+ "oneOf": [
1066
+ {
1067
+ "$ref": "#/definitions/requestBody"
1068
+ },
1069
+ {
1070
+ "$ref": "#/definitions/reference"
1071
+ }
1072
+ ]
1073
+ },
1074
+ "responseOrReference": {
1075
+ "oneOf": [
1076
+ {
1077
+ "$ref": "#/definitions/response"
1078
+ },
1079
+ {
1080
+ "$ref": "#/definitions/reference"
1081
+ }
1082
+ ]
1083
+ },
1084
+ "schemaOrReference": {
1085
+ "oneOf": [
1086
+ {
1087
+ "$ref": "#/definitions/schema"
1088
+ },
1089
+ {
1090
+ "$ref": "#/definitions/reference"
1091
+ }
1092
+ ]
1093
+ },
1094
+ "securitySchemeOrReference": {
1095
+ "oneOf": [
1096
+ {
1097
+ "$ref": "#/definitions/securityScheme"
1098
+ },
1099
+ {
1100
+ "$ref": "#/definitions/reference"
1101
+ }
1102
+ ]
1103
+ },
1104
+ "anysOrExpressions": {
1105
+ "type": "object",
1106
+ "additionalProperties": {
1107
+ "$ref": "#/definitions/anyOrExpression"
1108
+ }
1109
+ },
1110
+ "callbacksOrReferences": {
1111
+ "type": "object",
1112
+ "additionalProperties": {
1113
+ "$ref": "#/definitions/callbackOrReference"
1114
+ }
1115
+ },
1116
+ "encodings": {
1117
+ "type": "object",
1118
+ "additionalProperties": {
1119
+ "$ref": "#/definitions/encoding"
1120
+ }
1121
+ },
1122
+ "examplesOrReferences": {
1123
+ "type": "object",
1124
+ "additionalProperties": {
1125
+ "$ref": "#/definitions/exampleOrReference"
1126
+ }
1127
+ },
1128
+ "headersOrReferences": {
1129
+ "type": "object",
1130
+ "additionalProperties": {
1131
+ "$ref": "#/definitions/headerOrReference"
1132
+ }
1133
+ },
1134
+ "linksOrReferences": {
1135
+ "type": "object",
1136
+ "additionalProperties": {
1137
+ "$ref": "#/definitions/linkOrReference"
1138
+ }
1139
+ },
1140
+ "mediaTypes": {
1141
+ "type": "object",
1142
+ "additionalProperties": {
1143
+ "$ref": "#/definitions/mediaType"
1144
+ }
1145
+ },
1146
+ "parametersOrReferences": {
1147
+ "type": "object",
1148
+ "additionalProperties": {
1149
+ "$ref": "#/definitions/parameterOrReference"
1150
+ }
1151
+ },
1152
+ "requestBodiesOrReferences": {
1153
+ "type": "object",
1154
+ "additionalProperties": {
1155
+ "$ref": "#/definitions/requestBodyOrReference"
1156
+ }
1157
+ },
1158
+ "responsesOrReferences": {
1159
+ "type": "object",
1160
+ "additionalProperties": {
1161
+ "$ref": "#/definitions/responseOrReference"
1162
+ }
1163
+ },
1164
+ "schemasOrReferences": {
1165
+ "type": "object",
1166
+ "additionalProperties": {
1167
+ "$ref": "#/definitions/schemaOrReference"
1168
+ }
1169
+ },
1170
+ "securitySchemesOrReferences": {
1171
+ "type": "object",
1172
+ "additionalProperties": {
1173
+ "$ref": "#/definitions/securitySchemeOrReference"
1174
+ }
1175
+ },
1176
+ "serverVariables": {
1177
+ "type": "object",
1178
+ "additionalProperties": {
1179
+ "$ref": "#/definitions/serverVariable"
1180
+ }
1181
+ },
1182
+ "strings": {
1183
+ "type": "object",
1184
+ "additionalProperties": {
1185
+ "type": "string"
1186
+ }
1187
+ },
1188
+ "object": {
1189
+ "type": "object",
1190
+ "additionalProperties": true
1191
+ },
1192
+ "any": {
1193
+ "additionalProperties": true
1194
+ },
1195
+ "expression": {
1196
+ "type": "object",
1197
+ "additionalProperties": true
1198
+ },
1199
+ "specificationExtension": {
1200
+ "description": "Any property starting with x- is valid.",
1201
+ "oneOf": [
1202
+ {
1203
+ "type": "null"
1204
+ },
1205
+ {
1206
+ "type": "number"
1207
+ },
1208
+ {
1209
+ "type": "boolean"
1210
+ },
1211
+ {
1212
+ "type": "string"
1213
+ },
1214
+ {
1215
+ "type": "object"
1216
+ },
1217
+ {
1218
+ "type": "array"
1219
+ }
1220
+ ]
1221
+ },
1222
+ "defaultType": {
1223
+ "oneOf": [
1224
+ {
1225
+ "type": "null"
1226
+ },
1227
+ {
1228
+ "type": "array"
1229
+ },
1230
+ {
1231
+ "type": "object"
1232
+ },
1233
+ {
1234
+ "type": "number"
1235
+ },
1236
+ {
1237
+ "type": "boolean"
1238
+ },
1239
+ {
1240
+ "type": "string"
1241
+ }
1242
+ ]
1243
+ }
1244
+ }
1245
+ }