apipie-rails-jq 1.4.3.pre.beta.pre.jq.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/build.yml +32 -0
  3. data/.github/workflows/rubocop-challenger.yml +26 -0
  4. data/.github/workflows/rubocop.yml +18 -0
  5. data/.gitignore +16 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +132 -0
  8. data/.rubocop_todo.yml +1967 -0
  9. data/.vscode/settings.json +3 -0
  10. data/APACHE-LICENSE-2.0 +202 -0
  11. data/CHANGELOG.md +693 -0
  12. data/Gemfile +19 -0
  13. data/MIT-LICENSE +20 -0
  14. data/NOTICE +4 -0
  15. data/PROPOSAL_FOR_RESPONSE_DESCRIPTIONS.md +244 -0
  16. data/README.md +2088 -0
  17. data/Rakefile +8 -0
  18. data/apipie-rails.gemspec +44 -0
  19. data/app/controllers/apipie/apipies_controller.rb +184 -0
  20. data/app/helpers/apipie_helper.rb +10 -0
  21. data/app/public/apipie/javascripts/apipie.js +6 -0
  22. data/app/public/apipie/javascripts/bundled/bootstrap-collapse.js +167 -0
  23. data/app/public/apipie/javascripts/bundled/bootstrap.js +2280 -0
  24. data/app/public/apipie/javascripts/bundled/jquery.js +2 -0
  25. data/app/public/apipie/javascripts/bundled/prettify.js +28 -0
  26. data/app/public/apipie/stylesheets/application.css +7 -0
  27. data/app/public/apipie/stylesheets/bundled/bootstrap-responsive.min.css +9 -0
  28. data/app/public/apipie/stylesheets/bundled/bootstrap.min.css +9 -0
  29. data/app/public/apipie/stylesheets/bundled/prettify.css +30 -0
  30. data/app/views/apipie/apipies/_deprecation.html.erb +16 -0
  31. data/app/views/apipie/apipies/_disqus.html.erb +13 -0
  32. data/app/views/apipie/apipies/_errors.html.erb +23 -0
  33. data/app/views/apipie/apipies/_headers.html.erb +26 -0
  34. data/app/views/apipie/apipies/_languages.erb +6 -0
  35. data/app/views/apipie/apipies/_metadata.erb +1 -0
  36. data/app/views/apipie/apipies/_method_detail.erb +63 -0
  37. data/app/views/apipie/apipies/_params.html.erb +49 -0
  38. data/app/views/apipie/apipies/_params_plain.html.erb +21 -0
  39. data/app/views/apipie/apipies/apipie_404.html.erb +17 -0
  40. data/app/views/apipie/apipies/apipie_checksum.json.erb +1 -0
  41. data/app/views/apipie/apipies/getting_started.html.erb +6 -0
  42. data/app/views/apipie/apipies/index.html.erb +56 -0
  43. data/app/views/apipie/apipies/method.html.erb +41 -0
  44. data/app/views/apipie/apipies/plain.html.erb +77 -0
  45. data/app/views/apipie/apipies/resource.html.erb +80 -0
  46. data/app/views/apipie/apipies/static.html.erb +103 -0
  47. data/app/views/layouts/apipie/apipie.html.erb +27 -0
  48. data/config/locales/de.yml +28 -0
  49. data/config/locales/en.yml +41 -0
  50. data/config/locales/es.yml +28 -0
  51. data/config/locales/fr.yml +31 -0
  52. data/config/locales/it.yml +41 -0
  53. data/config/locales/ja.yml +31 -0
  54. data/config/locales/ko.yml +32 -0
  55. data/config/locales/pl.yml +28 -0
  56. data/config/locales/pt-BR.yml +28 -0
  57. data/config/locales/ru.yml +28 -0
  58. data/config/locales/tr.yml +28 -0
  59. data/config/locales/zh-CN.yml +28 -0
  60. data/config/locales/zh-TW.yml +28 -0
  61. data/gemfiles/Gemfile.tools +9 -0
  62. data/images/screenshot-1.png +0 -0
  63. data/images/screenshot-2.png +0 -0
  64. data/lib/apipie/apipie_module.rb +83 -0
  65. data/lib/apipie/application.rb +499 -0
  66. data/lib/apipie/configuration.rb +196 -0
  67. data/lib/apipie/core_ext/route.rb +9 -0
  68. data/lib/apipie/dsl_definition.rb +630 -0
  69. data/lib/apipie/error_description.rb +46 -0
  70. data/lib/apipie/errors.rb +86 -0
  71. data/lib/apipie/extractor/collector.rb +116 -0
  72. data/lib/apipie/extractor/recorder.rb +193 -0
  73. data/lib/apipie/extractor/writer.rb +454 -0
  74. data/lib/apipie/extractor.rb +181 -0
  75. data/lib/apipie/generator/config.rb +12 -0
  76. data/lib/apipie/generator/generator.rb +2 -0
  77. data/lib/apipie/generator/swagger/computed_interface_id.rb +23 -0
  78. data/lib/apipie/generator/swagger/config.rb +80 -0
  79. data/lib/apipie/generator/swagger/context.rb +38 -0
  80. data/lib/apipie/generator/swagger/method_description/api_decorator.rb +20 -0
  81. data/lib/apipie/generator/swagger/method_description/api_schema_service.rb +89 -0
  82. data/lib/apipie/generator/swagger/method_description/decorator.rb +22 -0
  83. data/lib/apipie/generator/swagger/method_description/parameters_service.rb +139 -0
  84. data/lib/apipie/generator/swagger/method_description/response_schema_service.rb +46 -0
  85. data/lib/apipie/generator/swagger/method_description/response_service.rb +71 -0
  86. data/lib/apipie/generator/swagger/method_description.rb +2 -0
  87. data/lib/apipie/generator/swagger/operation_id.rb +51 -0
  88. data/lib/apipie/generator/swagger/param_description/builder.rb +114 -0
  89. data/lib/apipie/generator/swagger/param_description/composite.rb +119 -0
  90. data/lib/apipie/generator/swagger/param_description/description.rb +15 -0
  91. data/lib/apipie/generator/swagger/param_description/in.rb +37 -0
  92. data/lib/apipie/generator/swagger/param_description/name.rb +18 -0
  93. data/lib/apipie/generator/swagger/param_description/path_params_composite.rb +61 -0
  94. data/lib/apipie/generator/swagger/param_description/referenced_composite.rb +36 -0
  95. data/lib/apipie/generator/swagger/param_description/type.rb +132 -0
  96. data/lib/apipie/generator/swagger/param_description.rb +18 -0
  97. data/lib/apipie/generator/swagger/path_decorator.rb +36 -0
  98. data/lib/apipie/generator/swagger/referenced_definitions.rb +17 -0
  99. data/lib/apipie/generator/swagger/resource_description_collection.rb +30 -0
  100. data/lib/apipie/generator/swagger/resource_description_composite.rb +56 -0
  101. data/lib/apipie/generator/swagger/schema.rb +63 -0
  102. data/lib/apipie/generator/swagger/swagger.rb +2 -0
  103. data/lib/apipie/generator/swagger/type.rb +16 -0
  104. data/lib/apipie/generator/swagger/type_extractor.rb +51 -0
  105. data/lib/apipie/generator/swagger/warning.rb +74 -0
  106. data/lib/apipie/generator/swagger/warning_writer.rb +54 -0
  107. data/lib/apipie/helpers.rb +73 -0
  108. data/lib/apipie/markup.rb +52 -0
  109. data/lib/apipie/method_description/api.rb +12 -0
  110. data/lib/apipie/method_description/apis_service.rb +82 -0
  111. data/lib/apipie/method_description.rb +230 -0
  112. data/lib/apipie/middleware/checksum_in_headers.rb +35 -0
  113. data/lib/apipie/param_description/deprecation.rb +24 -0
  114. data/lib/apipie/param_description.rb +313 -0
  115. data/lib/apipie/railtie.rb +9 -0
  116. data/lib/apipie/resource_description.rb +152 -0
  117. data/lib/apipie/response_description.rb +157 -0
  118. data/lib/apipie/response_description_adapter.rb +202 -0
  119. data/lib/apipie/routes_formatter.rb +33 -0
  120. data/lib/apipie/routing.rb +16 -0
  121. data/lib/apipie/rspec/response_validation_helper.rb +194 -0
  122. data/lib/apipie/see_description.rb +39 -0
  123. data/lib/apipie/static_dispatcher.rb +75 -0
  124. data/lib/apipie/swagger_generator.rb +45 -0
  125. data/lib/apipie/tag_list_description.rb +11 -0
  126. data/lib/apipie/validator.rb +552 -0
  127. data/lib/apipie/version.rb +3 -0
  128. data/lib/apipie-rails.rb +60 -0
  129. data/lib/generators/apipie/install/README +6 -0
  130. data/lib/generators/apipie/install/install_generator.rb +25 -0
  131. data/lib/generators/apipie/install/templates/initializer.rb.erb +7 -0
  132. data/lib/generators/apipie/views_generator.rb +11 -0
  133. data/lib/tasks/apipie.rake +355 -0
  134. data/rel-eng/gem_release.ipynb +398 -0
  135. data/rel-eng/packages/.readme +3 -0
  136. data/rel-eng/packages/rubygem-apipie-rails +1 -0
  137. data/rel-eng/tito.props +5 -0
  138. data/spec/controllers/api/v1/architectures_controller_spec.rb +29 -0
  139. data/spec/controllers/api/v2/architectures_controller_spec.rb +19 -0
  140. data/spec/controllers/api/v2/empty_middle_controller_spec.rb +23 -0
  141. data/spec/controllers/api/v2/nested/resources_controller_spec.rb +27 -0
  142. data/spec/controllers/api/v2/sub/footguns_controller_spec.rb +19 -0
  143. data/spec/controllers/concerns_controller_spec.rb +42 -0
  144. data/spec/controllers/extended_controller_spec.rb +14 -0
  145. data/spec/controllers/included_param_group_controller_spec.rb +13 -0
  146. data/spec/controllers/pets_controller_spec.rb +98 -0
  147. data/spec/controllers/users_controller_spec.rb +794 -0
  148. data/spec/dummy/Rakefile +7 -0
  149. data/spec/dummy/app/controllers/api/base_controller.rb +4 -0
  150. data/spec/dummy/app/controllers/api/v1/architectures_controller.rb +43 -0
  151. data/spec/dummy/app/controllers/api/v1/base_controller.rb +11 -0
  152. data/spec/dummy/app/controllers/api/v2/architectures_controller.rb +31 -0
  153. data/spec/dummy/app/controllers/api/v2/base_controller.rb +17 -0
  154. data/spec/dummy/app/controllers/api/v2/empty_middle_controller.rb +14 -0
  155. data/spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb +32 -0
  156. data/spec/dummy/app/controllers/api/v2/nested/resources_controller.rb +33 -0
  157. data/spec/dummy/app/controllers/api/v2/sub/footguns_controller.rb +30 -0
  158. data/spec/dummy/app/controllers/application_controller.rb +18 -0
  159. data/spec/dummy/app/controllers/concerns_controller.rb +8 -0
  160. data/spec/dummy/app/controllers/extended_controller.rb +14 -0
  161. data/spec/dummy/app/controllers/extending_concern.rb +10 -0
  162. data/spec/dummy/app/controllers/files_controller.rb +5 -0
  163. data/spec/dummy/app/controllers/included_param_group_controller.rb +19 -0
  164. data/spec/dummy/app/controllers/overridden_concerns_controller.rb +31 -0
  165. data/spec/dummy/app/controllers/pets_controller.rb +408 -0
  166. data/spec/dummy/app/controllers/pets_using_auto_views_controller.rb +73 -0
  167. data/spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb +95 -0
  168. data/spec/dummy/app/controllers/sample_controller.rb +39 -0
  169. data/spec/dummy/app/controllers/tagged_cats_controller.rb +32 -0
  170. data/spec/dummy/app/controllers/tagged_dogs_controller.rb +15 -0
  171. data/spec/dummy/app/controllers/twitter_example_controller.rb +307 -0
  172. data/spec/dummy/app/controllers/users_controller.rb +310 -0
  173. data/spec/dummy/app/helpers/random_param_group.rb +8 -0
  174. data/spec/dummy/app/views/layouts/application.html.erb +21 -0
  175. data/spec/dummy/components/test_engine/Gemfile +6 -0
  176. data/spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb +4 -0
  177. data/spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb +37 -0
  178. data/spec/dummy/components/test_engine/config/routes.rb +3 -0
  179. data/spec/dummy/components/test_engine/db/.gitkeep +0 -0
  180. data/spec/dummy/components/test_engine/lib/test_engine.rb +7 -0
  181. data/spec/dummy/components/test_engine/test_engine.gemspec +11 -0
  182. data/spec/dummy/config/application.rb +47 -0
  183. data/spec/dummy/config/boot.rb +12 -0
  184. data/spec/dummy/config/database.yml +21 -0
  185. data/spec/dummy/config/environment.rb +8 -0
  186. data/spec/dummy/config/environments/development.rb +25 -0
  187. data/spec/dummy/config/environments/production.rb +49 -0
  188. data/spec/dummy/config/environments/test.rb +33 -0
  189. data/spec/dummy/config/initializers/apipie.rb +110 -0
  190. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  191. data/spec/dummy/config/initializers/inflections.rb +10 -0
  192. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  193. data/spec/dummy/config/initializers/secret_token.rb +8 -0
  194. data/spec/dummy/config/initializers/session_store.rb +8 -0
  195. data/spec/dummy/config/locales/en.yml +5 -0
  196. data/spec/dummy/config/routes.rb +61 -0
  197. data/spec/dummy/config.ru +4 -0
  198. data/spec/dummy/db/.gitkeep +0 -0
  199. data/spec/dummy/doc/apipie_examples.json +1 -0
  200. data/spec/dummy/doc/users/desc_from_file.md +1 -0
  201. data/spec/dummy/public/404.html +26 -0
  202. data/spec/dummy/public/422.html +26 -0
  203. data/spec/dummy/public/500.html +26 -0
  204. data/spec/dummy/public/favicon.ico +0 -0
  205. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  206. data/spec/dummy/script/rails +6 -0
  207. data/spec/lib/apipie/apipies_controller_spec.rb +345 -0
  208. data/spec/lib/apipie/application_spec.rb +62 -0
  209. data/spec/lib/apipie/configuration_spec.rb +38 -0
  210. data/spec/lib/apipie/extractor/collector_spec.rb +57 -0
  211. data/spec/lib/apipie/extractor/recorder/middleware_spec.rb +44 -0
  212. data/spec/lib/apipie/extractor/recorder_spec.rb +77 -0
  213. data/spec/lib/apipie/extractor/writer_spec.rb +112 -0
  214. data/spec/lib/apipie/extractor_spec.rb +9 -0
  215. data/spec/lib/apipie/file_handler_spec.rb +25 -0
  216. data/spec/lib/apipie/generator/swagger/config_spec.rb +19 -0
  217. data/spec/lib/apipie/generator/swagger/context_spec.rb +56 -0
  218. data/spec/lib/apipie/generator/swagger/method_description/api_schema_service_spec.rb +119 -0
  219. data/spec/lib/apipie/generator/swagger/method_description/response_schema_service_spec.rb +105 -0
  220. data/spec/lib/apipie/generator/swagger/method_description/response_service_spec.rb +62 -0
  221. data/spec/lib/apipie/generator/swagger/operation_id_spec.rb +63 -0
  222. data/spec/lib/apipie/generator/swagger/param_description/builder_spec.rb +245 -0
  223. data/spec/lib/apipie/generator/swagger/param_description/composite_spec.rb +95 -0
  224. data/spec/lib/apipie/generator/swagger/param_description/description_spec.rb +79 -0
  225. data/spec/lib/apipie/generator/swagger/param_description/in_spec.rb +86 -0
  226. data/spec/lib/apipie/generator/swagger/param_description/name_spec.rb +81 -0
  227. data/spec/lib/apipie/generator/swagger/param_description/type_spec.rb +210 -0
  228. data/spec/lib/apipie/generator/swagger/param_description_spec.rb +28 -0
  229. data/spec/lib/apipie/generator/swagger/path_decorator_spec.rb +57 -0
  230. data/spec/lib/apipie/generator/swagger/referenced_definitions_spec.rb +35 -0
  231. data/spec/lib/apipie/generator/swagger/resource_description_composite_spec.rb +37 -0
  232. data/spec/lib/apipie/generator/swagger/resource_descriptions_collection_spec.rb +57 -0
  233. data/spec/lib/apipie/generator/swagger/schema_spec.rb +89 -0
  234. data/spec/lib/apipie/generator/swagger/type_extractor_spec.rb +38 -0
  235. data/spec/lib/apipie/generator/swagger/warning_spec.rb +51 -0
  236. data/spec/lib/apipie/generator/swagger/warning_writer_spec.rb +71 -0
  237. data/spec/lib/apipie/method_description/apis_service_spec.rb +60 -0
  238. data/spec/lib/apipie/method_description_spec.rb +133 -0
  239. data/spec/lib/apipie/no_documented_method_spec.rb +17 -0
  240. data/spec/lib/apipie/param_description/deprecation_spec.rb +31 -0
  241. data/spec/lib/apipie/param_description_spec.rb +671 -0
  242. data/spec/lib/apipie/param_group_spec.rb +61 -0
  243. data/spec/lib/apipie/resource_description_spec.rb +91 -0
  244. data/spec/lib/apipie/response_description/response_object_spec.rb +22 -0
  245. data/spec/lib/apipie/response_description_spec.rb +56 -0
  246. data/spec/lib/apipie/response_does_not_match_swagger_schema_spec.rb +35 -0
  247. data/spec/lib/apipie/swagger_generator_spec.rb +94 -0
  248. data/spec/lib/apipie/validator_spec.rb +149 -0
  249. data/spec/lib/rake_spec.rb +69 -0
  250. data/spec/lib/swagger/openapi_2_0_schema.json +1614 -0
  251. data/spec/lib/swagger/rake_swagger_spec.rb +159 -0
  252. data/spec/lib/swagger/swagger_dsl_spec.rb +664 -0
  253. data/spec/lib/validators/array_validator_spec.rb +85 -0
  254. data/spec/spec_helper.rb +92 -0
  255. data/spec/support/custom_bool_validator.rb +17 -0
  256. data/spec/support/rake.rb +21 -0
  257. data/spec/test_engine/memes_controller_spec.rb +10 -0
  258. metadata +499 -0
