@scalar/openapi-types 0.2.1 → 0.2.2

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 (242) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.js +2 -1
  3. package/dist/index.js.map +7 -0
  4. package/dist/openapi-types.js +28 -33
  5. package/dist/openapi-types.js.map +7 -0
  6. package/dist/openapi-types.test-d.js +52 -0
  7. package/dist/openapi-types.test-d.js.map +7 -0
  8. package/dist/schemas/3.1/compliance/callback-object.test.js +97 -0
  9. package/dist/schemas/3.1/compliance/callback-object.test.js.map +7 -0
  10. package/dist/schemas/3.1/compliance/contact-object.test.js +19 -0
  11. package/dist/schemas/3.1/compliance/contact-object.test.js.map +7 -0
  12. package/dist/schemas/3.1/compliance/example-object.test.js +91 -0
  13. package/dist/schemas/3.1/compliance/example-object.test.js.map +7 -0
  14. package/dist/schemas/3.1/compliance/external-documentation-object.test.js +17 -0
  15. package/dist/schemas/3.1/compliance/external-documentation-object.test.js.map +7 -0
  16. package/dist/schemas/3.1/compliance/header-object.test.js +47 -0
  17. package/dist/schemas/3.1/compliance/header-object.test.js.map +7 -0
  18. package/dist/schemas/3.1/compliance/info-object.test.js +41 -0
  19. package/dist/schemas/3.1/compliance/info-object.test.js.map +7 -0
  20. package/dist/schemas/3.1/compliance/license-object.test.js +17 -0
  21. package/dist/schemas/3.1/compliance/license-object.test.js.map +7 -0
  22. package/dist/schemas/3.1/compliance/media-type-object.test.js +69 -0
  23. package/dist/schemas/3.1/compliance/media-type-object.test.js.map +7 -0
  24. package/dist/schemas/3.1/compliance/openapi-object.test.js +381 -0
  25. package/dist/schemas/3.1/compliance/openapi-object.test.js.map +7 -0
  26. package/dist/schemas/3.1/compliance/operation-object.test.js +467 -0
  27. package/dist/schemas/3.1/compliance/operation-object.test.js.map +7 -0
  28. package/dist/schemas/3.1/compliance/parameter-object.test.js +155 -0
  29. package/dist/schemas/3.1/compliance/parameter-object.test.js.map +7 -0
  30. package/dist/schemas/3.1/compliance/path-item-object.test.js +103 -0
  31. package/dist/schemas/3.1/compliance/path-item-object.test.js.map +7 -0
  32. package/dist/schemas/3.1/compliance/reference-object.test.js +282 -0
  33. package/dist/schemas/3.1/compliance/reference-object.test.js.map +7 -0
  34. package/dist/schemas/3.1/compliance/request-body-object.test.js +97 -0
  35. package/dist/schemas/3.1/compliance/request-body-object.test.js.map +7 -0
  36. package/dist/schemas/3.1/compliance/response-object.test.js +131 -0
  37. package/dist/schemas/3.1/compliance/response-object.test.js.map +7 -0
  38. package/dist/schemas/3.1/compliance/responses-object.test.js +53 -0
  39. package/dist/schemas/3.1/compliance/responses-object.test.js.map +7 -0
  40. package/dist/schemas/3.1/compliance/runtime-expression.test.js +165 -0
  41. package/dist/schemas/3.1/compliance/runtime-expression.test.js.map +7 -0
  42. package/dist/schemas/3.1/compliance/schema-object.test.js +470 -0
  43. package/dist/schemas/3.1/compliance/schema-object.test.js.map +7 -0
  44. package/dist/schemas/3.1/compliance/security-requirement-object.test.js +54 -0
  45. package/dist/schemas/3.1/compliance/security-requirement-object.test.js.map +7 -0
  46. package/dist/schemas/3.1/compliance/security-scheme-object.test.js +123 -0
  47. package/dist/schemas/3.1/compliance/security-scheme-object.test.js.map +7 -0
  48. package/dist/schemas/3.1/compliance/server-object.test.js +17 -0
  49. package/dist/schemas/3.1/compliance/server-object.test.js.map +7 -0
  50. package/dist/schemas/3.1/compliance/tag-object.test.js +17 -0
  51. package/dist/schemas/3.1/compliance/tag-object.test.js.map +7 -0
  52. package/dist/schemas/3.1/processed/base-path-item-object.js +27 -33
  53. package/dist/schemas/3.1/processed/base-path-item-object.js.map +7 -0
  54. package/dist/schemas/3.1/processed/callback-object.js +7 -16
  55. package/dist/schemas/3.1/processed/callback-object.js.map +7 -0
  56. package/dist/schemas/3.1/processed/components-object.js +55 -62
  57. package/dist/schemas/3.1/processed/components-object.js.map +7 -0
  58. package/dist/schemas/3.1/processed/contact-object.js +11 -17
  59. package/dist/schemas/3.1/processed/contact-object.js.map +7 -0
  60. package/dist/schemas/3.1/processed/discriminator-object.js +15 -26
  61. package/dist/schemas/3.1/processed/discriminator-object.js.map +7 -0
  62. package/dist/schemas/3.1/processed/encoding-object.js +17 -28
  63. package/dist/schemas/3.1/processed/encoding-object.js.map +7 -0
  64. package/dist/schemas/3.1/processed/example-object.js +23 -33
  65. package/dist/schemas/3.1/processed/example-object.js.map +7 -0
  66. package/dist/schemas/3.1/processed/external-documentation-object.js +9 -15
  67. package/dist/schemas/3.1/processed/external-documentation-object.js.map +7 -0
  68. package/dist/schemas/3.1/processed/header-object.js +48 -64
  69. package/dist/schemas/3.1/processed/header-object.js.map +7 -0
  70. package/dist/schemas/3.1/processed/index.js +87 -30
  71. package/dist/schemas/3.1/processed/index.js.map +7 -0
  72. package/dist/schemas/3.1/processed/info-object.js +36 -43
  73. package/dist/schemas/3.1/processed/info-object.js.map +7 -0
  74. package/dist/schemas/3.1/processed/license-object.js +13 -19
  75. package/dist/schemas/3.1/processed/license-object.js.map +7 -0
  76. package/dist/schemas/3.1/processed/link-object.js +36 -50
  77. package/dist/schemas/3.1/processed/link-object.js.map +7 -0
  78. package/dist/schemas/3.1/processed/media-type-object-without-encoding.js +26 -32
  79. package/dist/schemas/3.1/processed/media-type-object-without-encoding.js.map +7 -0
  80. package/dist/schemas/3.1/processed/media-type-object.js +30 -36
  81. package/dist/schemas/3.1/processed/media-type-object.js.map +7 -0
  82. package/dist/schemas/3.1/processed/openapi-object.js +70 -78
  83. package/dist/schemas/3.1/processed/openapi-object.js.map +7 -0
  84. package/dist/schemas/3.1/processed/operation-object-without-callbacks.js +64 -70
  85. package/dist/schemas/3.1/processed/operation-object-without-callbacks.js.map +7 -0
  86. package/dist/schemas/3.1/processed/operation-object.js +14 -20
  87. package/dist/schemas/3.1/processed/operation-object.js.map +7 -0
  88. package/dist/schemas/3.1/processed/parameter-object.js +83 -91
  89. package/dist/schemas/3.1/processed/parameter-object.js.map +7 -0
  90. package/dist/schemas/3.1/processed/path-item-object-without-callbacks.js +38 -46
  91. package/dist/schemas/3.1/processed/path-item-object-without-callbacks.js.map +7 -0
  92. package/dist/schemas/3.1/processed/path-item-object.js +38 -46
  93. package/dist/schemas/3.1/processed/path-item-object.js.map +7 -0
  94. package/dist/schemas/3.1/processed/paths-object.js +16 -22
  95. package/dist/schemas/3.1/processed/paths-object.js.map +7 -0
  96. package/dist/schemas/3.1/processed/request-body-object.js +25 -31
  97. package/dist/schemas/3.1/processed/request-body-object.js.map +7 -0
  98. package/dist/schemas/3.1/processed/response-object.js +28 -34
  99. package/dist/schemas/3.1/processed/response-object.js.map +7 -0
  100. package/dist/schemas/3.1/processed/responses-object.js +17 -30
  101. package/dist/schemas/3.1/processed/responses-object.js.map +7 -0
  102. package/dist/schemas/3.1/processed/runtime-expression.js +50 -81
  103. package/dist/schemas/3.1/processed/runtime-expression.js.map +7 -0
  104. package/dist/schemas/3.1/processed/schema-object.js +88 -89
  105. package/dist/schemas/3.1/processed/schema-object.js.map +7 -0
  106. package/dist/schemas/3.1/processed/schema-object.test.js +310 -0
  107. package/dist/schemas/3.1/processed/schema-object.test.js.map +7 -0
  108. package/dist/schemas/3.1/processed/security-requirement-object.js +20 -36
  109. package/dist/schemas/3.1/processed/security-requirement-object.js.map +7 -0
  110. package/dist/schemas/3.1/processed/security-scheme-object.js +114 -142
  111. package/dist/schemas/3.1/processed/security-scheme-object.js.map +7 -0
  112. package/dist/schemas/3.1/processed/server-object.js +19 -25
  113. package/dist/schemas/3.1/processed/server-object.js.map +7 -0
  114. package/dist/schemas/3.1/processed/server-variable-object.js +19 -25
  115. package/dist/schemas/3.1/processed/server-variable-object.js.map +7 -0
  116. package/dist/schemas/3.1/processed/tag-object.js +12 -19
  117. package/dist/schemas/3.1/processed/tag-object.js.map +7 -0
  118. package/dist/schemas/3.1/processed/webhooks-object.js +6 -18
  119. package/dist/schemas/3.1/processed/webhooks-object.js.map +7 -0
  120. package/dist/schemas/3.1/processed/xml-object.js +28 -38
  121. package/dist/schemas/3.1/processed/xml-object.js.map +7 -0
  122. package/dist/schemas/3.1/unprocessed/base-path-item-object.js +16 -22
  123. package/dist/schemas/3.1/unprocessed/base-path-item-object.js.map +7 -0
  124. package/dist/schemas/3.1/unprocessed/callback-object.js +6 -15
  125. package/dist/schemas/3.1/unprocessed/callback-object.js.map +7 -0
  126. package/dist/schemas/3.1/unprocessed/components-object.js +58 -65
  127. package/dist/schemas/3.1/unprocessed/components-object.js.map +7 -0
  128. package/dist/schemas/3.1/unprocessed/contact-object.js +6 -12
  129. package/dist/schemas/3.1/unprocessed/contact-object.js.map +7 -0
  130. package/dist/schemas/3.1/unprocessed/discriminator-object.js +6 -17
  131. package/dist/schemas/3.1/unprocessed/discriminator-object.js.map +7 -0
  132. package/dist/schemas/3.1/unprocessed/encoding-object.js +14 -25
  133. package/dist/schemas/3.1/unprocessed/encoding-object.js.map +7 -0
  134. package/dist/schemas/3.1/unprocessed/example-object.js +6 -16
  135. package/dist/schemas/3.1/unprocessed/example-object.js.map +7 -0
  136. package/dist/schemas/3.1/unprocessed/external-documentation-object.js +6 -12
  137. package/dist/schemas/3.1/unprocessed/external-documentation-object.js.map +7 -0
  138. package/dist/schemas/3.1/unprocessed/header-object.js +25 -41
  139. package/dist/schemas/3.1/unprocessed/header-object.js.map +7 -0
  140. package/dist/schemas/3.1/unprocessed/index.js +89 -31
  141. package/dist/schemas/3.1/unprocessed/index.js.map +7 -0
  142. package/dist/schemas/3.1/unprocessed/info-object.js +6 -13
  143. package/dist/schemas/3.1/unprocessed/info-object.js.map +7 -0
  144. package/dist/schemas/3.1/unprocessed/license-object.js +6 -12
  145. package/dist/schemas/3.1/unprocessed/license-object.js.map +7 -0
  146. package/dist/schemas/3.1/unprocessed/link-object.js +6 -20
  147. package/dist/schemas/3.1/unprocessed/link-object.js.map +7 -0
  148. package/dist/schemas/3.1/unprocessed/media-type-object-without-encoding.js +6 -12
  149. package/dist/schemas/3.1/unprocessed/media-type-object-without-encoding.js.map +7 -0
  150. package/dist/schemas/3.1/unprocessed/media-type-object.js +33 -39
  151. package/dist/schemas/3.1/unprocessed/media-type-object.js.map +7 -0
  152. package/dist/schemas/3.1/unprocessed/openapi-object.js +6 -12
  153. package/dist/schemas/3.1/unprocessed/openapi-object.js.map +7 -0
  154. package/dist/schemas/3.1/unprocessed/operation-object-without-callbacks.js +38 -44
  155. package/dist/schemas/3.1/unprocessed/operation-object-without-callbacks.js.map +7 -0
  156. package/dist/schemas/3.1/unprocessed/operation-object.js +15 -21
  157. package/dist/schemas/3.1/unprocessed/operation-object.js.map +7 -0
  158. package/dist/schemas/3.1/unprocessed/parameter-object.js +22 -30
  159. package/dist/schemas/3.1/unprocessed/parameter-object.js.map +7 -0
  160. package/dist/schemas/3.1/unprocessed/path-item-object-without-callbacks.js +38 -46
  161. package/dist/schemas/3.1/unprocessed/path-item-object-without-callbacks.js.map +7 -0
  162. package/dist/schemas/3.1/unprocessed/path-item-object.js +52 -60
  163. package/dist/schemas/3.1/unprocessed/path-item-object.js.map +7 -0
  164. package/dist/schemas/3.1/unprocessed/paths-object.js +6 -14
  165. package/dist/schemas/3.1/unprocessed/paths-object.js.map +7 -0
  166. package/dist/schemas/3.1/unprocessed/reference-object.js +20 -28
  167. package/dist/schemas/3.1/unprocessed/reference-object.js.map +7 -0
  168. package/dist/schemas/3.1/unprocessed/request-body-object.js +6 -12
  169. package/dist/schemas/3.1/unprocessed/request-body-object.js.map +7 -0
  170. package/dist/schemas/3.1/unprocessed/response-object.js +27 -33
  171. package/dist/schemas/3.1/unprocessed/response-object.js.map +7 -0
  172. package/dist/schemas/3.1/unprocessed/responses-object.js +18 -31
  173. package/dist/schemas/3.1/unprocessed/responses-object.js.map +7 -0
  174. package/dist/schemas/3.1/unprocessed/runtime-expression.js +6 -17
  175. package/dist/schemas/3.1/unprocessed/runtime-expression.js.map +7 -0
  176. package/dist/schemas/3.1/unprocessed/schema-object.js +31 -32
  177. package/dist/schemas/3.1/unprocessed/schema-object.js.map +7 -0
  178. package/dist/schemas/3.1/unprocessed/security-requirement-object.js +6 -23
  179. package/dist/schemas/3.1/unprocessed/security-requirement-object.js.map +7 -0
  180. package/dist/schemas/3.1/unprocessed/security-scheme-object.js +41 -29
  181. package/dist/schemas/3.1/unprocessed/security-scheme-object.js.map +7 -0
  182. package/dist/schemas/3.1/unprocessed/server-object.js +6 -12
  183. package/dist/schemas/3.1/unprocessed/server-object.js.map +7 -0
  184. package/dist/schemas/3.1/unprocessed/server-variable-object.js +6 -12
  185. package/dist/schemas/3.1/unprocessed/server-variable-object.js.map +7 -0
  186. package/dist/schemas/3.1/unprocessed/tag-object.js +6 -13
  187. package/dist/schemas/3.1/unprocessed/tag-object.js.map +7 -0
  188. package/dist/schemas/3.1/unprocessed/webhooks-object.js +6 -18
  189. package/dist/schemas/3.1/unprocessed/webhooks-object.js.map +7 -0
  190. package/dist/schemas/3.1/unprocessed/xml-object.js +6 -16
  191. package/dist/schemas/3.1/unprocessed/xml-object.js.map +7 -0
  192. package/dist/schemas/extensions/index.js +29 -11
  193. package/dist/schemas/extensions/index.js.map +7 -0
  194. package/dist/schemas/extensions/x-additional-properties-name.js +6 -12
  195. package/dist/schemas/extensions/x-additional-properties-name.js.map +7 -0
  196. package/dist/schemas/extensions/x-additional-properties-name.test.js +28 -0
  197. package/dist/schemas/extensions/x-additional-properties-name.test.js.map +7 -0
  198. package/dist/schemas/extensions/x-code-samples.js +12 -10
  199. package/dist/schemas/extensions/x-code-samples.js.map +7 -0
  200. package/dist/schemas/extensions/x-code-samples.test.js +82 -0
  201. package/dist/schemas/extensions/x-code-samples.test.js.map +7 -0
  202. package/dist/schemas/extensions/x-display-name.js +8 -0
  203. package/dist/schemas/extensions/x-display-name.js.map +7 -0
  204. package/dist/schemas/extensions/x-display-name.test.js +28 -0
  205. package/dist/schemas/extensions/x-display-name.test.js.map +7 -0
  206. package/dist/schemas/extensions/x-enum-descriptions.js +6 -18
  207. package/dist/schemas/extensions/x-enum-descriptions.js.map +7 -0
  208. package/dist/schemas/extensions/x-enum-descriptions.test.js +36 -0
  209. package/dist/schemas/extensions/x-enum-descriptions.test.js.map +7 -0
  210. package/dist/schemas/extensions/x-internal.js +6 -5
  211. package/dist/schemas/extensions/x-internal.js.map +7 -0
  212. package/dist/schemas/extensions/x-internal.test.js +20 -0
  213. package/dist/schemas/extensions/x-internal.test.js.map +7 -0
  214. package/dist/schemas/extensions/x-scalar-icon.js +6 -5
  215. package/dist/schemas/extensions/x-scalar-icon.js.map +7 -0
  216. package/dist/schemas/extensions/x-scalar-icon.test.js +14 -0
  217. package/dist/schemas/extensions/x-scalar-icon.test.js.map +7 -0
  218. package/dist/schemas/extensions/x-scalar-ignore.js +6 -5
  219. package/dist/schemas/extensions/x-scalar-ignore.js.map +7 -0
  220. package/dist/schemas/extensions/x-scalar-ignore.test.js +20 -0
  221. package/dist/schemas/extensions/x-scalar-ignore.test.js.map +7 -0
  222. package/dist/schemas/extensions/x-scalar-redirect-uri.js +6 -5
  223. package/dist/schemas/extensions/x-scalar-redirect-uri.js.map +7 -0
  224. package/dist/schemas/extensions/x-scalar-redirect-uri.test.js +23 -0
  225. package/dist/schemas/extensions/x-scalar-redirect-uri.test.js.map +7 -0
  226. package/dist/schemas/extensions/x-scalar-sdk-installation.js +10 -13
  227. package/dist/schemas/extensions/x-scalar-sdk-installation.js.map +7 -0
  228. package/dist/schemas/extensions/x-scalar-sdk-installation.test.js +25 -0
  229. package/dist/schemas/extensions/x-scalar-sdk-installation.test.js.map +7 -0
  230. package/dist/schemas/extensions/x-scalar-stability.js +10 -19
  231. package/dist/schemas/extensions/x-scalar-stability.js.map +7 -0
  232. package/dist/schemas/extensions/x-scalar-stability.test.js +33 -0
  233. package/dist/schemas/extensions/x-scalar-stability.test.js.map +7 -0
  234. package/dist/schemas/extensions/x-tag-groups.js +14 -17
  235. package/dist/schemas/extensions/x-tag-groups.js.map +7 -0
  236. package/dist/schemas/extensions/x-tag-groups.test.js +55 -0
  237. package/dist/schemas/extensions/x-tag-groups.test.js.map +7 -0
  238. package/dist/schemas/extensions/x-use-pkce.js +11 -10
  239. package/dist/schemas/extensions/x-use-pkce.js.map +7 -0
  240. package/dist/schemas/extensions/x-use-pkce.test.js +34 -0
  241. package/dist/schemas/extensions/x-use-pkce.test.js.map +7 -0
  242. package/package.json +4 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scalar/openapi-types
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8c7bad8: chore: move build tooling to esbuild
8
+
3
9
  ## 0.2.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1 +1,2 @@
