scorpio 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71c5dc59455a36015512d141156a3fde31869546
4
- data.tar.gz: 0bce95f243957bd15832951224417510d7925f9b
3
+ metadata.gz: fef9d45f74d30432978fa58501add04b3fc60226
4
+ data.tar.gz: 2e8c5c985076afe3da550d1a8e1fe4c19a6f3b5d
5
5
  SHA512:
6
- metadata.gz: 1c26985aac4d77d19bb97010ada163f50d5107710e20ffc076d8379bd6999d34e3de8b0c0782af5fe481b7faa847203424a4ad0ebc6c133844ee5cc1fcd712d1
7
- data.tar.gz: 233edb5d4346b6cef88e0502aef2398850c657deb22055c6c142aaf6f5797608d79470e64e3ea140177220a7cf58001a725f15880cf8accff3dbfc3ae59d0d3a
6
+ metadata.gz: 8f1b1ff00e8c06761980421abb2c15b7bfc6584ab8db1e4fe4dc8159817d3a2ac827eca12e374c6851817b72d4b40e02b5577f164dc6e36a8514f4e5d69a86c3
7
+ data.tar.gz: c23470636bd6456a1d8bd23c469e4b6595c070b317fda0579a439b591077319471aa57daf12390bf81336a1a4068bb90c8f5ba09cc2f3ac3830c7f97ca6a1de2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ # v0.2.0
2
+
1
3
  # v0.1.0
2
4
 
3
5
  - Rewrite Model, use OpenAPI
data/README.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # Scorpio
2
2
 