@@ -0,0 +1,1614 @@
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
+ "allOf": [
44
+ {
45
+ "$ref": "#/definitions/mediaTypeList"
46
+ }
47
+ ]
48
+ },
49
+ "produces": {
50
+ "description": "A list of MIME types the API can produce.",
51
+ "allOf": [
52
+ {
53
+ "$ref": "#/definitions/mediaTypeList"
54
+ }
55
+ ]
56
+ },
57
+ "paths": {
58
+ "$ref": "#/definitions/paths"
59
+ },
60
+ "definitions": {
61
+ "$ref": "#/definitions/definitions"
62
+ },
63
+ "parameters": {
64
+ "$ref": "#/definitions/parameterDefinitions"
65
+ },
66
+ "responses": {
67
+ "$ref": "#/definitions/responseDefinitions"
68
+ },
69
+ "security": {
70
+ "$ref": "#/definitions/security"
71
+ },
72
+ "securityDefinitions": {
73
+ "$ref": "#/definitions/securityDefinitions"
74
+ },
75
+ "tags": {
76
+ "type": "array",
77
+ "items": {
78
+ "$ref": "#/definitions/tag"
79
+ },
80
+ "uniqueItems": true
81
+ },
82
+ "externalDocs": {
83
+ "$ref": "#/definitions/externalDocs"
84
+ }
85
+ },
86
+ "definitions": {
87
+ "info": {
88
+ "type": "object",
89
+ "description": "General information about the API.",
90
+ "required": [
91
+ "version",
92
+ "title"
93
+ ],
94
+ "additionalProperties": false,
95
+ "patternProperties": {
96
+ "^x-": {
97
+ "$ref": "#/definitions/vendorExtension"
98
+ }
99
+ },
100
+ "properties": {
101
+ "title": {
102
+ "type": "string",
103
+ "description": "A unique and precise title of the API."
104
+ },
105
+ "version": {
106
+ "type": "string",
107
+ "description": "A semantic version number of the API."
108
+ },
109
+ "description": {
110
+ "type": "string",
111
+ "description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed."
112
+ },
113
+ "termsOfService": {
114
+ "type": "string",
115
+ "description": "The terms of service for the API."
116
+ },
117
+ "contact": {
118
+ "$ref": "#/definitions/contact"
119
+ },
120
+ "license": {
121
+ "$ref": "#/definitions/license"
122
+ }
123
+ }
124
+ },
125
+ "contact": {
126
+ "type": "object",
127
+ "description": "Contact information for the owners of the API.",
128
+ "additionalProperties": false,
129
+ "properties": {
130
+ "name": {
131
+ "type": "string",
132
+ "description": "The identifying name of the contact person/organization."
133
+ },
134
+ "url": {
135
+ "type": "string",
136
+ "description": "The URL pointing to the contact information.",
137
+ "format": "uri"
138
+ },
139
+ "email": {
140
+ "type": "string",
141
+ "description": "The email address of the contact person/organization.",
142
+ "format": "email"
143
+ }
144
+ },
145
+ "patternProperties": {
146
+ "^x-": {
147
+ "$ref": "#/definitions/vendorExtension"
148
+ }
149
+ }
150
+ },
151
+ "license": {
152
+ "type": "object",
153
+ "required": [
154
+ "name"
155
+ ],
156
+ "additionalProperties": false,
157
+ "properties": {
158
+ "name": {
159
+ "type": "string",
160
+ "description": "The name of the license type. It's encouraged to use an OSI compatible license."
161
+ },
162
+ "url": {
163
+ "type": "string",
164
+ "description": "The URL pointing to the license.",
165
+ "format": "uri"
166
+ }
167
+ },
168
+ "patternProperties": {
169
+ "^x-": {
170
+ "$ref": "#/definitions/vendorExtension"
171
+ }
172
+ }
173
+ },
174
+ "paths": {
175
+ "type": "object",
176
+ "description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.",
177
+ "patternProperties": {
178
+ "^x-": {
179
+ "$ref": "#/definitions/vendorExtension"
180
+ },
181
+ "^/": {
182
+ "$ref": "#/definitions/pathItem"
183
+ }
184
+ },
185
+ "additionalProperties": false
186
+ },
187
+ "definitions": {
188
+ "type": "object",
189
+ "additionalProperties": {
190
+ "$ref": "#/definitions/schema"
191
+ },
192
+ "description": "One or more JSON objects describing the schemas being consumed and produced by the API."
193
+ },
194
+ "parameterDefinitions": {
195
+ "type": "object",
196
+ "additionalProperties": {
197
+ "$ref": "#/definitions/parameter"
198
+ },
199
+ "description": "One or more JSON representations for parameters"
200
+ },
201
+ "responseDefinitions": {
202
+ "type": "object",
203
+ "additionalProperties": {
204
+ "$ref": "#/definitions/response"
205
+ },
206
+ "description": "One or more JSON representations for responses"
207
+ },
208
+ "externalDocs": {
209
+ "type": "object",
210
+ "additionalProperties": false,
211
+ "description": "information about external documentation",
212
+ "required": [
213
+ "url"
214
+ ],
215
+ "properties": {
216
+ "description": {
217
+ "type": "string"
218
+ },
219
+ "url": {
220
+ "type": "string",
221
+ "format": "uri"
222
+ }
223
+ },
224
+ "patternProperties": {
225
+ "^x-": {
226
+ "$ref": "#/definitions/vendorExtension"
227
+ }
228
+ }
229
+ },
230
+ "examples": {
231
+ "type": "object",
232
+ "additionalProperties": true
233
+ },
234
+ "mimeType": {
235
+ "type": "string",
236
+ "description": "The MIME type of the HTTP message."
237
+ },
238
+ "operation": {
239
+ "type": "object",
240
+ "required": [
241
+ "responses"
242
+ ],
243
+ "additionalProperties": false,
244
+ "patternProperties": {
245
+ "^x-": {
246
+ "$ref": "#/definitions/vendorExtension"
247
+ }
248
+ },
249
+ "properties": {
250
+ "tags": {
251
+ "type": "array",
252
+ "items": {
253
+ "type": "string"
254
+ },
255
+ "uniqueItems": true
256
+ },
257
+ "summary": {
258
+ "type": "string",
259
+ "description": "A brief summary of the operation."
260
+ },
261
+ "description": {
262
+ "type": "string",
263
+ "description": "A longer description of the operation, GitHub Flavored Markdown is allowed."
264
+ },
265
+ "externalDocs": {
266
+ "$ref": "#/definitions/externalDocs"
267
+ },
268
+ "operationId": {
269
+ "type": "string",
270
+ "description": "A unique identifier of the operation."
271
+ },
272
+ "produces": {
273
+ "description": "A list of MIME types the API can produce.",
274
+ "allOf": [
275
+ {
276
+ "$ref": "#/definitions/mediaTypeList"
277
+ }
278
+ ]
279
+ },
280
+ "consumes": {
281
+ "description": "A list of MIME types the API can consume.",
282
+ "allOf": [
283
+ {
284
+ "$ref": "#/definitions/mediaTypeList"
285
+ }
286
+ ]
287
+ },
288
+ "parameters": {
289
+ "$ref": "#/definitions/parametersList"
290
+ },
291
+ "responses": {
292
+ "$ref": "#/definitions/responses"
293
+ },
294
+ "schemes": {
295
+ "$ref": "#/definitions/schemesList"
296
+ },
297
+ "deprecated": {
298
+ "type": "boolean",
299
+ "default": false
300
+ },
301
+ "security": {
302
+ "$ref": "#/definitions/security"
303
+ }
304
+ }
305
+ },
306
+ "pathItem": {
307
+ "type": "object",
308
+ "additionalProperties": false,
309
+ "patternProperties": {
310
+ "^x-": {
311
+ "$ref": "#/definitions/vendorExtension"
312
+ }
313
+ },
314
+ "properties": {
315
+ "$ref": {
316
+ "type": "string"
317
+ },
318
+ "get": {
319
+ "$ref": "#/definitions/operation"
320
+ },
321
+ "put": {
322
+ "$ref": "#/definitions/operation"
323
+ },
324
+ "post": {
325
+ "$ref": "#/definitions/operation"
326
+ },
327
+ "delete": {
328
+ "$ref": "#/definitions/operation"
329
+ },
330
+ "options": {
331
+ "$ref": "#/definitions/operation"
332
+ },
333
+ "head": {
334
+ "$ref": "#/definitions/operation"
335
+ },
336
+ "patch": {
337
+ "$ref": "#/definitions/operation"
338
+ },
339
+ "parameters": {
340
+ "$ref": "#/definitions/parametersList"
341
+ }
342
+ }
343
+ },
344
+ "responses": {
345
+ "type": "object",
346
+ "description": "Response objects names can either be any valid HTTP status code or 'default'.",
347
+ "minProperties": 1,
348
+ "additionalProperties": false,
349
+ "patternProperties": {
350
+ "^([0-9]{3})$|^(default)$": {
351
+ "$ref": "#/definitions/responseValue"
352
+ },
353
+ "^x-": {
354
+ "$ref": "#/definitions/vendorExtension"
355
+ }
356
+ },
357
+ "not": {
358
+ "type": "object",
359
+ "additionalProperties": false,
360
+ "patternProperties": {
361
+ "^x-": {
362
+ "$ref": "#/definitions/vendorExtension"
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "responseValue": {
368
+ "oneOf": [
369
+ {
370
+ "$ref": "#/definitions/response"
371
+ },
372
+ {
373
+ "$ref": "#/definitions/jsonReference"
374
+ }
375
+ ]
376
+ },
377
+ "response": {
378
+ "type": "object",
379
+ "required": [
380
+ "description"
381
+ ],
382
+ "properties": {
383
+ "description": {
384
+ "type": "string"
385
+ },
386
+ "schema": {
387
+ "oneOf": [
388
+ {
389
+ "$ref": "#/definitions/schema"
390
+ },
391
+ {
392
+ "$ref": "#/definitions/fileSchema"
393
+ }
394
+ ]
395
+ },
396
+ "headers": {
397
+ "$ref": "#/definitions/headers"
398
+ },
399
+ "examples": {
400
+ "$ref": "#/definitions/examples"
401
+ }
402
+ },
403
+ "additionalProperties": false,
404
+ "patternProperties": {
405
+ "^x-": {
406
+ "$ref": "#/definitions/vendorExtension"
407
+ }
408
+ }
409
+ },
410
+ "headers": {
411
+ "type": "object",
412
+ "additionalProperties": {
413
+ "$ref": "#/definitions/header"
414
+ }
415
+ },
416
+ "header": {
417
+ "type": "object",
418
+ "additionalProperties": false,
419
+ "required": [
420
+ "type"
421
+ ],
422
+ "properties": {
423
+ "type": {
424
+ "type": "string",
425
+ "enum": [
426
+ "string",
427
+ "number",
428
+ "integer",
429
+ "boolean",
430
+ "array"
431
+ ]
432
+ },
433
+ "format": {
434
+ "type": "string"
435
+ },
436
+ "items": {
437
+ "$ref": "#/definitions/primitivesItems"
438
+ },
439
+ "collectionFormat": {
440
+ "$ref": "#/definitions/collectionFormat"
441
+ },
442
+ "default": {
443
+ "$ref": "#/definitions/default"
444
+ },
445
+ "maximum": {
446
+ "$ref": "#/definitions/maximum"
447
+ },
448
+ "exclusiveMaximum": {
449
+ "$ref": "#/definitions/exclusiveMaximum"
450
+ },
451
+ "minimum": {
452
+ "$ref": "#/definitions/minimum"
453
+ },
454
+ "exclusiveMinimum": {
455
+ "$ref": "#/definitions/exclusiveMinimum"
456
+ },
457
+ "maxLength": {
458
+ "$ref": "#/definitions/maxLength"
459
+ },
460
+ "minLength": {
461
+ "$ref": "#/definitions/minLength"
462
+ },
463
+ "pattern": {
464
+ "$ref": "#/definitions/pattern"
465
+ },
466
+ "maxItems": {
467
+ "$ref": "#/definitions/maxItems"
468
+ },
469
+ "minItems": {
470
+ "$ref": "#/definitions/minItems"
471
+ },
472
+ "uniqueItems": {
473
+ "$ref": "#/definitions/uniqueItems"
474
+ },
475
+ "enum": {
476
+ "$ref": "#/definitions/enum"
477
+ },
478
+ "multipleOf": {
479
+ "$ref": "#/definitions/multipleOf"
480
+ },
481
+ "description": {
482
+ "type": "string"
483
+ }
484
+ },
485
+ "patternProperties": {
486
+ "^x-": {
487
+ "$ref": "#/definitions/vendorExtension"
488
+ }
489
+ }
490
+ },
491
+ "vendorExtension": {
492
+ "description": "Any property starting with x- is valid.",
493
+ "additionalProperties": true,
494
+ "additionalItems": true
495
+ },
496
+ "bodyParameter": {
497
+ "type": "object",
498
+ "required": [
499
+ "name",
500
+ "in",
501
+ "schema"
502
+ ],
503
+ "patternProperties": {
504
+ "^x-": {
505
+ "$ref": "#/definitions/vendorExtension"
506
+ }
507
+ },
508
+ "properties": {
509
+ "description": {
510
+ "type": "string",
511
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
512
+ },
513
+ "name": {
514
+ "type": "string",
515
+ "description": "The name of the parameter."
516
+ },
517
+ "in": {
518
+ "type": "string",
519
+ "description": "Determines the location of the parameter.",
520
+ "enum": [
521
+ "body"
522
+ ]
523
+ },
524
+ "required": {
525
+ "type": "boolean",
526
+ "description": "Determines whether or not this parameter is required or optional.",
527
+ "default": false
528
+ },
529
+ "schema": {
530
+ "$ref": "#/definitions/schema"
531
+ }
532
+ },
533
+ "additionalProperties": false
534
+ },
535
+ "headerParameterSubSchema": {
536
+ "additionalProperties": false,
537
+ "patternProperties": {
538
+ "^x-": {
539
+ "$ref": "#/definitions/vendorExtension"
540
+ }
541
+ },
542
+ "properties": {
543
+ "required": {
544
+ "type": "boolean",
545
+ "description": "Determines whether or not this parameter is required or optional.",
546
+ "default": false
547
+ },
548
+ "in": {
549
+ "type": "string",
550
+ "description": "Determines the location of the parameter.",
551
+ "enum": [
552
+ "header"
553
+ ]
554
+ },
555
+ "description": {
556
+ "type": "string",
557
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
558
+ },
559
+ "name": {
560
+ "type": "string",
561
+ "description": "The name of the parameter."
562
+ },
563
+ "type": {
564
+ "type": "string",
565
+ "enum": [
566
+ "string",
567
+ "number",
568
+ "boolean",
569
+ "integer",
570
+ "array"
571
+ ]
572
+ },
573
+ "format": {
574
+ "type": "string"
575
+ },
576
+ "items": {
577
+ "$ref": "#/definitions/primitivesItems"
578
+ },
579
+ "collectionFormat": {
580
+ "$ref": "#/definitions/collectionFormat"
581
+ },
582
+ "default": {
583
+ "$ref": "#/definitions/default"
584
+ },
585
+ "maximum": {
586
+ "$ref": "#/definitions/maximum"
587
+ },
588
+ "exclusiveMaximum": {
589
+ "$ref": "#/definitions/exclusiveMaximum"
590
+ },
591
+ "minimum": {
592
+ "$ref": "#/definitions/minimum"
593
+ },
594
+ "exclusiveMinimum": {
595
+ "$ref": "#/definitions/exclusiveMinimum"
596
+ },
597
+ "maxLength": {
598
+ "$ref": "#/definitions/maxLength"
599
+ },
600
+ "minLength": {
601
+ "$ref": "#/definitions/minLength"
602
+ },
603
+ "pattern": {
604
+ "$ref": "#/definitions/pattern"
605
+ },
606
+ "maxItems": {
607
+ "$ref": "#/definitions/maxItems"
608
+ },
609
+ "minItems": {
610
+ "$ref": "#/definitions/minItems"
611
+ },
612
+ "uniqueItems": {
613
+ "$ref": "#/definitions/uniqueItems"
614
+ },
615
+ "enum": {
616
+ "$ref": "#/definitions/enum"
617
+ },
618
+ "multipleOf": {
619
+ "$ref": "#/definitions/multipleOf"
620
+ }
621
+ }
622
+ },
623
+ "queryParameterSubSchema": {
624
+ "additionalProperties": false,
625
+ "patternProperties": {
626
+ "^x-": {
627
+ "$ref": "#/definitions/vendorExtension"
628
+ }
629
+ },
630
+ "properties": {
631
+ "required": {
632
+ "type": "boolean",
633
+ "description": "Determines whether or not this parameter is required or optional.",
634
+ "default": false
635
+ },
636
+ "in": {
637
+ "type": "string",
638
+ "description": "Determines the location of the parameter.",
639
+ "enum": [
640
+ "query"
641
+ ]
642
+ },
643
+ "description": {
644
+ "type": "string",
645
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
646
+ },
647
+ "name": {
648
+ "type": "string",
649
+ "description": "The name of the parameter."
650
+ },
651
+ "allowEmptyValue": {
652
+ "type": "boolean",
653
+ "default": false,
654
+ "description": "allows sending a parameter by name only or with an empty value."
655
+ },
656
+ "type": {
657
+ "type": "string",
658
+ "enum": [
659
+ "string",
660
+ "number",
661
+ "boolean",
662
+ "integer",
663
+ "array"
664
+ ]
665
+ },
666
+ "format": {
667
+ "type": "string"
668
+ },
669
+ "items": {
670
+ "$ref": "#/definitions/primitivesItems"
671
+ },
672
+ "collectionFormat": {
673
+ "$ref": "#/definitions/collectionFormatWithMulti"
674
+ },
675
+ "default": {
676
+ "$ref": "#/definitions/default"
677
+ },
678
+ "maximum": {
679
+ "$ref": "#/definitions/maximum"
680
+ },
681
+ "exclusiveMaximum": {
682
+ "$ref": "#/definitions/exclusiveMaximum"
683
+ },
684
+ "minimum": {
685
+ "$ref": "#/definitions/minimum"
686
+ },
687
+ "exclusiveMinimum": {
688
+ "$ref": "#/definitions/exclusiveMinimum"
689
+ },
690
+ "maxLength": {
691
+ "$ref": "#/definitions/maxLength"
692
+ },
693
+ "minLength": {
694
+ "$ref": "#/definitions/minLength"
695
+ },
696
+ "pattern": {
697
+ "$ref": "#/definitions/pattern"
698
+ },
699
+ "maxItems": {
700
+ "$ref": "#/definitions/maxItems"
701
+ },
702
+ "minItems": {
703
+ "$ref": "#/definitions/minItems"
704
+ },
705
+ "uniqueItems": {
706
+ "$ref": "#/definitions/uniqueItems"
707
+ },
708
+ "enum": {
709
+ "$ref": "#/definitions/enum"
710
+ },
711
+ "multipleOf": {
712
+ "$ref": "#/definitions/multipleOf"
713
+ }
714
+ }
715
+ },
716
+ "formDataParameterSubSchema": {
717
+ "additionalProperties": false,
718
+ "patternProperties": {
719
+ "^x-": {
720
+ "$ref": "#/definitions/vendorExtension"
721
+ }
722
+ },
723
+ "properties": {
724
+ "required": {
725
+ "type": "boolean",
726
+ "description": "Determines whether or not this parameter is required or optional.",
727
+ "default": false
728
+ },
729
+ "in": {
730
+ "type": "string",
731
+ "description": "Determines the location of the parameter.",
732
+ "enum": [
733
+ "formData"
734
+ ]
735
+ },
736
+ "description": {
737
+ "type": "string",
738
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
739
+ },
740
+ "name": {
741
+ "type": "string",
742
+ "description": "The name of the parameter."
743
+ },
744
+ "allowEmptyValue": {
745
+ "type": "boolean",
746
+ "default": false,
747
+ "description": "allows sending a parameter by name only or with an empty value."
748
+ },
749
+ "type": {
750
+ "type": "string",
751
+ "enum": [
752
+ "string",
753
+ "number",
754
+ "boolean",
755
+ "integer",
756
+ "array",
757
+ "file"
758
+ ]
759
+ },
760
+ "format": {
761
+ "type": "string"
762
+ },
763
+ "items": {
764
+ "$ref": "#/definitions/primitivesItems"
765
+ },
766
+ "collectionFormat": {
767
+ "$ref": "#/definitions/collectionFormatWithMulti"
768
+ },
769
+ "default": {
770
+ "$ref": "#/definitions/default"
771
+ },
772
+ "maximum": {
773
+ "$ref": "#/definitions/maximum"
774
+ },
775
+ "exclusiveMaximum": {
776
+ "$ref": "#/definitions/exclusiveMaximum"
777
+ },
778
+ "minimum": {
779
+ "$ref": "#/definitions/minimum"
780
+ },
781
+ "exclusiveMinimum": {
782
+ "$ref": "#/definitions/exclusiveMinimum"
783
+ },
784
+ "maxLength": {
785
+ "$ref": "#/definitions/maxLength"
786
+ },
787
+ "minLength": {
788
+ "$ref": "#/definitions/minLength"
789
+ },
790
+ "pattern": {
791
+ "$ref": "#/definitions/pattern"
792
+ },
793
+ "maxItems": {
794
+ "$ref": "#/definitions/maxItems"
795
+ },
796
+ "minItems": {
797
+ "$ref": "#/definitions/minItems"
798
+ },
799
+ "uniqueItems": {
800
+ "$ref": "#/definitions/uniqueItems"
801
+ },
802
+ "enum": {
803
+ "$ref": "#/definitions/enum"
804
+ },
805
+ "multipleOf": {
806
+ "$ref": "#/definitions/multipleOf"
807
+ }
808
+ }
809
+ },
810
+ "pathParameterSubSchema": {
811
+ "additionalProperties": false,
812
+ "patternProperties": {
813
+ "^x-": {
814
+ "$ref": "#/definitions/vendorExtension"
815
+ }
816
+ },
817
+ "required": [
818
+ "required"
819
+ ],
820
+ "properties": {
821
+ "required": {
822
+ "type": "boolean",
823
+ "enum": [
824
+ true
825
+ ],
826
+ "description": "Determines whether or not this parameter is required or optional."
827
+ },
828
+ "in": {
829
+ "type": "string",
830
+ "description": "Determines the location of the parameter.",
831
+ "enum": [
832
+ "path"
833
+ ]
834
+ },
835
+ "description": {
836
+ "type": "string",
837
+ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed."
838
+ },
839
+ "name": {
840
+ "type": "string",
841
+ "description": "The name of the parameter."
842
+ },
843
+ "type": {
844
+ "type": "string",
845
+ "enum": [
846
+ "string",
847
+ "number",
848
+ "boolean",
849
+ "integer",
850
+ "array"
851
+ ]
852
+ },
853
+ "format": {
854
+ "type": "string"
855
+ },
856
+ "items": {
857
+ "$ref": "#/definitions/primitivesItems"
858
+ },
859
+ "collectionFormat": {
860
+ "$ref": "#/definitions/collectionFormat"
861
+ },
862
+ "default": {
863
+ "$ref": "#/definitions/default"
864
+ },
865
+ "maximum": {
866
+ "$ref": "#/definitions/maximum"
867
+ },
868
+ "exclusiveMaximum": {
869
+ "$ref": "#/definitions/exclusiveMaximum"
870
+ },
871
+ "minimum": {
872
+ "$ref": "#/definitions/minimum"
873
+ },
874
+ "exclusiveMinimum": {
875
+ "$ref": "#/definitions/exclusiveMinimum"
876
+ },
877
+ "maxLength": {
878
+ "$ref": "#/definitions/maxLength"
879
+ },
880
+ "minLength": {
881
+ "$ref": "#/definitions/minLength"
882
+ },
883
+ "pattern": {
884
+ "$ref": "#/definitions/pattern"
885
+ },
886
+ "maxItems": {
887
+ "$ref": "#/definitions/maxItems"
888
+ },
889
+ "minItems": {
890
+ "$ref": "#/definitions/minItems"
891
+ },
892
+ "uniqueItems": {
893
+ "$ref": "#/definitions/uniqueItems"
894
+ },
895
+ "enum": {
896
+ "$ref": "#/definitions/enum"
897
+ },
898
+ "multipleOf": {
899
+ "$ref": "#/definitions/multipleOf"
900
+ }
901
+ }
902
+ },
903
+ "nonBodyParameter": {
904
+ "type": "object",
905
+ "required": [
906
+ "name",
907
+ "in",
908
+ "type"
909
+ ],
910
+ "oneOf": [
911
+ {
912
+ "$ref": "#/definitions/headerParameterSubSchema"
913
+ },
914
+ {
915
+ "$ref": "#/definitions/formDataParameterSubSchema"
916
+ },
917
+ {
918
+ "$ref": "#/definitions/queryParameterSubSchema"
919
+ },
920
+ {
921
+ "$ref": "#/definitions/pathParameterSubSchema"
922
+ }
923
+ ]
924
+ },
925
+ "parameter": {
926
+ "oneOf": [
927
+ {
928
+ "$ref": "#/definitions/bodyParameter"
929
+ },
930
+ {
931
+ "$ref": "#/definitions/nonBodyParameter"
932
+ }
933
+ ]
934
+ },
935
+ "schema": {
936
+ "type": "object",
937
+ "description": "A deterministic version of a JSON Schema object.",
938
+ "patternProperties": {
939
+ "^x-": {
940
+ "$ref": "#/definitions/vendorExtension"
941
+ }
942
+ },
943
+ "properties": {
944
+ "$ref": {
945
+ "type": "string"
946
+ },
947
+ "format": {
948
+ "type": "string"
949
+ },
950
+ "title": {
951
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
952
+ },
953
+ "description": {
954
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/description"
955
+ },
956
+ "default": {
957
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/default"
958
+ },
959
+ "multipleOf": {
960
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
961
+ },
962
+ "maximum": {
963
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
964
+ },
965
+ "exclusiveMaximum": {
966
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
967
+ },
968
+ "minimum": {
969
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
970
+ },
971
+ "exclusiveMinimum": {
972
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
973
+ },
974
+ "maxLength": {
975
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
976
+ },
977
+ "minLength": {
978
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
979
+ },
980
+ "pattern": {
981
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
982
+ },
983
+ "maxItems": {
984
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
985
+ },
986
+ "minItems": {
987
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
988
+ },
989
+ "uniqueItems": {
990
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
991
+ },
992
+ "maxProperties": {
993
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
994
+ },
995
+ "minProperties": {
996
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
997
+ },
998
+ "required": {
999
+ "anyOf": [
1000
+ {
1001
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
1002
+ },
1003
+ {
1004
+ "type": "boolean"
1005
+ }
1006
+ ]
1007
+ },
1008
+ "enum": {
1009
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
1010
+ },
1011
+ "additionalProperties": {
1012
+ "anyOf": [
1013
+ {
1014
+ "$ref": "#/definitions/schema"
1015
+ },
1016
+ {
1017
+ "type": "boolean"
1018
+ }
1019
+ ],
1020
+ "default": {}
1021
+ },
1022
+ "type": {
1023
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/type"
1024
+ },
1025
+ "items": {
1026
+ "anyOf": [
1027
+ {
1028
+ "$ref": "#/definitions/schema"
1029
+ },
1030
+ {
1031
+ "type": "array",
1032
+ "minItems": 1,
1033
+ "items": {
1034
+ "$ref": "#/definitions/schema"
1035
+ }
1036
+ }
1037
+ ],
1038
+ "default": {}
1039
+ },
1040
+ "allOf": {
1041
+ "type": "array",
1042
+ "minItems": 1,
1043
+ "items": {
1044
+ "$ref": "#/definitions/schema"
1045
+ }
1046
+ },
1047
+ "properties": {
1048
+ "type": "object",
1049
+ "additionalProperties": {
1050
+ "$ref": "#/definitions/schema"
1051
+ },
1052
+ "default": {}
1053
+ },
1054
+ "discriminator": {
1055
+ "type": "string"
1056
+ },
1057
+ "readOnly": {
1058
+ "type": "boolean",
1059
+ "default": false
1060
+ },
1061
+ "xml": {
1062
+ "$ref": "#/definitions/xml"
1063
+ },
1064
+ "externalDocs": {
1065
+ "$ref": "#/definitions/externalDocs"
1066
+ },
1067
+ "example": {}
1068
+ },
1069
+ "additionalProperties": false
1070
+ },
1071
+ "fileSchema": {
1072
+ "type": "object",
1073
+ "description": "A deterministic version of a JSON Schema object.",
1074
+ "patternProperties": {
1075
+ "^x-": {
1076
+ "$ref": "#/definitions/vendorExtension"
1077
+ }
1078
+ },
1079
+ "required": [
1080
+ "type"
1081
+ ],
1082
+ "properties": {
1083
+ "format": {
1084
+ "type": "string"
1085
+ },
1086
+ "title": {
1087
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
1088
+ },
1089
+ "description": {
1090
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/description"
1091
+ },
1092
+ "default": {
1093
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/default"
1094
+ },
1095
+ "required": {
1096
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
1097
+ },
1098
+ "type": {
1099
+ "type": "string",
1100
+ "enum": [
1101
+ "file"
1102
+ ]
1103
+ },
1104
+ "readOnly": {
1105
+ "type": "boolean",
1106
+ "default": false
1107
+ },
1108
+ "externalDocs": {
1109
+ "$ref": "#/definitions/externalDocs"
1110
+ },
1111
+ "example": {}
1112
+ },
1113
+ "additionalProperties": false
1114
+ },
1115
+ "primitivesItems": {
1116
+ "type": "object",
1117
+ "additionalProperties": false,
1118
+ "properties": {
1119
+ "type": {
1120
+ "type": "string",
1121
+ "enum": [
1122
+ "string",
1123
+ "number",
1124
+ "integer",
1125
+ "boolean",
1126
+ "array"
1127
+ ]
1128
+ },
1129
+ "format": {
1130
+ "type": "string"
1131
+ },
1132
+ "items": {
1133
+ "$ref": "#/definitions/primitivesItems"
1134
+ },
1135
+ "collectionFormat": {
1136
+ "$ref": "#/definitions/collectionFormat"
1137
+ },
1138
+ "default": {
1139
+ "$ref": "#/definitions/default"
1140
+ },
1141
+ "maximum": {
1142
+ "$ref": "#/definitions/maximum"
1143
+ },
1144
+ "exclusiveMaximum": {
1145
+ "$ref": "#/definitions/exclusiveMaximum"
1146
+ },
1147
+ "minimum": {
1148
+ "$ref": "#/definitions/minimum"
1149
+ },
1150
+ "exclusiveMinimum": {
1151
+ "$ref": "#/definitions/exclusiveMinimum"
1152
+ },
1153
+ "maxLength": {
1154
+ "$ref": "#/definitions/maxLength"
1155
+ },
1156
+ "minLength": {
1157
+ "$ref": "#/definitions/minLength"
1158
+ },
1159
+ "pattern": {
1160
+ "$ref": "#/definitions/pattern"
1161
+ },
1162
+ "maxItems": {
1163
+ "$ref": "#/definitions/maxItems"
1164
+ },
1165
+ "minItems": {
1166
+ "$ref": "#/definitions/minItems"
1167
+ },
1168
+ "uniqueItems": {
1169
+ "$ref": "#/definitions/uniqueItems"
1170
+ },
1171
+ "enum": {
1172
+ "$ref": "#/definitions/enum"
1173
+ },
1174
+ "multipleOf": {
1175
+ "$ref": "#/definitions/multipleOf"
1176
+ }
1177
+ },
1178
+ "patternProperties": {
1179
+ "^x-": {
1180
+ "$ref": "#/definitions/vendorExtension"
1181
+ }
1182
+ }
1183
+ },
1184
+ "security": {
1185
+ "type": "array",
1186
+ "items": {
1187
+ "$ref": "#/definitions/securityRequirement"
1188
+ },
1189
+ "uniqueItems": true
1190
+ },
1191
+ "securityRequirement": {
1192
+ "type": "object",
1193
+ "additionalProperties": {
1194
+ "type": "array",
1195
+ "items": {
1196
+ "type": "string"
1197
+ },
1198
+ "uniqueItems": true
1199
+ }
1200
+ },
1201
+ "xml": {
1202
+ "type": "object",
1203
+ "additionalProperties": false,
1204
+ "properties": {
1205
+ "name": {
1206
+ "type": "string"
1207
+ },
1208
+ "namespace": {
1209
+ "type": "string"
1210
+ },
1211
+ "prefix": {
1212
+ "type": "string"
1213
+ },
1214
+ "attribute": {
1215
+ "type": "boolean",
1216
+ "default": false
1217
+ },
1218
+ "wrapped": {
1219
+ "type": "boolean",
1220
+ "default": false
1221
+ }
1222
+ },
1223
+ "patternProperties": {
1224
+ "^x-": {
1225
+ "$ref": "#/definitions/vendorExtension"
1226
+ }
1227
+ }
1228
+ },
1229
+ "tag": {
1230
+ "type": "object",
1231
+ "additionalProperties": false,
1232
+ "required": [
1233
+ "name"
1234
+ ],
1235
+ "properties": {
1236
+ "name": {
1237
+ "type": "string"
1238
+ },
1239
+ "description": {
1240
+ "type": "string"
1241
+ },
1242
+ "externalDocs": {
1243
+ "$ref": "#/definitions/externalDocs"
1244
+ }
1245
+ },
1246
+ "patternProperties": {
1247
+ "^x-": {
1248
+ "$ref": "#/definitions/vendorExtension"
1249
+ }
1250
+ }
1251
+ },
1252
+ "securityDefinitions": {
1253
+ "type": "object",
1254
+ "additionalProperties": {
1255
+ "oneOf": [
1256
+ {
1257
+ "$ref": "#/definitions/basicAuthenticationSecurity"
1258
+ },
1259
+ {
1260
+ "$ref": "#/definitions/apiKeySecurity"
1261
+ },
1262
+ {
1263
+ "$ref": "#/definitions/oauth2ImplicitSecurity"
1264
+ },
1265
+ {
1266
+ "$ref": "#/definitions/oauth2PasswordSecurity"
1267
+ },
1268
+ {
1269
+ "$ref": "#/definitions/oauth2ApplicationSecurity"
1270
+ },
1271
+ {
1272
+ "$ref": "#/definitions/oauth2AccessCodeSecurity"
1273
+ }
1274
+ ]
1275
+ }
1276
+ },
1277
+ "basicAuthenticationSecurity": {
1278
+ "type": "object",
1279
+ "additionalProperties": false,
1280
+ "required": [
1281
+ "type"
1282
+ ],
1283
+ "properties": {
1284
+ "type": {
1285
+ "type": "string",
1286
+ "enum": [
1287
+ "basic"
1288
+ ]
1289
+ },
1290
+ "description": {
1291
+ "type": "string"
1292
+ }
1293
+ },
1294
+ "patternProperties": {
1295
+ "^x-": {
1296
+ "$ref": "#/definitions/vendorExtension"
1297
+ }
1298
+ }
1299
+ },
1300
+ "apiKeySecurity": {
1301
+ "type": "object",
1302
+ "additionalProperties": false,
1303
+ "required": [
1304
+ "type",
1305
+ "name",
1306
+ "in"
1307
+ ],
1308
+ "properties": {
1309
+ "type": {
1310
+ "type": "string",
1311
+ "enum": [
1312
+ "apiKey"
1313
+ ]
1314
+ },
1315
+ "name": {
1316
+ "type": "string"
1317
+ },
1318
+ "in": {
1319
+ "type": "string",
1320
+ "enum": [
1321
+ "header",
1322
+ "query"
1323
+ ]
1324
+ },
1325
+ "description": {
1326
+ "type": "string"
1327
+ }
1328
+ },
1329
+ "patternProperties": {
1330
+ "^x-": {
1331
+ "$ref": "#/definitions/vendorExtension"
1332
+ }
1333
+ }
1334
+ },
1335
+ "oauth2ImplicitSecurity": {
1336
+ "type": "object",
1337
+ "additionalProperties": false,
1338
+ "required": [
1339
+ "type",
1340
+ "flow",
1341
+ "authorizationUrl"
1342
+ ],
1343
+ "properties": {
1344
+ "type": {
1345
+ "type": "string",
1346
+ "enum": [
1347
+ "oauth2"
1348
+ ]
1349
+ },
1350
+ "flow": {
1351
+ "type": "string",
1352
+ "enum": [
1353
+ "implicit"
1354
+ ]
1355
+ },
1356
+ "scopes": {
1357
+ "$ref": "#/definitions/oauth2Scopes"
1358
+ },
1359
+ "authorizationUrl": {
1360
+ "type": "string",
1361
+ "format": "uri"
1362
+ },
1363
+ "description": {
1364
+ "type": "string"
1365
+ }
1366
+ },
1367
+ "patternProperties": {
1368
+ "^x-": {
1369
+ "$ref": "#/definitions/vendorExtension"
1370
+ }
1371
+ }
1372
+ },
1373
+ "oauth2PasswordSecurity": {
1374
+ "type": "object",
1375
+ "additionalProperties": false,
1376
+ "required": [
1377
+ "type",
1378
+ "flow",
1379
+ "tokenUrl"
1380
+ ],
1381
+ "properties": {
1382
+ "type": {
1383
+ "type": "string",
1384
+ "enum": [
1385
+ "oauth2"
1386
+ ]
1387
+ },
1388
+ "flow": {
1389
+ "type": "string",
1390
+ "enum": [
1391
+ "password"
1392
+ ]
1393
+ },
1394
+ "scopes": {
1395
+ "$ref": "#/definitions/oauth2Scopes"
1396
+ },
1397
+ "tokenUrl": {
1398
+ "type": "string",
1399
+ "format": "uri"
1400
+ },
1401
+ "description": {
1402
+ "type": "string"
1403
+ }
1404
+ },
1405
+ "patternProperties": {
1406
+ "^x-": {
1407
+ "$ref": "#/definitions/vendorExtension"
1408
+ }
1409
+ }
1410
+ },
1411
+ "oauth2ApplicationSecurity": {
1412
+ "type": "object",
1413
+ "additionalProperties": false,
1414
+ "required": [
1415
+ "type",
1416
+ "flow",
1417
+ "tokenUrl"
1418
+ ],
1419
+ "properties": {
1420
+ "type": {
1421
+ "type": "string",
1422
+ "enum": [
1423
+ "oauth2"
1424
+ ]
1425
+ },
1426
+ "flow": {
1427
+ "type": "string",
1428
+ "enum": [
1429
+ "application"
1430
+ ]
1431
+ },
1432
+ "scopes": {
1433
+ "$ref": "#/definitions/oauth2Scopes"
1434
+ },
1435
+ "tokenUrl": {
1436
+ "type": "string",
1437
+ "format": "uri"
1438
+ },
1439
+ "description": {
1440
+ "type": "string"
1441
+ }
1442
+ },
1443
+ "patternProperties": {
1444
+ "^x-": {
1445
+ "$ref": "#/definitions/vendorExtension"
1446
+ }
1447
+ }
1448
+ },
1449
+ "oauth2AccessCodeSecurity": {
1450
+ "type": "object",
1451
+ "additionalProperties": false,
1452
+ "required": [
1453
+ "type",
1454
+ "flow",
1455
+ "authorizationUrl",
1456
+ "tokenUrl"
1457
+ ],
1458
+ "properties": {
1459
+ "type": {
1460
+ "type": "string",
1461
+ "enum": [
1462
+ "oauth2"
1463
+ ]
1464
+ },
1465
+ "flow": {
1466
+ "type": "string",
1467
+ "enum": [
1468
+ "accessCode"
1469
+ ]
1470
+ },
1471
+ "scopes": {
1472
+ "$ref": "#/definitions/oauth2Scopes"
1473
+ },
1474
+ "authorizationUrl": {
1475
+ "type": "string",
1476
+ "format": "uri"
1477
+ },
1478
+ "tokenUrl": {
1479
+ "type": "string",
1480
+ "format": "uri"
1481
+ },
1482
+ "description": {
1483
+ "type": "string"
1484
+ }
1485
+ },
1486
+ "patternProperties": {
1487
+ "^x-": {
1488
+ "$ref": "#/definitions/vendorExtension"
1489
+ }
1490
+ }
1491
+ },
1492
+ "oauth2Scopes": {
1493
+ "type": "object",
1494
+ "additionalProperties": {
1495
+ "type": "string"
1496
+ }
1497
+ },
1498
+ "mediaTypeList": {
1499
+ "type": "array",
1500
+ "items": {
1501
+ "$ref": "#/definitions/mimeType"
1502
+ },
1503
+ "uniqueItems": true
1504
+ },
1505
+ "parametersList": {
1506
+ "type": "array",
1507
+ "description": "The parameters needed to send a valid API call.",
1508
+ "additionalItems": false,
1509
+ "items": {
1510
+ "oneOf": [
1511
+ {
1512
+ "$ref": "#/definitions/parameter"
1513
+ },
1514
+ {
1515
+ "$ref": "#/definitions/jsonReference"
1516
+ }
1517
+ ]
1518
+ },
1519
+ "uniqueItems": true
1520
+ },
1521
+ "schemesList": {
1522
+ "type": "array",
1523
+ "description": "The transfer protocol of the API.",
1524
+ "items": {
1525
+ "type": "string",
1526
+ "enum": [
1527
+ "http",
1528
+ "https",
1529
+ "ws",
1530
+ "wss"
1531
+ ]
1532
+ },
1533
+ "uniqueItems": true
1534
+ },
1535
+ "collectionFormat": {
1536
+ "type": "string",
1537
+ "enum": [
1538
+ "csv",
1539
+ "ssv",
1540
+ "tsv",
1541
+ "pipes"
1542
+ ],
1543
+ "default": "csv"
1544
+ },
1545
+ "collectionFormatWithMulti": {
1546
+ "type": "string",
1547
+ "enum": [
1548
+ "csv",
1549
+ "ssv",
1550
+ "tsv",
1551
+ "pipes",
1552
+ "multi"
1553
+ ],
1554
+ "default": "csv"
1555
+ },
1556
+ "title": {
1557
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/title"
1558
+ },
1559
+ "description": {
1560
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/description"
1561
+ },
1562
+ "default": {
1563
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/default"
1564
+ },
1565
+ "multipleOf": {
1566
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf"
1567
+ },
1568
+ "maximum": {
1569
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum"
1570
+ },
1571
+ "exclusiveMaximum": {
1572
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum"
1573
+ },
1574
+ "minimum": {
1575
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum"
1576
+ },
1577
+ "exclusiveMinimum": {
1578
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum"
1579
+ },
1580
+ "maxLength": {
1581
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
1582
+ },
1583
+ "minLength": {
1584
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
1585
+ },
1586
+ "pattern": {
1587
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern"
1588
+ },
1589
+ "maxItems": {
1590
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger"
1591
+ },
1592
+ "minItems": {
1593
+ "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0"
1594
+ },
1595
+ "uniqueItems": {
1596
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems"
1597
+ },
1598
+ "enum": {
1599
+ "$ref": "http://json-schema.org/draft-04/schema#/properties/enum"
1600
+ },
1601
+ "jsonReference": {
1602
+ "type": "object",
1603
+ "required": [
1604
+ "$ref"
1605
+ ],
1606
+ "additionalProperties": false,
1607
+ "properties": {
1608
+ "$ref": {
1609
+ "type": "string"
1610
+ }
1611
+ }
1612
+ }
1613
+ }
1614
+ }