1
- export { OpenAPIV2, OpenAPIV3 } from './openapi-types.js';
1
+ export * from "./openapi-types.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.ts"],
4
+ "sourcesContent": ["export * from './openapi-types'\n"],
5
+ "mappings": "AAAA,cAAc;",
6
+ "names": []
7
+ }
@@ -1,37 +1,32 @@
1
- /**
2
- * These types are copied from openapi-types, with two modifications:
3
- *
4
- * - all attributes are optional, you can’t rely on the specification for user input
5
- * - extensions (basically any attributes, not only prefixed with an `x-`) are allowed
6
- *
7
- * We deal with user input and can’t assume they really stick to any official specification.
8
- */
9
- // biome-ignore lint/style/noNamespace: We want it to be a module here.
10
1
  var OpenAPIV3;
11
- (function (OpenAPIV3) {
12
- (function (HttpMethods) {
13
- HttpMethods["GET"] = "get";
14
- HttpMethods["PUT"] = "put";
15
- HttpMethods["POST"] = "post";
16
- HttpMethods["DELETE"] = "delete";
17
- HttpMethods["OPTIONS"] = "options";
18
- HttpMethods["HEAD"] = "head";
19
- HttpMethods["PATCH"] = "patch";
20
- HttpMethods["TRACE"] = "trace";
21
- })(OpenAPIV3.HttpMethods || (OpenAPIV3.HttpMethods = {}));
2
+ ((OpenAPIV32) => {
3
+ let HttpMethods;
4
+ ((HttpMethods2) => {
5
+ HttpMethods2["GET"] = "get";
6
+ HttpMethods2["PUT"] = "put";
7
+ HttpMethods2["POST"] = "post";
8
+ HttpMethods2["DELETE"] = "delete";
9
+ HttpMethods2["OPTIONS"] = "options";
10
+ HttpMethods2["HEAD"] = "head";
11
+ HttpMethods2["PATCH"] = "patch";
12
+ HttpMethods2["TRACE"] = "trace";
13
+ })(HttpMethods = OpenAPIV32.HttpMethods || (OpenAPIV32.HttpMethods = {}));
22
14
  })(OpenAPIV3 || (OpenAPIV3 = {}));
23
- // biome-ignore lint/style/noNamespace: We want it to be a module here.
24
15
  var OpenAPIV2;
25
- (function (OpenAPIV2) {
26
- (function (HttpMethods) {
27
- HttpMethods["GET"] = "get";
28
- HttpMethods["PUT"] = "put";
29
- HttpMethods["POST"] = "post";
30
- HttpMethods["DELETE"] = "delete";
31
- HttpMethods["OPTIONS"] = "options";
32
- HttpMethods["HEAD"] = "head";
33
- HttpMethods["PATCH"] = "patch";
34
- })(OpenAPIV2.HttpMethods || (OpenAPIV2.HttpMethods = {}));
16
+ ((OpenAPIV22) => {
17
+ let HttpMethods;
18
+ ((HttpMethods2) => {
19
+ HttpMethods2["GET"] = "get";
20
+ HttpMethods2["PUT"] = "put";
21
+ HttpMethods2["POST"] = "post";
22
+ HttpMethods2["DELETE"] = "delete";
23
+ HttpMethods2["OPTIONS"] = "options";
24
+ HttpMethods2["HEAD"] = "head";
25
+ HttpMethods2["PATCH"] = "patch";
26
+ })(HttpMethods = OpenAPIV22.HttpMethods || (OpenAPIV22.HttpMethods = {}));
35
27
  })(OpenAPIV2 || (OpenAPIV2 = {}));
36
-
37
- export { OpenAPIV2, OpenAPIV3 };
28
+ export {
29
+ OpenAPIV2,
30
+ OpenAPIV3
31
+ };
32
+ //# sourceMappingURL=openapi-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/openapi-types.ts"],
4
+ "sourcesContent": ["/**\n * These types are copied from openapi-types, with two modifications:\n *\n * - all attributes are optional, you can\u2019t rely on the specification for user input\n * - extensions (basically any attributes, not only prefixed with an `x-`) are allowed\n *\n * We deal with user input and can\u2019t assume they really stick to any official specification.\n */\n\n/** any other attribute, for example x-* extensions */\ntype AnyOtherAttribute = {\n /** OpenAPI extension */\n [customExtension: `x-${string}`]: any\n /** Unknown attribute */\n [key: string]: any\n}\n\n// biome-ignore lint/style/noNamespace: We want it to be a module here.\nexport namespace OpenAPI {\n // OpenAPI extensions can be declared using generics\n // e.g.:\n // OpenAPI.Document<{\n // 'x-foobar': Foobar\n // }>\n export type Document<T extends AnyOtherAttribute = {}> =\n | OpenAPIV2.Document<T>\n | OpenAPIV3.Document<T>\n | OpenAPIV3_1.Document<T>\n\n export type Operation<T = {}> =\n | OpenAPIV2.OperationObject<T>\n | OpenAPIV3.OperationObject<T>\n | OpenAPIV3_1.OperationObject<T>\n\n export type Request = {\n body?: any\n headers?: object\n params?: object\n query?: object\n }\n\n export type ResponseObject = OpenAPIV2.ResponseObject | OpenAPIV3.ResponseObject | OpenAPIV3_1.ResponseObject\n\n export type HeaderObject = OpenAPIV2.HeaderObject | OpenAPIV3.HeaderObject | OpenAPIV3_1.HeaderObject\n\n export type Parameter =\n | OpenAPIV3_1.ReferenceObject\n | OpenAPIV3_1.ParameterObject\n | OpenAPIV3.ReferenceObject\n | OpenAPIV3.ParameterObject\n | OpenAPIV2.ReferenceObject\n | OpenAPIV2.Parameter\n\n export type Parameters =\n | (OpenAPIV3_1.ReferenceObject | OpenAPIV3_1.ParameterObject)[]\n | (OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject)[]\n | (OpenAPIV2.ReferenceObject | OpenAPIV2.Parameter)[]\n\n export type ExampleObject = OpenAPIV2.ExampleObject | OpenAPIV3.ExampleObject | OpenAPIV3_1.ExampleObject\n\n export type SchemaObject = OpenAPIV2.SchemaObject | OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject\n\n export type HttpMethod =\n | keyof typeof OpenAPIV2.HttpMethods\n | keyof typeof OpenAPIV3.HttpMethods\n | OpenAPIV3_1.HttpMethods\n}\n\n// biome-ignore lint/style/noNamespace: We want it to be a module here.\nexport namespace OpenAPIV3_1 {\n type Modify<T, R> = Omit<T, keyof R> & R\n\n type PathsWebhooksComponents<T = {}> = {\n paths?: PathsObject<T>\n webhooks?: Record<string, PathItemObject | ReferenceObject>\n components?: ComponentsObject\n }\n\n export type Document<T = {}> = Modify<\n Omit<OpenAPIV3.Document<T>, 'paths' | 'components'>,\n {\n /**\n * Version of the OpenAPI specification\n * @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions\n */\n openapi?: '3.1.0' | '3.1.1'\n swagger?: undefined\n info?: InfoObject\n jsonSchemaDialect?: string\n servers?: ServerObject[]\n } & (\n | (Pick<PathsWebhooksComponents<T>, 'paths'> & Omit<Partial<PathsWebhooksComponents<T>>, 'paths'>)\n | (Pick<PathsWebhooksComponents<T>, 'webhooks'> & Omit<Partial<PathsWebhooksComponents<T>>, 'webhooks'>)\n | (Pick<PathsWebhooksComponents<T>, 'components'> & Omit<Partial<PathsWebhooksComponents<T>>, 'components'>)\n ) &\n T &\n AnyOtherAttribute\n >\n\n export type InfoObject = Modify<\n OpenAPIV3.InfoObject,\n {\n summary?: string\n license?: LicenseObject\n }\n >\n\n export type ContactObject = OpenAPIV3.ContactObject\n\n export type LicenseObject = Modify<\n OpenAPIV3.LicenseObject,\n {\n identifier?: string\n }\n >\n\n export type ServerObject = Modify<\n OpenAPIV3.ServerObject,\n {\n url?: string\n description?: string\n variables?: Record<string, ServerVariableObject>\n }\n >\n\n export type ServerVariableObject = Modify<\n OpenAPIV3.ServerVariableObject,\n {\n enum?: [string, ...string[]]\n }\n >\n\n export type PathsObject<T = {}, P extends {} = {}> = Record<string, (PathItemObject<T> & P) | undefined>\n\n export type HttpMethods = OpenAPIV3.HttpMethods\n\n export type PathItemObject<T = {}> = Modify<\n OpenAPIV3.PathItemObject<T>,\n {\n servers?: ServerObject[]\n parameters?: (ReferenceObject | ParameterObject)[]\n }\n > & {\n [method in HttpMethods]?: OperationObject<T>\n }\n\n export type OperationObject<T = {}> = Modify<\n OpenAPIV3.OperationObject<T>,\n {\n parameters?: (ReferenceObject | ParameterObject)[]\n requestBody?: ReferenceObject | RequestBodyObject\n responses?: ResponsesObject\n callbacks?: Record<string, ReferenceObject | CallbackObject>\n servers?: ServerObject[]\n }\n > &\n T\n\n export type ExternalDocumentationObject = OpenAPIV3.ExternalDocumentationObject\n\n export type ParameterObject = OpenAPIV3.ParameterObject\n\n export type HeaderObject = OpenAPIV3.HeaderObject\n\n export type ParameterBaseObject = OpenAPIV3.ParameterBaseObject\n\n export type NonArraySchemaObjectType = OpenAPIV3.NonArraySchemaObjectType | 'null'\n\n export type ArraySchemaObjectType = OpenAPIV3.ArraySchemaObjectType\n\n /**\n * There is no way to tell typescript to require items when type is either 'array' or array containing 'array' type\n * 'items' will be always visible as optional\n * Casting schema object to ArraySchemaObject or NonArraySchemaObject will work fine\n */\n export type SchemaObject = (ArraySchemaObject | NonArraySchemaObject | MixedSchemaObject | boolean) &\n AnyOtherAttribute\n\n export type ArraySchemaObject = {\n type?: ArraySchemaObjectType\n items?: ReferenceObject | SchemaObject\n } & BaseSchemaObject\n\n export type NonArraySchemaObject = {\n type?: NonArraySchemaObjectType\n } & BaseSchemaObject\n\n type MixedSchemaObject = {\n type?: (ArraySchemaObjectType | NonArraySchemaObjectType)[]\n items?: ReferenceObject | SchemaObject\n } & BaseSchemaObject\n\n export type BaseSchemaObject = Modify<\n Omit<OpenAPIV3.BaseSchemaObject, 'nullable'>,\n {\n examples?: OpenAPIV3.BaseSchemaObject['example'][]\n exclusiveMinimum?: boolean | number\n exclusiveMaximum?: boolean | number\n contentMediaType?: string\n $schema?: string\n additionalProperties?: boolean | ReferenceObject | SchemaObject\n properties?: {\n [name: string]: ReferenceObject | SchemaObject\n }\n patternProperties?: {\n [name: string]: ReferenceObject | SchemaObject\n }\n allOf?: (ReferenceObject | SchemaObject)[]\n oneOf?: (ReferenceObject | SchemaObject)[]\n anyOf?: (ReferenceObject | SchemaObject)[]\n not?: ReferenceObject | SchemaObject\n discriminator?: DiscriminatorObject\n externalDocs?: ExternalDocumentationObject\n xml?: XMLObject\n const?: any\n }\n >\n\n export type DiscriminatorObject = OpenAPIV3.DiscriminatorObject\n\n export type XMLObject = OpenAPIV3.XMLObject\n\n export type ReferenceObject = Modify<\n OpenAPIV3.ReferenceObject,\n {\n summary?: string\n description?: string\n }\n >\n\n export type ExampleObject = OpenAPIV3.ExampleObject\n\n export type MediaTypeObject = Modify<\n OpenAPIV3.MediaTypeObject,\n {\n schema?: SchemaObject | ReferenceObject\n examples?: Record<string, ReferenceObject | ExampleObject>\n }\n >\n\n export type EncodingObject = OpenAPIV3.EncodingObject\n\n export type RequestBodyObject = Modify<\n OpenAPIV3.RequestBodyObject,\n {\n content?: { [media: string]: MediaTypeObject }\n }\n >\n\n export type ResponsesObject = Record<string, ReferenceObject | ResponseObject>\n\n export type ResponseObject = Modify<\n OpenAPIV3.ResponseObject,\n {\n headers?: { [header: string]: ReferenceObject | HeaderObject }\n content?: { [media: string]: MediaTypeObject }\n links?: { [link: string]: ReferenceObject | LinkObject }\n }\n >\n\n export type LinkObject = Modify<\n OpenAPIV3.LinkObject,\n {\n server?: ServerObject\n }\n >\n\n export type CallbackObject = Record<string, PathItemObject | ReferenceObject>\n\n export type SecurityRequirementObject = OpenAPIV3.SecurityRequirementObject\n\n export type ComponentsObject = Modify<\n OpenAPIV3.ComponentsObject,\n {\n schemas?: Record<string, SchemaObject>\n responses?: Record<string, ReferenceObject | ResponseObject>\n parameters?: Record<string, ReferenceObject | ParameterObject>\n examples?: Record<string, ReferenceObject | ExampleObject>\n requestBodies?: Record<string, ReferenceObject | RequestBodyObject>\n headers?: Record<string, ReferenceObject | HeaderObject>\n securitySchemes?: Record<string, ReferenceObject | SecuritySchemeObject>\n links?: Record<string, ReferenceObject | LinkObject>\n callbacks?: Record<string, ReferenceObject | CallbackObject>\n pathItems?: Record<string, ReferenceObject | PathItemObject>\n }\n >\n\n export type SecuritySchemeObject = OpenAPIV3.SecuritySchemeObject\n\n export type HttpSecurityScheme = OpenAPIV3.HttpSecurityScheme\n\n export type ApiKeySecurityScheme = OpenAPIV3.ApiKeySecurityScheme\n\n export type OAuth2SecurityScheme = OpenAPIV3.OAuth2SecurityScheme\n\n export type OpenIdSecurityScheme = OpenAPIV3.OpenIdSecurityScheme\n\n export type TagObject = OpenAPIV3.TagObject\n}\n\n// biome-ignore lint/style/noNamespace: We want it to be a module here.\nexport namespace OpenAPIV3 {\n export type Document<T = {}> = {\n /**\n * Version of the OpenAPI specification\n * @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions\n */\n openapi?: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4'\n swagger?: undefined\n info?: InfoObject\n servers?: ServerObject[]\n paths?: PathsObject<T>\n components?: ComponentsObject\n security?: SecurityRequirementObject[]\n tags?: TagObject[]\n externalDocs?: ExternalDocumentationObject\n } & T &\n AnyOtherAttribute\n\n export type InfoObject = {\n title?: string\n description?: string\n termsOfService?: string\n contact?: ContactObject\n license?: LicenseObject\n version?: string\n }\n\n export type ContactObject = {\n name?: string\n url?: string\n email?: string\n }\n\n export type LicenseObject = {\n name?: string\n url?: string\n }\n\n export type ServerObject = {\n url?: string\n description?: string\n variables?: { [variable: string]: ServerVariableObject }\n }\n\n export type ServerVariableObject = {\n enum?: string[] | number[]\n default?: string | number\n description?: string\n }\n\n export type PathsObject<T = {}, P extends {} = {}> = {\n [pattern: string]: (PathItemObject<T> & P) | undefined\n }\n\n // All HTTP methods allowed by OpenAPI 3 spec\n // See https://swagger.io/specification/#path-item-object\n // You can use keys or values from it in TypeScript code like this:\n // for (const method of Object.values(OpenAPIV3.HttpMethods)) { \u2026 }\n export enum HttpMethods {\n GET = 'get',\n PUT = 'put',\n POST = 'post',\n DELETE = 'delete',\n OPTIONS = 'options',\n HEAD = 'head',\n PATCH = 'patch',\n TRACE = 'trace',\n }\n\n export type PathItemObject<T = {}> = {\n $ref?: string\n summary?: string\n description?: string\n servers?: ServerObject[]\n parameters?: (ReferenceObject | ParameterObject)[]\n } & {\n [method in HttpMethods]?: OperationObject<T>\n } & T &\n AnyOtherAttribute\n\n export type OperationObject<T = {}> = {\n tags?: string[]\n summary?: string\n description?: string\n externalDocs?: ExternalDocumentationObject\n operationId?: string\n parameters?: (ReferenceObject | ParameterObject)[]\n requestBody?: ReferenceObject | RequestBodyObject\n responses?: ResponsesObject\n callbacks?: { [callback: string]: ReferenceObject | CallbackObject }\n deprecated?: boolean\n security?: SecurityRequirementObject[]\n servers?: ServerObject[]\n } & T &\n AnyOtherAttribute\n\n export type ExternalDocumentationObject = {\n description?: string\n url?: string\n }\n\n export type ParameterObject = {\n name?: string\n in?: string\n } & ParameterBaseObject\n\n export type HeaderObject = {} & ParameterBaseObject\n\n export type ParameterBaseObject = {\n description?: string\n required?: boolean\n deprecated?: boolean\n allowEmptyValue?: boolean\n style?: string\n explode?: boolean\n allowReserved?: boolean\n schema?: ReferenceObject | SchemaObject\n example?: any\n examples?: { [media: string]: ReferenceObject | ExampleObject }\n content?: { [media: string]: MediaTypeObject }\n }\n export type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer'\n export type ArraySchemaObjectType = 'array'\n export type SchemaObject = (ArraySchemaObject | NonArraySchemaObject) & AnyOtherAttribute\n\n export type ArraySchemaObject = {\n type?: ArraySchemaObjectType\n items?: ReferenceObject | SchemaObject\n } & BaseSchemaObject\n\n export type NonArraySchemaObject = {\n type?: NonArraySchemaObjectType\n } & BaseSchemaObject\n\n export type BaseSchemaObject = {\n // JSON schema allowed properties, adjusted for OpenAPI\n title?: string\n description?: string\n format?: string\n default?: any\n multipleOf?: number\n maximum?: number\n exclusiveMaximum?: boolean\n minimum?: number\n exclusiveMinimum?: boolean\n maxLength?: number\n minLength?: number\n pattern?: string\n additionalProperties?: boolean | ReferenceObject | SchemaObject\n maxItems?: number\n minItems?: number\n uniqueItems?: boolean\n maxProperties?: number\n minProperties?: number\n required?: string[]\n enum?: any[]\n properties?: {\n [name: string]: ReferenceObject | SchemaObject\n }\n patternProperties?: {\n [name: string]: ReferenceObject | SchemaObject\n }\n allOf?: (ReferenceObject | SchemaObject)[]\n oneOf?: (ReferenceObject | SchemaObject)[]\n anyOf?: (ReferenceObject | SchemaObject)[]\n not?: ReferenceObject | SchemaObject\n\n // OpenAPI-specific properties\n nullable?: boolean\n discriminator?: DiscriminatorObject\n readOnly?: boolean\n writeOnly?: boolean\n xml?: XMLObject\n externalDocs?: ExternalDocumentationObject\n example?: any\n deprecated?: boolean\n }\n\n export type DiscriminatorObject = {\n propertyName?: string\n mapping?: { [value: string]: string }\n }\n\n export type XMLObject = {\n name?: string\n namespace?: string\n prefix?: string\n attribute?: boolean\n wrapped?: boolean\n }\n\n export type ReferenceObject = {\n $ref?: string\n } & AnyOtherAttribute\n\n export type ExampleObject = {\n summary?: string\n description?: string\n value?: any\n externalValue?: string\n }\n\n export type MediaTypeObject = {\n schema?: ReferenceObject | SchemaObject\n example?: any\n examples?: { [media: string]: ReferenceObject | ExampleObject }\n encoding?: { [media: string]: EncodingObject }\n }\n\n export type EncodingObject = {\n contentType?: string\n headers?: { [header: string]: ReferenceObject | HeaderObject }\n style?: string\n explode?: boolean\n allowReserved?: boolean\n }\n\n export type RequestBodyObject = {\n description?: string\n content?: { [media: string]: MediaTypeObject }\n required?: boolean\n }\n\n export type ResponsesObject = {\n [code: string]: ReferenceObject | ResponseObject\n }\n\n export type ResponseObject = {\n description?: string\n headers?: { [header: string]: ReferenceObject | HeaderObject }\n content?: { [media: string]: MediaTypeObject }\n links?: { [link: string]: ReferenceObject | LinkObject }\n } & AnyOtherAttribute\n\n export type LinkObject = {\n operationRef?: string\n operationId?: string\n parameters?: { [parameter: string]: any }\n requestBody?: any\n description?: string\n server?: ServerObject\n }\n\n export type CallbackObject = {\n [url: string]: PathItemObject\n }\n\n export type SecurityRequirementObject = {\n [name: string]: string[]\n }\n\n export type ComponentsObject = {\n schemas?: { [key: string]: ReferenceObject | SchemaObject }\n responses?: { [key: string]: ReferenceObject | ResponseObject }\n parameters?: { [key: string]: ReferenceObject | ParameterObject }\n examples?: { [key: string]: ReferenceObject | ExampleObject }\n requestBodies?: { [key: string]: ReferenceObject | RequestBodyObject }\n headers?: { [key: string]: ReferenceObject | HeaderObject }\n securitySchemes?: { [key: string]: ReferenceObject | SecuritySchemeObject }\n links?: { [key: string]: ReferenceObject | LinkObject }\n callbacks?: { [key: string]: ReferenceObject | CallbackObject }\n }\n\n export type SecuritySchemeObject =\n | HttpSecurityScheme\n | ApiKeySecurityScheme\n | OAuth2SecurityScheme\n | OpenIdSecurityScheme\n\n export type HttpSecurityScheme = {\n type?: 'http'\n description?: string\n scheme?: string\n bearerFormat?: string\n }\n\n export type ApiKeySecurityScheme = {\n type?: 'apiKey'\n description?: string\n name?: string\n in?: string\n }\n\n export type OAuth2SecurityScheme = {\n type?: 'oauth2'\n description?: string\n flows?: {\n implicit?: {\n authorizationUrl?: string\n refreshUrl?: string\n scopes?: { [scope: string]: string }\n }\n password?: {\n tokenUrl?: string\n refreshUrl?: string\n scopes?: { [scope: string]: string }\n }\n clientCredentials?: {\n tokenUrl?: string\n refreshUrl?: string\n scopes?: { [scope: string]: string }\n }\n authorizationCode?: {\n authorizationUrl?: string\n tokenUrl?: string\n refreshUrl?: string\n scopes?: { [scope: string]: string }\n }\n }\n }\n\n export type OpenIdSecurityScheme = {\n type?: 'openIdConnect'\n description?: string\n openIdConnectUrl?: string\n }\n\n export type TagObject = {\n name?: string\n description?: string\n externalDocs?: ExternalDocumentationObject\n } & AnyOtherAttribute\n}\n\n// biome-ignore lint/style/noNamespace: We want it to be a module here.\nexport namespace OpenAPIV2 {\n export type Document<T = {}> = {\n /**\n * Version of the OpenAPI specification\n * @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions\n */\n swagger?: '2.0'\n openapi?: never\n basePath?: string\n consumes?: MimeTypes\n definitions?: DefinitionsObject\n externalDocs?: ExternalDocumentationObject\n host?: string\n info?: InfoObject\n parameters?: ParametersDefinitionsObject\n paths?: PathsObject<T>\n produces?: MimeTypes\n responses?: ResponsesDefinitionsObject\n schemes?: string[]\n security?: SecurityRequirementObject[]\n securityDefinitions?: SecurityDefinitionsObject\n tags?: TagObject[]\n } & T &\n AnyOtherAttribute\n\n export type TagObject = {\n name?: string\n description?: string\n externalDocs?: ExternalDocumentationObject\n } & AnyOtherAttribute\n\n export type SecuritySchemeObjectBase = {\n type?: 'basic' | 'apiKey' | 'oauth2'\n description?: string\n }\n\n export type SecuritySchemeBasic = {\n type?: 'basic'\n } & SecuritySchemeObjectBase\n\n export type SecuritySchemeApiKey = {\n type?: 'apiKey'\n name?: string\n in?: string\n } & SecuritySchemeObjectBase\n\n export type SecuritySchemeOauth2 =\n | SecuritySchemeOauth2Implicit\n | SecuritySchemeOauth2AccessCode\n | SecuritySchemeOauth2Password\n | SecuritySchemeOauth2Application\n\n export type ScopesObject = {\n [index: string]: any\n }\n\n export type SecuritySchemeOauth2Base = {\n type?: 'oauth2'\n flow?: 'implicit' | 'password' | 'application' | 'accessCode'\n scopes?: ScopesObject\n } & SecuritySchemeObjectBase\n\n export type SecuritySchemeOauth2Implicit = {\n flow?: 'implicit'\n authorizationUrl?: string\n } & SecuritySchemeOauth2Base\n\n export type SecuritySchemeOauth2AccessCode = {\n flow?: 'accessCode'\n authorizationUrl?: string\n tokenUrl?: string\n } & SecuritySchemeOauth2Base\n\n export type SecuritySchemeOauth2Password = {\n flow?: 'password'\n tokenUrl?: string\n } & SecuritySchemeOauth2Base\n\n export type SecuritySchemeOauth2Application = {\n flow?: 'application'\n tokenUrl?: string\n } & SecuritySchemeOauth2Base\n\n export type SecuritySchemeObject = SecuritySchemeBasic | SecuritySchemeApiKey | SecuritySchemeOauth2\n\n export type SecurityDefinitionsObject = {\n [index: string]: SecuritySchemeObject\n }\n\n export type SecurityRequirementObject = {\n [index: string]: string[]\n }\n\n export type ReferenceObject = {\n $ref: string\n } & AnyOtherAttribute\n\n export type Response = ResponseObject | ReferenceObject\n\n export type ResponsesDefinitionsObject = {\n [index: string]: ResponseObject\n }\n\n export type Schema = SchemaObject | ReferenceObject\n\n export type ResponseObject = {\n description?: string\n schema?: Schema\n headers?: HeadersObject\n examples?: ExampleObject\n } & AnyOtherAttribute\n\n export type HeadersObject = {\n [index: string]: HeaderObject\n }\n\n export type HeaderObject = {\n description?: string\n } & ItemsObject\n\n export type ExampleObject = {\n [index: string]: any\n }\n\n export type OperationObject<T = {}> = {\n tags?: string[]\n summary?: string\n description?: string\n externalDocs?: ExternalDocumentationObject\n operationId?: string\n consumes?: MimeTypes\n produces?: MimeTypes\n parameters?: Parameters\n responses: ResponsesObject\n schemes?: string[]\n deprecated?: boolean\n security?: SecurityRequirementObject[]\n } & T &\n AnyOtherAttribute\n\n export type ResponsesObject = {\n [index: string]: Response | undefined\n default?: Response\n }\n\n export type Parameters = (ReferenceObject | Parameter)[]\n\n export type Parameter = InBodyParameterObject | GeneralParameterObject\n\n export type InBodyParameterObject = {\n schema?: Schema\n } & ParameterObject\n\n export type GeneralParameterObject = {\n allowEmptyValue?: boolean\n } & ParameterObject &\n ItemsObject\n\n // All HTTP methods allowed by OpenAPI 2 spec\n // See https://swagger.io/specification/v2#path-item-object\n // You can use keys or values from it in TypeScript code like this:\n // for (const method of Object.values(OpenAPIV2.HttpMethods)) { \u2026 }\n export enum HttpMethods {\n GET = 'get',\n PUT = 'put',\n POST = 'post',\n DELETE = 'delete',\n OPTIONS = 'options',\n HEAD = 'head',\n PATCH = 'patch',\n }\n\n export type PathItemObject<T = {}> = {\n $ref?: string\n parameters?: Parameters\n } & {\n [method in HttpMethods]?: OperationObject<T>\n }\n\n export type PathsObject<T = {}> = {\n [index: string]: PathItemObject<T>\n }\n\n export type ParametersDefinitionsObject = {\n [index: string]: ParameterObject\n }\n\n export type ParameterObject = {\n name?: string\n in?: string\n description?: string\n required?: boolean\n [index: string]: any\n }\n\n export type MimeTypes = string[]\n\n export type DefinitionsObject = {\n [index: string]: SchemaObject\n }\n\n export type SchemaObject = {\n [index: string]: any\n discriminator?: string\n readOnly?: boolean\n xml?: XMLObject\n externalDocs?: ExternalDocumentationObject\n example?: any\n default?: any\n items?: ItemsObject | ReferenceObject\n properties?: {\n [name: string]: SchemaObject\n }\n } & IJsonSchema\n\n export type ExternalDocumentationObject = {\n [index: string]: any\n description?: string\n url?: string\n }\n\n export type ItemsObject = {\n type?: string\n format?: string\n items?: ItemsObject | ReferenceObject\n collectionFormat?: string\n default?: any\n maximum?: number\n exclusiveMaximum?: boolean\n minimum?: number\n exclusiveMinimum?: boolean\n maxLength?: number\n minLength?: number\n pattern?: string\n maxItems?: number\n minItems?: number\n uniqueItems?: boolean\n enum?: any[]\n multipleOf?: number\n $ref?: string\n }\n\n export type XMLObject = {\n [index: string]: any\n name?: string\n namespace?: string\n prefix?: string\n attribute?: boolean\n wrapped?: boolean\n }\n\n export type InfoObject = {\n title?: string\n description?: string\n termsOfService?: string\n contact?: ContactObject\n license?: LicenseObject\n version?: string\n }\n\n export type ContactObject = {\n name?: string\n url?: string\n email?: string\n }\n\n export type LicenseObject = {\n name?: string\n url?: string\n }\n}\n\nexport type IJsonSchema = {\n id?: string\n $schema?: string\n title?: string\n description?: string\n multipleOf?: number\n maximum?: number\n exclusiveMaximum?: boolean\n minimum?: number\n exclusiveMinimum?: boolean\n maxLength?: number\n minLength?: number\n pattern?: string\n additionalItems?: boolean | IJsonSchema\n items?: IJsonSchema | IJsonSchema[]\n maxItems?: number\n minItems?: number\n uniqueItems?: boolean\n maxProperties?: number\n minProperties?: number\n required?: string[]\n additionalProperties?: boolean | IJsonSchema\n definitions?: {\n [name: string]: IJsonSchema\n }\n properties?: {\n [name: string]: IJsonSchema\n }\n patternProperties?: {\n [name: string]: IJsonSchema\n }\n dependencies?: {\n [name: string]: IJsonSchema | string[]\n }\n enum?: any[]\n type?: string | string[]\n allOf?: IJsonSchema[]\n anyOf?: IJsonSchema[]\n oneOf?: IJsonSchema[]\n not?: IJsonSchema\n $ref?: string\n} & AnyOtherAttribute\n"],
5
+ "mappings": "AA6SO,IAAU;AAAA,CAAV,CAAUA,eAAV;AA0DE,MAAK;AAAL,IAAKC,iBAAL;AACL,IAAAA,aAAA,SAAM;AACN,IAAAA,aAAA,SAAM;AACN,IAAAA,aAAA,UAAO;AACP,IAAAA,aAAA,YAAS;AACT,IAAAA,aAAA,aAAU;AACV,IAAAA,aAAA,UAAO;AACP,IAAAA,aAAA,WAAQ;AACR,IAAAA,aAAA,WAAQ;AAAA,KARE,cAAAD,WAAA,gBAAAA,WAAA;AAAA,GA1DG;AAqUV,IAAU;AAAA,CAAV,CAAUE,eAAV;AAkKE,MAAK;AAAL,IAAKD,iBAAL;AACL,IAAAA,aAAA,SAAM;AACN,IAAAA,aAAA,SAAM;AACN,IAAAA,aAAA,UAAO;AACP,IAAAA,aAAA,YAAS;AACT,IAAAA,aAAA,aAAU;AACV,IAAAA,aAAA,UAAO;AACP,IAAAA,aAAA,WAAQ;AAAA,KAPE,cAAAC,WAAA,gBAAAA,WAAA;AAAA,GAlKG;",
6
+ "names": ["OpenAPIV3", "HttpMethods", "OpenAPIV2"]
7
+ }
@@ -0,0 +1,52 @@
1
+ import { describe, expectTypeOf, it } from "vitest";
2
+ describe("OpenAPI", () => {
3
+ it("has a generic type", () => {
4
+ const specification = {
5
+ // anything
6
+ };
7
+ expectTypeOf(specification).toMatchTypeOf();
8
+ });
9
+ it("narrows it down to Swagger 2.0", () => {
10
+ const specification = {
11
+ swagger: "2.0"
12
+ };
13
+ expectTypeOf(specification).toMatchTypeOf();
14
+ });
15
+ it("narrows it down to OpenAPI 3.0.0", () => {
16
+ const specification = {
17
+ openapi: "3.0.0"
18
+ };
19
+ expectTypeOf(specification).toMatchTypeOf();
20
+ });
21
+ it("narrows it down to OpenAPI 3.0.4", () => {
22
+ const specification = {
23
+ openapi: "3.0.4"
24
+ };
25
+ expectTypeOf(specification).toMatchTypeOf();
26
+ });
27
+ it("narrows it down to OpenAPI 3.1.0", () => {
28
+ const specification = {
29
+ openapi: "3.1.0"
30
+ };
31
+ expectTypeOf(specification).toMatchTypeOf();
32
+ });
33
+ it("narrows it down to OpenAPI 3.1.1", () => {
34
+ const specification = {
35
+ openapi: "3.1.1"
36
+ };
37
+ expectTypeOf(specification).toMatchTypeOf();
38
+ });
39
+ it("types a custom extension", () => {
40
+ const specification = {};
41
+ expectTypeOf(specification["random-attribute"]).toEqualTypeOf();
42
+ expectTypeOf(specification["x-custom"]).toEqualTypeOf();
43
+ });
44
+ it("has a HttpMethod type", () => {
45
+ const validMethod = "GET";
46
+ const anotherValidMethod = "get";
47
+ expectTypeOf(validMethod).toMatchTypeOf();
48
+ expectTypeOf(anotherValidMethod).toMatchTypeOf();
49
+ assertType("NOT_A_METHOD");
50
+ });
51
+ });
52
+ //# sourceMappingURL=openapi-types.test-d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/openapi-types.test-d.ts"],
4
+ "sourcesContent": ["import { describe, expectTypeOf, it } from 'vitest'\n\nimport type { OpenAPI, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from './openapi-types'\n\ndescribe('OpenAPI', () => {\n it('has a generic type', () => {\n const specification: OpenAPI.Document = {\n // anything\n }\n\n expectTypeOf(specification).toMatchTypeOf<OpenAPI.Document>()\n })\n\n it('narrows it down to Swagger 2.0', () => {\n const specification: OpenAPI.Document = {\n swagger: '2.0',\n }\n\n expectTypeOf(specification).toMatchTypeOf<OpenAPIV2.Document>()\n })\n\n it('narrows it down to OpenAPI 3.0.0', () => {\n const specification: OpenAPI.Document = {\n openapi: '3.0.0',\n }\n\n expectTypeOf(specification).toMatchTypeOf<OpenAPIV3.Document>()\n })\n\n it('narrows it down to OpenAPI 3.0.4', () => {\n const specification: OpenAPI.Document = {\n openapi: '3.0.4',\n }\n\n expectTypeOf(specification).toMatchTypeOf<OpenAPIV3.Document>()\n })\n\n it('narrows it down to OpenAPI 3.1.0', () => {\n const specification: OpenAPI.Document = {\n openapi: '3.1.0',\n }\n\n expectTypeOf(specification).toMatchTypeOf<OpenAPIV3_1.Document>()\n })\n\n it('narrows it down to OpenAPI 3.1.1', () => {\n const specification: OpenAPI.Document = {\n openapi: '3.1.1',\n }\n\n expectTypeOf(specification).toMatchTypeOf<OpenAPIV3_1.Document>()\n })\n\n it('types a custom extension', () => {\n const specification: OpenAPI.Document<{\n 'x-custom'?: boolean\n }> = {}\n\n expectTypeOf(specification['random-attribute']).toEqualTypeOf<any>()\n expectTypeOf(specification['x-custom']).toEqualTypeOf<boolean | undefined>()\n })\n\n it('has a HttpMethod type', () => {\n const validMethod: OpenAPI.HttpMethod = 'GET'\n const anotherValidMethod: Lowercase<OpenAPI.HttpMethod> = 'get'\n\n expectTypeOf(validMethod).toMatchTypeOf<OpenAPI.HttpMethod>()\n expectTypeOf(anotherValidMethod).toMatchTypeOf<Lowercase<OpenAPI.HttpMethod>>()\n\n // @ts-expect-error name is a string\n assertType('NOT_A_METHOD' as OpenAPI.HttpMethod)\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,cAAc,UAAU;AAI3C,SAAS,WAAW,MAAM;AACxB,KAAG,sBAAsB,MAAM;AAC7B,UAAM,gBAAkC;AAAA;AAAA,IAExC;AAEA,iBAAa,aAAa,EAAE,cAAgC;AAAA,EAC9D,CAAC;AAED,KAAG,kCAAkC,MAAM;AACzC,UAAM,gBAAkC;AAAA,MACtC,SAAS;AAAA,IACX;AAEA,iBAAa,aAAa,EAAE,cAAkC;AAAA,EAChE,CAAC;AAED,KAAG,oCAAoC,MAAM;AAC3C,UAAM,gBAAkC;AAAA,MACtC,SAAS;AAAA,IACX;AAEA,iBAAa,aAAa,EAAE,cAAkC;AAAA,EAChE,CAAC;AAED,KAAG,oCAAoC,MAAM;AAC3C,UAAM,gBAAkC;AAAA,MACtC,SAAS;AAAA,IACX;AAEA,iBAAa,aAAa,EAAE,cAAkC;AAAA,EAChE,CAAC;AAED,KAAG,oCAAoC,MAAM;AAC3C,UAAM,gBAAkC;AAAA,MACtC,SAAS;AAAA,IACX;AAEA,iBAAa,aAAa,EAAE,cAAoC;AAAA,EAClE,CAAC;AAED,KAAG,oCAAoC,MAAM;AAC3C,UAAM,gBAAkC;AAAA,MACtC,SAAS;AAAA,IACX;AAEA,iBAAa,aAAa,EAAE,cAAoC;AAAA,EAClE,CAAC;AAED,KAAG,4BAA4B,MAAM;AACnC,UAAM,gBAED,CAAC;AAEN,iBAAa,cAAc,kBAAkB,CAAC,EAAE,cAAmB;AACnE,iBAAa,cAAc,UAAU,CAAC,EAAE,cAAmC;AAAA,EAC7E,CAAC;AAED,KAAG,yBAAyB,MAAM;AAChC,UAAM,cAAkC;AACxC,UAAM,qBAAoD;AAE1D,iBAAa,WAAW,EAAE,cAAkC;AAC5D,iBAAa,kBAAkB,EAAE,cAA6C;AAG9E,eAAW,cAAoC;AAAA,EACjD,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,97 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { CallbackObjectSchema } from "../unprocessed/callback-object.js";
3
+ describe("callback-object", () => {
4
+ describe("CallbackObjectSchema", () => {
5
+ describe("Callback Object Example", () => {
6
+ it("The following example uses the user provided queryUrl query string parameter to define the callback URL.", () => {
7
+ const result = CallbackObjectSchema.parse({
8
+ "{$request.query.queryUrl}": {
9
+ post: {
10
+ requestBody: {
11
+ description: "Callback payload",
12
+ content: {
13
+ "application/json": {
14
+ schema: {
15
+ $ref: "#/components/schemas/SomePayload"
16
+ }
17
+ }
18
+ }
19
+ },
20
+ responses: {
21
+ "200": {
22
+ description: "callback successfully processed"
23
+ }
24
+ }
25
+ }
26
+ }
27
+ });
28
+ expect(result).toEqual({
29
+ "{$request.query.queryUrl}": {
30
+ post: {
31
+ requestBody: {
32
+ description: "Callback payload",
33
+ content: {
34
+ "application/json": {
35
+ schema: {
36
+ $ref: "#/components/schemas/SomePayload"
37
+ }
38
+ }
39
+ }
40
+ },
41
+ responses: {
42
+ "200": {
43
+ description: "callback successfully processed"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ });
49
+ });
50
+ it("The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the id and email property in the request body.", () => {
51
+ const result = CallbackObjectSchema.parse({
52
+ "http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}": {
53
+ post: {
54
+ requestBody: {
55
+ description: "Callback payload",
56
+ content: {
57
+ "application/json": {
58
+ schema: {
59
+ $ref: "#/components/schemas/SomePayload"
60
+ }
61
+ }
62
+ }
63
+ },
64
+ responses: {
65
+ "200": {
66
+ description: "callback successfully processed"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ });
72
+ expect(result).toEqual({
73
+ "http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}": {
74
+ post: {
75
+ requestBody: {
76
+ description: "Callback payload",
77
+ content: {
78
+ "application/json": {
79
+ schema: {
80
+ $ref: "#/components/schemas/SomePayload"
81
+ }
82
+ }
83
+ }
84
+ },
85
+ responses: {
86
+ "200": {
87
+ description: "callback successfully processed"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ });
93
+ });
94
+ });
95
+ });
96
+ });
97
+ //# sourceMappingURL=callback-object.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/compliance/callback-object.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { CallbackObjectSchema } from '../unprocessed/callback-object'\n\ndescribe('callback-object', () => {\n describe('CallbackObjectSchema', () => {\n // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#callback-object-example\n describe('Callback Object Example', () => {\n it('The following example uses the user provided queryUrl query string parameter to define the callback URL.', () => {\n const result = CallbackObjectSchema.parse({\n '{$request.query.queryUrl}': {\n post: {\n requestBody: {\n description: 'Callback payload',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/SomePayload',\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'callback successfully processed',\n },\n },\n },\n },\n })\n\n expect(result).toEqual({\n '{$request.query.queryUrl}': {\n post: {\n requestBody: {\n description: 'Callback payload',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/SomePayload',\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'callback successfully processed',\n },\n },\n },\n },\n })\n })\n\n it('The following example shows a callback where the server is hard-coded, but the query string parameters are populated from the id and email property in the request body.', () => {\n const result = CallbackObjectSchema.parse({\n 'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}': {\n post: {\n requestBody: {\n description: 'Callback payload',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/SomePayload',\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'callback successfully processed',\n },\n },\n },\n },\n })\n\n expect(result).toEqual({\n 'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}': {\n post: {\n requestBody: {\n description: 'Callback payload',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/SomePayload',\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'callback successfully processed',\n },\n },\n },\n },\n })\n })\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,4BAA4B;AAErC,SAAS,mBAAmB,MAAM;AAChC,WAAS,wBAAwB,MAAM;AAErC,aAAS,2BAA2B,MAAM;AACxC,SAAG,4GAA4G,MAAM;AACnH,cAAM,SAAS,qBAAqB,MAAM;AAAA,UACxC,6BAA6B;AAAA,YAC3B,MAAM;AAAA,cACJ,aAAa;AAAA,gBACX,aAAa;AAAA,gBACb,SAAS;AAAA,kBACP,oBAAoB;AAAA,oBAClB,QAAQ;AAAA,sBACN,MAAM;AAAA,oBACR;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAW;AAAA,gBACT,OAAO;AAAA,kBACL,aAAa;AAAA,gBACf;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAED,eAAO,MAAM,EAAE,QAAQ;AAAA,UACrB,6BAA6B;AAAA,YAC3B,MAAM;AAAA,cACJ,aAAa;AAAA,gBACX,aAAa;AAAA,gBACb,SAAS;AAAA,kBACP,oBAAoB;AAAA,oBAClB,QAAQ;AAAA,sBACN,MAAM;AAAA,oBACR;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAW;AAAA,gBACT,OAAO;AAAA,kBACL,aAAa;AAAA,gBACf;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAED,SAAG,4KAA4K,MAAM;AACnL,cAAM,SAAS,qBAAqB,MAAM;AAAA,UACxC,gGAAgG;AAAA,YAC9F,MAAM;AAAA,cACJ,aAAa;AAAA,gBACX,aAAa;AAAA,gBACb,SAAS;AAAA,kBACP,oBAAoB;AAAA,oBAClB,QAAQ;AAAA,sBACN,MAAM;AAAA,oBACR;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAW;AAAA,gBACT,OAAO;AAAA,kBACL,aAAa;AAAA,gBACf;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAED,eAAO,MAAM,EAAE,QAAQ;AAAA,UACrB,gGAAgG;AAAA,YAC9F,MAAM;AAAA,cACJ,aAAa;AAAA,gBACX,aAAa;AAAA,gBACb,SAAS;AAAA,kBACP,oBAAoB;AAAA,oBAClB,QAAQ;AAAA,sBACN,MAAM;AAAA,oBACR;AAAA,kBACF;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAW;AAAA,gBACT,OAAO;AAAA,kBACL,aAAa;AAAA,gBACf;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,19 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { ContactObjectSchema } from "../unprocessed/contact-object.js";
3
+ describe("contact-object", () => {
4
+ describe("ContactObjectSchema", () => {
5
+ it("Contact Object Example", () => {
6
+ const result = ContactObjectSchema.parse({
7
+ name: "API Support",
8
+ url: "https://www.example.com/support",
9
+ email: "support@example.com"
10
+ });
11
+ expect(result).toEqual({
12
+ name: "API Support",
13
+ url: "https://www.example.com/support",
14
+ email: "support@example.com"
15
+ });
16
+ });
17
+ });
18
+ });
19
+ //# sourceMappingURL=contact-object.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/compliance/contact-object.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { ContactObjectSchema } from '../unprocessed/contact-object'\n\ndescribe('contact-object', () => {\n describe('ContactObjectSchema', () => {\n // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#contact-object-example\n it('Contact Object Example', () => {\n const result = ContactObjectSchema.parse({\n name: 'API Support',\n url: 'https://www.example.com/support',\n email: 'support@example.com',\n })\n\n expect(result).toEqual({\n name: 'API Support',\n url: 'https://www.example.com/support',\n email: 'support@example.com',\n })\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,2BAA2B;AAEpC,SAAS,kBAAkB,MAAM;AAC/B,WAAS,uBAAuB,MAAM;AAEpC,OAAG,0BAA0B,MAAM;AACjC,YAAM,SAAS,oBAAoB,MAAM;AAAA,QACvC,MAAM;AAAA,QACN,KAAK;AAAA,QACL,OAAO;AAAA,MACT,CAAC;AAED,aAAO,MAAM,EAAE,QAAQ;AAAA,QACrB,MAAM;AAAA,QACN,KAAK;AAAA,QACL,OAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,91 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { OperationObjectSchema } from "../unprocessed/operation-object.js";
3
+ describe("example-object", () => {
4
+ describe("ExampleObject", () => {
5
+ it("Example Object Example", () => {
6
+ const result = OperationObjectSchema.parse({
7
+ requestBody: {
8
+ content: {
9
+ "application/json": {
10
+ schema: {
11
+ $ref: "#/components/schemas/Address"
12
+ },
13
+ examples: {
14
+ foo: {
15
+ summary: "A foo example",
16
+ value: {
17
+ foo: "bar"
18
+ }
19
+ },
20
+ bar: {
21
+ summary: "A bar example",
22
+ value: {
23
+ bar: "baz"
24
+ }
25
+ }
26
+ }
27
+ },
28
+ "application/xml": {
29
+ examples: {
30
+ xmlExample: {
31
+ summary: "This is an example in XML",
32
+ externalValue: "https://example.org/examples/address-example.xml"
33
+ }
34
+ }
35
+ },
36
+ "text/plain": {
37
+ examples: {
38
+ textExample: {
39
+ summary: "This is a text example",
40
+ externalValue: "https://foo.bar/examples/address-example.txt"
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ });
47
+ expect(result).toEqual({
48
+ requestBody: {
49
+ content: {
50
+ "application/json": {
51
+ schema: {
52
+ $ref: "#/components/schemas/Address"
53
+ },
54
+ examples: {
55
+ foo: {
56
+ summary: "A foo example",
57
+ value: {
58
+ foo: "bar"
59
+ }
60
+ },
61
+ bar: {
62
+ summary: "A bar example",
63
+ value: {
64
+ bar: "baz"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "application/xml": {
70
+ examples: {
71
+ xmlExample: {
72
+ summary: "This is an example in XML",
73
+ externalValue: "https://example.org/examples/address-example.xml"
74
+ }
75
+ }
76
+ },
77
+ "text/plain": {
78
+ examples: {
79
+ textExample: {
80
+ summary: "This is a text example",
81
+ externalValue: "https://foo.bar/examples/address-example.txt"
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ });
88
+ });
89
+ });
90
+ });
91
+ //# sourceMappingURL=example-object.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/compliance/example-object.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { OperationObjectSchema } from '../unprocessed/operation-object'\n\ndescribe('example-object', () => {\n describe('ExampleObject', () => {\n // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#example-object-examples\n it('Example Object Example', () => {\n const result = OperationObjectSchema.parse({\n requestBody: {\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/Address',\n },\n examples: {\n foo: {\n summary: 'A foo example',\n value: {\n foo: 'bar',\n },\n },\n bar: {\n summary: 'A bar example',\n value: {\n bar: 'baz',\n },\n },\n },\n },\n 'application/xml': {\n examples: {\n xmlExample: {\n summary: 'This is an example in XML',\n externalValue: 'https://example.org/examples/address-example.xml',\n },\n },\n },\n 'text/plain': {\n examples: {\n textExample: {\n summary: 'This is a text example',\n externalValue: 'https://foo.bar/examples/address-example.txt',\n },\n },\n },\n },\n },\n })\n\n expect(result).toEqual({\n requestBody: {\n content: {\n 'application/json': {\n schema: {\n $ref: '#/components/schemas/Address',\n },\n examples: {\n foo: {\n summary: 'A foo example',\n value: {\n foo: 'bar',\n },\n },\n bar: {\n summary: 'A bar example',\n value: {\n bar: 'baz',\n },\n },\n },\n },\n 'application/xml': {\n examples: {\n xmlExample: {\n summary: 'This is an example in XML',\n externalValue: 'https://example.org/examples/address-example.xml',\n },\n },\n },\n 'text/plain': {\n examples: {\n textExample: {\n summary: 'This is a text example',\n externalValue: 'https://foo.bar/examples/address-example.txt',\n },\n },\n },\n },\n },\n })\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,6BAA6B;AAEtC,SAAS,kBAAkB,MAAM;AAC/B,WAAS,iBAAiB,MAAM;AAE9B,OAAG,0BAA0B,MAAM;AACjC,YAAM,SAAS,sBAAsB,MAAM;AAAA,QACzC,aAAa;AAAA,UACX,SAAS;AAAA,YACP,oBAAoB;AAAA,cAClB,QAAQ;AAAA,gBACN,MAAM;AAAA,cACR;AAAA,cACA,UAAU;AAAA,gBACR,KAAK;AAAA,kBACH,SAAS;AAAA,kBACT,OAAO;AAAA,oBACL,KAAK;AAAA,kBACP;AAAA,gBACF;AAAA,gBACA,KAAK;AAAA,kBACH,SAAS;AAAA,kBACT,OAAO;AAAA,oBACL,KAAK;AAAA,kBACP;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,YACA,mBAAmB;AAAA,cACjB,UAAU;AAAA,gBACR,YAAY;AAAA,kBACV,SAAS;AAAA,kBACT,eAAe;AAAA,gBACjB;AAAA,cACF;AAAA,YACF;AAAA,YACA,cAAc;AAAA,cACZ,UAAU;AAAA,gBACR,aAAa;AAAA,kBACX,SAAS;AAAA,kBACT,eAAe;AAAA,gBACjB;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAED,aAAO,MAAM,EAAE,QAAQ;AAAA,QACrB,aAAa;AAAA,UACX,SAAS;AAAA,YACP,oBAAoB;AAAA,cAClB,QAAQ;AAAA,gBACN,MAAM;AAAA,cACR;AAAA,cACA,UAAU;AAAA,gBACR,KAAK;AAAA,kBACH,SAAS;AAAA,kBACT,OAAO;AAAA,oBACL,KAAK;AAAA,kBACP;AAAA,gBACF;AAAA,gBACA,KAAK;AAAA,kBACH,SAAS;AAAA,kBACT,OAAO;AAAA,oBACL,KAAK;AAAA,kBACP;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,YACA,mBAAmB;AAAA,cACjB,UAAU;AAAA,gBACR,YAAY;AAAA,kBACV,SAAS;AAAA,kBACT,eAAe;AAAA,gBACjB;AAAA,cACF;AAAA,YACF;AAAA,YACA,cAAc;AAAA,cACZ,UAAU;AAAA,gBACR,aAAa;AAAA,kBACX,SAAS;AAAA,kBACT,eAAe;AAAA,gBACjB;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { ExternalDocumentationObjectSchema } from "../unprocessed/external-documentation-object.js";
3
+ describe("external-documentation", () => {
4
+ describe("ExternalDocumentationObjectSchema", () => {
5
+ it("External Documentation Object Example", () => {
6
+ const result = ExternalDocumentationObjectSchema.parse({
7
+ description: "Find more info here",
8
+ url: "https://example.com"
9
+ });
10
+ expect(result).toEqual({
11
+ description: "Find more info here",
12
+ url: "https://example.com"
13
+ });
14
+ });
15
+ });
16
+ });
17
+ //# sourceMappingURL=external-documentation-object.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/compliance/external-documentation-object.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from 'vitest'\nimport { ExternalDocumentationObjectSchema } from '../unprocessed/external-documentation-object'\n\ndescribe('external-documentation', () => {\n describe('ExternalDocumentationObjectSchema', () => {\n // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#external-documentation-object-example\n it('External Documentation Object Example', () => {\n const result = ExternalDocumentationObjectSchema.parse({\n description: 'Find more info here',\n url: 'https://example.com',\n })\n\n expect(result).toEqual({\n description: 'Find more info here',\n url: 'https://example.com',\n })\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AACrC,SAAS,yCAAyC;AAElD,SAAS,0BAA0B,MAAM;AACvC,WAAS,qCAAqC,MAAM;AAElD,OAAG,yCAAyC,MAAM;AAChD,YAAM,SAAS,kCAAkC,MAAM;AAAA,QACrD,aAAa;AAAA,QACb,KAAK;AAAA,MACP,CAAC;AAED,aAAO,MAAM,EAAE,QAAQ;AAAA,QACrB,aAAa;AAAA,QACb,KAAK;AAAA,MACP,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,47 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { HeaderObjectSchema } from "../unprocessed/header-object.js";
3
+ describe("header-object", () => {
4
+ describe("HeaderObjectSchema", () => {
5
+ describe("Header Object Example", () => {
6
+ it("A simple header of type integer", () => {
7
+ const result = HeaderObjectSchema.parse({
8
+ description: "The number of allowed requests in the current period",
9
+ schema: {
10
+ type: "integer"
11
+ }
12
+ });
13
+ expect(result).toEqual({
14
+ description: "The number of allowed requests in the current period",
15
+ schema: {
16
+ type: "integer"
17
+ }
18
+ });
19
+ });
20
+ it('Requiring that a strong ETag header (with a value starting with " rather than W/) is present.', () => {
21
+ const result = HeaderObjectSchema.parse({
22
+ required: true,
23
+ content: {
24
+ "text/plain": {
25
+ schema: {
26
+ type: "string",
27
+ pattern: '^"'
28
+ }
29
+ }
30
+ }
31
+ });
32
+ expect(result).toEqual({
33
+ required: true,
34
+ content: {
35
+ "text/plain": {
36
+ schema: {
37
+ type: "string",
38
+ pattern: '^"'
39
+ }
40
+ }
41
+ }
42
+ });
43
+ });
44
+ });
45
+ });
46
+ });
47
+ //# sourceMappingURL=header-object.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/compliance/header-object.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { HeaderObjectSchema } from '../unprocessed/header-object'\n\ndescribe('header-object', () => {\n describe('HeaderObjectSchema', () => {\n // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#header-object-example\n describe('Header Object Example', () => {\n it('A simple header of type integer', () => {\n const result = HeaderObjectSchema.parse({\n description: 'The number of allowed requests in the current period',\n schema: {\n type: 'integer',\n },\n })\n\n expect(result).toEqual({\n description: 'The number of allowed requests in the current period',\n schema: {\n type: 'integer',\n },\n })\n })\n\n it('Requiring that a strong ETag header (with a value starting with \" rather than W/) is present.', () => {\n const result = HeaderObjectSchema.parse({\n required: true,\n content: {\n 'text/plain': {\n schema: {\n type: 'string',\n pattern: '^\"',\n },\n },\n },\n })\n\n expect(result).toEqual({\n required: true,\n content: {\n 'text/plain': {\n schema: {\n type: 'string',\n pattern: '^\"',\n },\n },\n },\n })\n })\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,0BAA0B;AAEnC,SAAS,iBAAiB,MAAM;AAC9B,WAAS,sBAAsB,MAAM;AAEnC,aAAS,yBAAyB,MAAM;AACtC,SAAG,mCAAmC,MAAM;AAC1C,cAAM,SAAS,mBAAmB,MAAM;AAAA,UACtC,aAAa;AAAA,UACb,QAAQ;AAAA,YACN,MAAM;AAAA,UACR;AAAA,QACF,CAAC;AAED,eAAO,MAAM,EAAE,QAAQ;AAAA,UACrB,aAAa;AAAA,UACb,QAAQ;AAAA,YACN,MAAM;AAAA,UACR;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAED,SAAG,iGAAiG,MAAM;AACxG,cAAM,SAAS,mBAAmB,MAAM;AAAA,UACtC,UAAU;AAAA,UACV,SAAS;AAAA,YACP,cAAc;AAAA,cACZ,QAAQ;AAAA,gBACN,MAAM;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAED,eAAO,MAAM,EAAE,QAAQ;AAAA,UACrB,UAAU;AAAA,UACV,SAAS;AAAA,YACP,cAAc;AAAA,cACZ,QAAQ;AAAA,gBACN,MAAM;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,YACF;AAAA,UACF;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,41 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { InfoObjectSchema } from "../unprocessed/info-object.js";
3
+ describe("info-object", () => {
4
+ describe("InfoObjectSchema", () => {
5
+ it("Info Object Example", () => {
6
+ const result = InfoObjectSchema.parse({
7
+ title: "Example Pet Store App",
8
+ summary: "A pet store manager.",
9
+ description: "This is an example server for a pet store.",
10
+ termsOfService: "https://example.com/terms/",
11
+ contact: {
12
+ name: "API Support",
13
+ url: "https://www.example.com/support",
14
+ email: "support@example.com"
15
+ },
16
+ license: {
17
+ name: "Apache 2.0",
18
+ url: "https://www.apache.org/licenses/LICENSE-2.0.html"
19
+ },
20
+ version: "1.0.1"
21
+ });
22
+ expect(result).toEqual({
23
+ title: "Example Pet Store App",
24
+ summary: "A pet store manager.",
25
+ description: "This is an example server for a pet store.",
26
+ termsOfService: "https://example.com/terms/",
27
+ contact: {
28
+ name: "API Support",
29
+ url: "https://www.example.com/support",
30
+ email: "support@example.com"
31
+ },
32
+ license: {
33
+ name: "Apache 2.0",
34
+ url: "https://www.apache.org/licenses/LICENSE-2.0.html"
35
+ },
36
+ version: "1.0.1"
37
+ });
38
+ });
39
+ });
40
+ });
41
+ //# sourceMappingURL=info-object.test.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/compliance/info-object.test.ts"],
4
+ "sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { InfoObjectSchema } from '../unprocessed/info-object'\n\ndescribe('info-object', () => {\n describe('InfoObjectSchema', () => {\n // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#info-object-example\n it('Info Object Example', () => {\n const result = InfoObjectSchema.parse({\n title: 'Example Pet Store App',\n summary: 'A pet store manager.',\n description: 'This is an example server for a pet store.',\n termsOfService: 'https://example.com/terms/',\n contact: {\n name: 'API Support',\n url: 'https://www.example.com/support',\n email: 'support@example.com',\n },\n license: {\n name: 'Apache 2.0',\n url: 'https://www.apache.org/licenses/LICENSE-2.0.html',\n },\n version: '1.0.1',\n })\n\n expect(result).toEqual({\n title: 'Example Pet Store App',\n summary: 'A pet store manager.',\n description: 'This is an example server for a pet store.',\n termsOfService: 'https://example.com/terms/',\n contact: {\n name: 'API Support',\n url: 'https://www.example.com/support',\n email: 'support@example.com',\n },\n license: {\n name: 'Apache 2.0',\n url: 'https://www.apache.org/licenses/LICENSE-2.0.html',\n },\n version: '1.0.1',\n })\n })\n })\n})\n"],
5
+ "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,wBAAwB;AAEjC,SAAS,eAAe,MAAM;AAC5B,WAAS,oBAAoB,MAAM;AAEjC,OAAG,uBAAuB,MAAM;AAC9B,YAAM,SAAS,iBAAiB,MAAM;AAAA,QACpC,OAAO;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,gBAAgB;AAAA,QAChB,SAAS;AAAA,UACP,MAAM;AAAA,UACN,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,QACA,SAAS;AAAA,UACP,MAAM;AAAA,UACN,KAAK;AAAA,QACP;AAAA,QACA,SAAS;AAAA,MACX,CAAC;AAED,aAAO,MAAM,EAAE,QAAQ;AAAA,QACrB,OAAO;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,gBAAgB;AAAA,QAChB,SAAS;AAAA,UACP,MAAM;AAAA,UACN,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,QACA,SAAS;AAAA,UACP,MAAM;AAAA,UACN,KAAK;AAAA,QACP;AAAA,QACA,SAAS;AAAA,MACX,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
6
+ "names": []
7
+ }