3
- Scorpio is a library intended to make use of an OpenAPI document describing a service you are consuming or implementing, for various purposes.
3
+ [![Build Status](https://travis-ci.org/notEthan/scorpio.svg?branch=master)](https://travis-ci.org/notEthan/scorpio)
4
+ [![Coverage Status](https://coveralls.io/repos/github/notEthan/scorpio/badge.svg)](https://coveralls.io/github/notEthan/scorpio)
5
+
6
+ Scorpio is a library that helps you, as a client, consume an HTTP service described by an OpenAPI document. You provide the OpenAPI specification, a little bit of configuration, and Scorpio will take that and dynamically generate an interface for you to call the service's operations and interact with its resources as an ORM.
7
+
8
+ Note: The canonical location of this README is on [RubyDoc](http://rubydoc.info/gems/scorpio/). When viewed on [Github](https://github.com/notEthan/scorpio/), it may be inconsistent with the latest released gem, and Yardoc links will not work.
4
9
 
5
10
  ## Background
6
11
 
7
- To start with, you need an OpenAPI v2 (formerly known as Swagger) document describing a service. v3 support is planned. This document can be written by hand or sometimes generated from other existing sources. The creation of an OpenAPI document specifying your service is outside the scope of Scorpio. Here are several resources on OpenAPI:
12
+ To start with, you need an OpenAPI v2 (formerly known as Swagger) document describing a service you will be consuming. v3 support is planned. This document can be written by hand or sometimes generated from other existing sources. The creation of an OpenAPI document specifying your service is outside the scope of Scorpio. Here are several resources on OpenAPI:
8
13
 
9
14
  - [OpenAPI Specification at Wikipedia](https://en.wikipedia.org/wiki/OpenAPI_Specification)
10
15
  - [OpenAPI Initiative](https://www.openapis.org/) is the official web site for OpenAPI
@@ -13,48 +18,126 @@ To start with, you need an OpenAPI v2 (formerly known as Swagger) document descr
13
18
 
14
19
  OpenAPI relies on the definition of schemas using the JSON schema specification, which can be learned about at http://json-schema.org/
15
20
 
16
- ## Scorpio::Model
21
+ Once you have the OpenAPI document describing the service you will consume, you can get started implementing the code that will interact with that service.
17
22
 
18
- Scorpio::Model aims to represent RESTful resources in ruby classes with as little code as possible, given a service with a properly constructed API specification.
23
+ ## Pet Store
19
24
 
20
- A model representing a resource needs to be configured, minimally, with:
25
+ Let's dive into some code, shall we? If you have learned about OpenAPI, you likely learned using the example of the Pet Store service. This README will use the same service. Its documentation is at http://petstore.swagger.io/ and its OpenAPI 2 specification is at http://petstore.swagger.io/v2/swagger.json (yaml version: http://petstore.swagger.io/v2/swagger.yaml )
21
26
 
22
- - the OpenAPI specification for the REST API
23
- - the base URL where the service is deployed, relative to which are the paths of the API description
24
- - the schema(s) the model represents
27
+ Using the specification, we can start interacting with the pet store with very little code. Here is that code, with explanations of each part in the comments.
25
28
 
26
- If the resource has HTTP methods associated with it (most, but not all resources will):
29
+ ```ruby
30
+ require 'scorpio'
31
+ # PetStore is a module to contain our pet store related classes.
32
+ # it is optional - your naming conventions are your own.
33
+ module PetStore
34
+ # Scorpio's recommended structure is to have a base class which inherits from
35
+ # Scorpio::ResourceBase to represent the Pet Store and all its resources.
36
+ #
37
+ # you configure the openapi document and other shared configuration on this class.
38
+ class Resource < Scorpio::ResourceBase
39
+ # set the openapi document. you'll usually want this to be a file in your local filesystem
40
+ # (making network calls at application boot time is usually a bad idea), but for this
41
+ # example we will do a quick-and-dirty http get.
42
+ require 'json'
43
+ self.openapi_document = JSON.parse(Faraday.get('http://petstore.swagger.io/v2/swagger.json').body)
44
+ end
45
+
46
+ # a Pet is a resource of the pet store, so inherits from PetStore::Resource
47
+ class Pet < Resource
48
+ # setting the tag name tells Scorpio to associate operations tagged with 'pet' with this
49
+ # class and its instances. this lets you call operations such as addPet, updatePet, etc.
50
+ self.tag_name = 'pet'
51
+
52
+ # setting the schemas which represent a Pet will let scorpio return results from operation
53
+ # calls properly instantiated as Pet instances. for example, calling getPetById will return
54
+ # a PetStore::Pet instance since its success response refers to #/definitions/Pet.
55
+ #
56
+ # this works for nested structures as well, e.g. findPetsByStatus returns an array of
57
+ # #/definitions/Pet and likewise Scorpio will return an array of PetStore::Pet instances.
58
+ #
59
+ # this also adds accessors for properties of the schema - in this case #id, #name, #tags, etc.
60
+ self.represented_schemas = [openapi_document.definitions['Pet']]
61
+ end
62
+ end
63
+ ```
27
64
 
28
- - the name of the resource corresponding to the model
65
+ That should be all you need to start calling operations:
29
66
 
30
- When these are set, Scorpio::Model looks through the API description and dynamically sets up methods for the model:
67
+ ```ruby
68
+ # call the operation findPetsByStatus: http://petstore.swagger.io/#/pet/findPetsByStatus
69
+ sold_pets = PetStore::Pet.findPetsByStatus(status: 'sold')
70
+ # sold_pets is an array-like collection of PetStore::Pet instances
71
+
72
+ # compare to getPetById: http://petstore.swagger.io/#/pet/getPetById
73
+ pet1 = sold_pets.last
74
+ pet2 = PetStore::Pet.getPetById(petId: pet1['id'])
75
+ # pet2 is the same pet as pet1, retrieved using the getPetById operation
76
+
77
+ pet1 == pet2
78
+ # should return true. they are the same pet.
79
+
80
+ pet1.tags.map(&:name)
81
+ # note that you have accessors on PetStore::Pet like #tags, and also that
82
+ # tags have accessors for properties 'name' and 'id' from the tags schema
83
+ # (your tag names will be different depending on what's in the pet store)
84
+ # => ["aucune"]
85
+
86
+ # let's name the pet after ourself
87
+ pet1.name = ENV['USER']
88
+
89
+ # store the result in the pet store. note the updatePet call from the instance - our
90
+ # calls so far have been on the class PetStore::Pet, but scorpio defines instance
91
+ # methods to call operations where appropriate as well.
92
+ # updatePet: http://petstore.swagger.io/#/pet/updatePet
93
+ pet1.updatePet
94
+
95
+ # check that it was saved
96
+ PetStore::Pet.getPetById(petId: pet1['id']).name
97
+ # => "ethan" (unless for some reason your name is not Ethan)
98
+
99
+ # here is how errors are handled:
100
+ PetStore::Pet.getPetById(petId: 0)
101
+ # raises: Scorpio::HTTPErrors::NotFound404Error
102
+ # Error calling operation getPetById on PetStore::Pet:
103
+ # {"code":1,"type":"error","message":"Pet not found"}
104
+ ```
31
105
 
32
- - accessors for properties of the model defined as properties of schemas representing the resource in the specification
33
- - API method calls on the model class and, where appropriate, on the model instance
106
+ Isn't that cool? You get class methods like getPetById, instance methods like updatePet, attribute accessors like #name and #tags, all dynamically generated from the OpenAPI description. You just make a few classes with a line or two of configuration in each.
107
+
108
+ ### Another Example: Blog
34
109
 
35
- ### Example: Blog
110
+ For another example of an API that a client interacts with using Scorpio::ResourceBase, Scorpio's tests implement the Blog service. This is defined in test/blog.rb. The service uses ActiveRecord models and Sinatra to make a simple RESTful service.
36
111
 
37
- Scorpio's tests are a good place to read example code of an API that a client interacts with using Scorpio::Model.
112
+ Its API is described in `test/blog.openapi.yml`, defining the Article resource, several operations, and schemas. The client is set up in `test/blog_scorpio_models.rb`. The base class BlogModel defines the base_url and the api description, as well as some other optional setup done for testing. Its operations are tested in `test/scorpio_test.rb`.
38
113
 
39
- The Blog service is defined in test/blog.rb. It uses ActiveRecord models and Sinatra to make a simple RESTful service.
114
+ ## Scorpio::ResourceBase
40
115
 
41
- Its API is described in `test/blog.openapi.yml`, defining the Article resource, several methods (some of which are instance methods), and schemas.
116
+ Scorpio::ResourceBase is the main class used in abstracting on OpenAPI document. Scorpio::ResourceBase aims to represent RESTful resources in ruby classes with as little code as possible, given a service with a properly constructed OpenAPI specification.
42
117
 
43
- The client is set up in `test/blog_scorpio_models.rb`. The base class BlogModel defines the base_url and the api description, as well as some other optional setup done for testing.
118
+ A class which subclasses Scorpio::ResourceBase directly (such as PetStore::Resource above) should generally represent the whole API - you set the openapi_document and other configuration on this class. As such, it is generally not instantiated. Its subclasses, representing resources with a tag or with schema definitions in the OpenAPI document, are what you mostly instantiate and interact with.
44
119
 
45
- The Article model inherits from BlogModel and is set with its resource name and the keys of its schema in the API description.
120
+ A model representing a resource needs to be configured, minimally, with:
121
+
122
+ - the OpenAPI specification for the REST API
123
+ - the schemas that represent instances of the model, if any
46
124
 
47
- Based on those, Article gets the methods of the API description which are tested in `test/scorpio_test.rb`.
125
+ If the resource has HTTP operations associated with it (most, but not all resources will):
48
126
 
49
- [This section will be fleshed out with more description and less just telling you, dear reader, to read the test code, as development progresses.]
127
+ - a tag name identifying its tagged operations
128
+
129
+ When these are set, Scorpio::ResourceBase looks through the API description and dynamically sets up methods for the model:
130
+
131
+ - accessors for properties of the model defined as properties of schemas representing the resource in the specification
132
+ - API method calls on the model class and, where appropriate, on the model instance
50
133
 
51
- ### Scorpio Model pickle adapter
134
+ ### Scorpio ResourceBase pickle adapter
52
135
 
53
136
  Scorpio provides a pickle adapter to use models with [Pickle](https://rubygems.org/gems/pickle). `require 'scorpio/pickle_adapter'`, ensure that the pickle ORM adapter is enabled, and you should be able to create models as normal with pickle.
54
137
 
55
138
  ### Google API discovery service
56
139
 
57
- An initial implementation of Scorpio::Model was based on the format defined for Google's API discovery service.
140
+ An initial implementation of Scorpio::ResourceBase was based on the format defined for Google's API discovery service.
58
141
 
59
142
  For background on the Google discovery service and the API description format it defines, see:
60
143
 
@@ -64,10 +147,10 @@ For background on the Google discovery service and the API description format it
64
147
  This format is still supported indirectly, by converting from a Google API document to OpenAPI using `Scorpio::Google::RestDescription#to_openapi_document`. Example conversion looks like:
65
148
 
66
149
  ```ruby
67
- class MyModel < Scorpio::Model
150
+ class MyModel < Scorpio::ResourceBase
68
151
  rest_description_doc = YAML.load_file('path/to/doc.yml')
69
152
  rest_description = Scorpio::Google::RestDescription.new(rest_description_doc)
70
- set_openapi_document(rest_description.to_openapi_document)
153
+ self.openapi_document = rest_description.to_openapi_document
71
154
 
72
155
  # ... the remainder of your setup and model code here
73
156
  end
data/Rakefile CHANGED
@@ -1,4 +1,3 @@
1
- require "bundler/gem_tasks"
2
1
  require "rake/testtask"
3
2
 
4
3
  Rake::TestTask.new(:test) do |t|
@@ -7,4 +6,5 @@ Rake::TestTask.new(:test) do |t|
7
6
  t.test_files = FileList['test/**/*_test.rb']
8
7
  end
9
8
 
10
- task :default => :test
9
+ require 'wwtd/tasks'
10
+ task 'default' => 'wwtd'
@@ -0,0 +1,1239 @@
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
+ "examples": {
698
+ "type": "object",
699
+ "description": "",
700
+ "additionalProperties": false
701
+ },
702
+ "reference": {
703
+ "type": "object",
704
+ "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.",
705
+ "required": [
706
+ "$ref"
707
+ ],
708
+ "additionalProperties": false,
709
+ "properties": {
710
+ "$ref": {
711
+ "type": "string"
712
+ }
713
+ }
714
+ },
715
+ "schema": {
716
+ "type": "object",
717
+ "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.",
718
+ "additionalProperties": false,
719
+ "patternProperties": {
720
+ "^x-": {
721
+ "$ref": "#/definitions/specificationExtension"
722
+ }
723
+ },
724
+ "properties": {
725
+ "nullable": {
726
+ "type": "boolean"
727
+ },
728
+ "discriminator": {
729
+ "$ref": "#/definitions/discriminator"
730
+ },
731
+ "readOnly": {
732
+ "type": "boolean"
733
+ },
734
+ "writeOnly": {
735
+ "type": "boolean"
736
+ },
737
+ "xml": {
738
+ "$ref": "#/definitions/xml"
739
+ },
740
+ "externalDocs": {
741
+ "$ref": "#/definitions/externalDocs"
742
+ },
743
+ "example": {
744
+ "$ref": "#/definitions/any"
745
+ },
746
+ "deprecated": {
747
+ "type": "boolean"
748
+ },
749
+ "title": {
750
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
751
+ },
752
+ "multipleOf": {
753
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
754
+ },
755
+ "maximum": {
756
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
757
+ },
758
+ "exclusiveMaximum": {
759
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
760
+ },
761
+ "minimum": {
762
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
763
+ },
764
+ "exclusiveMinimum": {
765
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
766
+ },
767
+ "maxLength": {
768
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maxLength"
769
+ },
770
+ "minLength": {
771
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minLength"
772
+ },
773
+ "pattern": {
774
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
775
+ },
776
+ "maxItems": {
777
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maxItems"
778
+ },
779
+ "minItems": {
780
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minItems"
781
+ },
782
+ "uniqueItems": {
783
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
784
+ },
785
+ "maxProperties": {
786
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maxProperties"
787
+ },
788
+ "minProperties": {
789
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minProperties"
790
+ },
791
+ "required": {
792
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/required"
793
+ },
794
+ "enum": {
795
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
796
+ },
797
+ "type": {
798
+ "type": "string"
799
+ },
800
+ "allOf": {
801
+ "type": "array",
802
+ "items": {
803
+ "$ref": "#/definitions/schemaOrReference"
804
+ },
805
+ "minItems": 1
806
+ },
807
+ "oneOf": {
808
+ "type": "array",
809
+ "items": {
810
+ "$ref": "#/definitions/schemaOrReference"
811
+ },
812
+ "minItems": 1
813
+ },
814
+ "anyOf": {
815
+ "type": "array",
816
+ "items": {
817
+ "$ref": "#/definitions/schemaOrReference"
818
+ },
819
+ "minItems": 1
820
+ },
821
+ "not": {
822
+ "$ref": "#/definitions/schema"
823
+ },
824
+ "items": {
825
+ "$ref": "#/definitions/schemaOrReference"
826
+ },
827
+ "properties": {
828
+ "type": "object",
829
+ "additionalProperties": {
830
+ "$ref": "#/definitions/schemaOrReference"
831
+ }
832
+ },
833
+ "additionalProperties": {
834
+ "oneOf": [
835
+ {
836
+ "$ref": "#/definitions/schemaOrReference"
837
+ },
838
+ {
839
+ "type": "boolean"
840
+ }
841
+ ]
842
+ },
843
+ "default": {
844
+ "$ref": "#/definitions/defaultType"
845
+ },
846
+ "description": {
847
+ "type": "string"
848
+ },
849
+ "format": {
850
+ "type": "string"
851
+ }
852
+ }
853
+ },
854
+ "discriminator": {
855
+ "type": "object",
856
+ "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.",
857
+ "required": [
858
+ "propertyName"
859
+ ],
860
+ "additionalProperties": false,
861
+ "properties": {
862
+ "propertyName": {
863
+ "type": "string"
864
+ },
865
+ "mapping": {
866
+ "$ref": "#/definitions/strings"
867
+ }
868
+ }
869
+ },
870
+ "xml": {
871
+ "type": "object",
872
+ "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.",
873
+ "additionalProperties": false,
874
+ "patternProperties": {
875
+ "^x-": {
876
+ "$ref": "#/definitions/specificationExtension"
877
+ }
878
+ },
879
+ "properties": {
880
+ "name": {
881
+ "type": "string"
882
+ },
883
+ "namespace": {
884
+ "type": "string"
885
+ },
886
+ "prefix": {
887
+ "type": "string"
888
+ },
889
+ "attribute": {
890
+ "type": "boolean"
891
+ },
892
+ "wrapped": {
893
+ "type": "boolean"
894
+ }
895
+ }
896
+ },
897
+ "securityScheme": {
898
+ "type": "object",
899
+ "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.",
900
+ "required": [
901
+ "type"
902
+ ],
903
+ "additionalProperties": false,
904
+ "patternProperties": {
905
+ "^x-": {
906
+ "$ref": "#/definitions/specificationExtension"
907
+ }
908
+ },
909
+ "properties": {
910
+ "type": {
911
+ "type": "string"
912
+ },
913
+ "description": {
914
+ "type": "string"
915
+ },
916
+ "name": {
917
+ "type": "string"
918
+ },
919
+ "in": {
920
+ "type": "string"
921
+ },
922
+ "scheme": {
923
+ "type": "string"
924
+ },
925
+ "bearerFormat": {
926
+ "type": "string"
927
+ },
928
+ "flows": {
929
+ "$ref": "#/definitions/oauthFlows"
930
+ },
931
+ "openIdConnectUrl": {
932
+ "type": "string"
933
+ }
934
+ }
935
+ },
936
+ "oauthFlows": {
937
+ "type": "object",
938
+ "description": "Allows configuration of the supported OAuth Flows.",
939
+ "additionalProperties": false,
940
+ "patternProperties": {
941
+ "^x-": {
942
+ "$ref": "#/definitions/specificationExtension"
943
+ }
944
+ },
945
+ "properties": {
946
+ "implicit": {
947
+ "$ref": "#/definitions/oauthFlow"
948
+ },
949
+ "password": {
950
+ "$ref": "#/definitions/oauthFlow"
951
+ },
952
+ "clientCredentials": {
953
+ "$ref": "#/definitions/oauthFlow"
954
+ },
955
+ "authorizationCode": {
956
+ "$ref": "#/definitions/oauthFlow"
957
+ }
958
+ }
959
+ },
960
+ "oauthFlow": {
961
+ "type": "object",
962
+ "description": "Configuration details for a supported OAuth Flow",
963
+ "additionalProperties": false,
964
+ "patternProperties": {
965
+ "^x-": {
966
+ "$ref": "#/definitions/specificationExtension"
967
+ }
968
+ },
969
+ "properties": {
970
+ "authorizationUrl": {
971
+ "type": "string"
972
+ },
973
+ "tokenUrl": {
974
+ "type": "string"
975
+ },
976
+ "refreshUrl": {
977
+ "type": "string"
978
+ },
979
+ "scopes": {
980
+ "$ref": "#/definitions/strings"
981
+ }
982
+ }
983
+ },
984
+ "securityRequirement": {
985
+ "type": "object",
986
+ "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.",
987
+ "additionalProperties": false,
988
+ "patternProperties": {
989
+ "^[a-zA-Z0-9\\.\\-_]+$": {
990
+ "type": "array",
991
+ "items": {
992
+ "type": "string"
993
+ },
994
+ "uniqueItems": true
995
+ }
996
+ }
997
+ },
998
+ "anyOrExpression": {
999
+ "oneOf": [
1000
+ {
1001
+ "$ref": "#/definitions/any"
1002
+ },
1003
+ {
1004
+ "$ref": "#/definitions/expression"
1005
+ }
1006
+ ]
1007
+ },
1008
+ "callbackOrReference": {
1009
+ "oneOf": [
1010
+ {
1011
+ "$ref": "#/definitions/callback"
1012
+ },
1013
+ {
1014
+ "$ref": "#/definitions/reference"
1015
+ }
1016
+ ]
1017
+ },
1018
+ "exampleOrReference": {
1019
+ "oneOf": [
1020
+ {
1021
+ "$ref": "#/definitions/example"
1022
+ },
1023
+ {
1024
+ "$ref": "#/definitions/reference"
1025
+ }
1026
+ ]
1027
+ },
1028
+ "headerOrReference": {
1029
+ "oneOf": [
1030
+ {
1031
+ "$ref": "#/definitions/header"
1032
+ },
1033
+ {
1034
+ "$ref": "#/definitions/reference"
1035
+ }
1036
+ ]
1037
+ },
1038
+ "linkOrReference": {
1039
+ "oneOf": [
1040
+ {
1041
+ "$ref": "#/definitions/link"
1042
+ },
1043
+ {
1044
+ "$ref": "#/definitions/reference"
1045
+ }
1046
+ ]
1047
+ },
1048
+ "parameterOrReference": {
1049
+ "oneOf": [
1050
+ {
1051
+ "$ref": "#/definitions/parameter"
1052
+ },
1053
+ {
1054
+ "$ref": "#/definitions/reference"
1055
+ }
1056
+ ]
1057
+ },
1058
+ "requestBodyOrReference": {
1059
+ "oneOf": [
1060
+ {
1061
+ "$ref": "#/definitions/requestBody"
1062
+ },
1063
+ {
1064
+ "$ref": "#/definitions/reference"
1065
+ }
1066
+ ]
1067
+ },
1068
+ "responseOrReference": {
1069
+ "oneOf": [
1070
+ {
1071
+ "$ref": "#/definitions/response"
1072
+ },
1073
+ {
1074
+ "$ref": "#/definitions/reference"
1075
+ }
1076
+ ]
1077
+ },
1078
+ "schemaOrReference": {
1079
+ "oneOf": [
1080
+ {
1081
+ "$ref": "#/definitions/schema"
1082
+ },
1083
+ {
1084
+ "$ref": "#/definitions/reference"
1085
+ }
1086
+ ]
1087
+ },
1088
+ "securitySchemeOrReference": {
1089
+ "oneOf": [
1090
+ {
1091
+ "$ref": "#/definitions/securityScheme"
1092
+ },
1093
+ {
1094
+ "$ref": "#/definitions/reference"
1095
+ }
1096
+ ]
1097
+ },
1098
+ "anysOrExpressions": {
1099
+ "type": "object",
1100
+ "additionalProperties": {
1101
+ "$ref": "#/definitions/anyOrExpression"
1102
+ }
1103
+ },
1104
+ "callbacksOrReferences": {
1105
+ "type": "object",
1106
+ "additionalProperties": {
1107
+ "$ref": "#/definitions/callbackOrReference"
1108
+ }
1109
+ },
1110
+ "encodings": {
1111
+ "type": "object",
1112
+ "additionalProperties": {
1113
+ "$ref": "#/definitions/encoding"
1114
+ }
1115
+ },
1116
+ "examplesOrReferences": {
1117
+ "type": "object",
1118
+ "additionalProperties": {
1119
+ "$ref": "#/definitions/exampleOrReference"
1120
+ }
1121
+ },
1122
+ "headersOrReferences": {
1123
+ "type": "object",
1124
+ "additionalProperties": {
1125
+ "$ref": "#/definitions/headerOrReference"
1126
+ }
1127
+ },
1128
+ "linksOrReferences": {
1129
+ "type": "object",
1130
+ "additionalProperties": {
1131
+ "$ref": "#/definitions/linkOrReference"
1132
+ }
1133
+ },
1134
+ "mediaTypes": {
1135
+ "type": "object",
1136
+ "additionalProperties": {
1137
+ "$ref": "#/definitions/mediaType"
1138
+ }
1139
+ },
1140
+ "parametersOrReferences": {
1141
+ "type": "object",
1142
+ "additionalProperties": {
1143
+ "$ref": "#/definitions/parameterOrReference"
1144
+ }
1145
+ },
1146
+ "requestBodiesOrReferences": {
1147
+ "type": "object",
1148
+ "additionalProperties": {
1149
+ "$ref": "#/definitions/requestBodyOrReference"
1150
+ }
1151
+ },
1152
+ "responsesOrReferences": {
1153
+ "type": "object",
1154
+ "additionalProperties": {
1155
+ "$ref": "#/definitions/responseOrReference"
1156
+ }
1157
+ },
1158
+ "schemasOrReferences": {
1159
+ "type": "object",
1160
+ "additionalProperties": {
1161
+ "$ref": "#/definitions/schemaOrReference"
1162
+ }
1163
+ },
1164
+ "securitySchemesOrReferences": {
1165
+ "type": "object",
1166
+ "additionalProperties": {
1167
+ "$ref": "#/definitions/securitySchemeOrReference"
1168
+ }
1169
+ },
1170
+ "serverVariables": {
1171
+ "type": "object",
1172
+ "additionalProperties": {
1173
+ "$ref": "#/definitions/serverVariable"
1174
+ }
1175
+ },
1176
+ "strings": {
1177
+ "type": "object",
1178
+ "additionalProperties": {
1179
+ "type": "string"
1180
+ }
1181
+ },
1182
+ "object": {
1183
+ "type": "object",
1184
+ "additionalProperties": true
1185
+ },
1186
+ "any": {
1187
+ "additionalProperties": true
1188
+ },
1189
+ "expression": {
1190
+ "type": "object",
1191
+ "additionalProperties": true
1192
+ },
1193
+ "specificationExtension": {
1194
+ "description": "Any property starting with x- is valid.",
1195
+ "oneOf": [
1196
+ {
1197
+ "type": "null"
1198
+ },
1199
+ {
1200
+ "type": "number"
1201
+ },
1202
+ {
1203
+ "type": "boolean"
1204
+ },
1205
+ {
1206
+ "type": "string"
1207
+ },
1208
+ {
1209
+ "type": "object"
1210
+ },
1211
+ {
1212
+ "type": "array"
1213
+ }
1214
+ ]
1215
+ },
1216
+ "defaultType": {
1217
+ "oneOf": [
1218
+ {
1219
+ "type": "null"
1220
+ },
1221
+ {
1222
+ "type": "array"
1223
+ },
1224
+ {
1225
+ "type": "object"
1226
+ },
1227
+ {
1228
+ "type": "number"
1229
+ },
1230
+ {
1231
+ "type": "boolean"
1232
+ },
1233
+ {
1234
+ "type": "string"
1235
+ }
1236
+ ]
1237
+ }
1238
+ }
1239
+ }