@scalar/openapi-types 0.2.1 → 0.2.3

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 (250) hide show
  1. package/CHANGELOG.md +12 -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.d.ts +1 -0
  193. package/dist/schemas/extensions/index.d.ts.map +1 -1
  194. package/dist/schemas/extensions/index.js +31 -11
  195. package/dist/schemas/extensions/index.js.map +7 -0
  196. package/dist/schemas/extensions/x-additional-properties-name.js +6 -12
  197. package/dist/schemas/extensions/x-additional-properties-name.js.map +7 -0
  198. package/dist/schemas/extensions/x-additional-properties-name.test.js +28 -0
  199. package/dist/schemas/extensions/x-additional-properties-name.test.js.map +7 -0
  200. package/dist/schemas/extensions/x-code-samples.js +12 -10
  201. package/dist/schemas/extensions/x-code-samples.js.map +7 -0
  202. package/dist/schemas/extensions/x-code-samples.test.js +82 -0
  203. package/dist/schemas/extensions/x-code-samples.test.js.map +7 -0
  204. package/dist/schemas/extensions/x-display-name.js +8 -0
  205. package/dist/schemas/extensions/x-display-name.js.map +7 -0
  206. package/dist/schemas/extensions/x-display-name.test.js +28 -0
  207. package/dist/schemas/extensions/x-display-name.test.js.map +7 -0
  208. package/dist/schemas/extensions/x-enum-descriptions.js +6 -18
  209. package/dist/schemas/extensions/x-enum-descriptions.js.map +7 -0
  210. package/dist/schemas/extensions/x-enum-descriptions.test.js +36 -0
  211. package/dist/schemas/extensions/x-enum-descriptions.test.js.map +7 -0
  212. package/dist/schemas/extensions/x-internal.js +6 -5
  213. package/dist/schemas/extensions/x-internal.js.map +7 -0
  214. package/dist/schemas/extensions/x-internal.test.js +20 -0
  215. package/dist/schemas/extensions/x-internal.test.js.map +7 -0
  216. package/dist/schemas/extensions/x-scalar-icon.js +6 -5
  217. package/dist/schemas/extensions/x-scalar-icon.js.map +7 -0
  218. package/dist/schemas/extensions/x-scalar-icon.test.js +14 -0
  219. package/dist/schemas/extensions/x-scalar-icon.test.js.map +7 -0
  220. package/dist/schemas/extensions/x-scalar-ignore.js +6 -5
  221. package/dist/schemas/extensions/x-scalar-ignore.js.map +7 -0
  222. package/dist/schemas/extensions/x-scalar-ignore.test.js +20 -0
  223. package/dist/schemas/extensions/x-scalar-ignore.test.js.map +7 -0
  224. package/dist/schemas/extensions/x-scalar-redirect-uri.js +6 -5
  225. package/dist/schemas/extensions/x-scalar-redirect-uri.js.map +7 -0
  226. package/dist/schemas/extensions/x-scalar-redirect-uri.test.js +23 -0
  227. package/dist/schemas/extensions/x-scalar-redirect-uri.test.js.map +7 -0
  228. package/dist/schemas/extensions/x-scalar-sdk-installation.js +10 -13
  229. package/dist/schemas/extensions/x-scalar-sdk-installation.js.map +7 -0
  230. package/dist/schemas/extensions/x-scalar-sdk-installation.test.js +25 -0
  231. package/dist/schemas/extensions/x-scalar-sdk-installation.test.js.map +7 -0
  232. package/dist/schemas/extensions/x-scalar-security-query.d.ts +20 -0
  233. package/dist/schemas/extensions/x-scalar-security-query.d.ts.map +1 -0
  234. package/dist/schemas/extensions/x-scalar-security-query.js +8 -0
  235. package/dist/schemas/extensions/x-scalar-security-query.js.map +7 -0
  236. package/dist/schemas/extensions/x-scalar-security-query.test.js +35 -0
  237. package/dist/schemas/extensions/x-scalar-security-query.test.js.map +7 -0
  238. package/dist/schemas/extensions/x-scalar-stability.js +10 -19
  239. package/dist/schemas/extensions/x-scalar-stability.js.map +7 -0
  240. package/dist/schemas/extensions/x-scalar-stability.test.js +33 -0
  241. package/dist/schemas/extensions/x-scalar-stability.test.js.map +7 -0
  242. package/dist/schemas/extensions/x-tag-groups.js +14 -17
  243. package/dist/schemas/extensions/x-tag-groups.js.map +7 -0
  244. package/dist/schemas/extensions/x-tag-groups.test.js +55 -0
  245. package/dist/schemas/extensions/x-tag-groups.test.js.map +7 -0
  246. package/dist/schemas/extensions/x-use-pkce.js +11 -10
  247. package/dist/schemas/extensions/x-use-pkce.js.map +7 -0
  248. package/dist/schemas/extensions/x-use-pkce.test.js +34 -0
  249. package/dist/schemas/extensions/x-use-pkce.test.js.map +7 -0
  250. package/package.json +4 -5
@@ -1,34 +1,28 @@
1
- import { z } from 'zod';
2
- import { ExampleObjectSchema } from './example-object.js';
3
- import { SchemaObjectSchema } from './schema-object.js';
4
-
5
- /**
6
- * Media Type Object (without encoding)
7
- *
8
- * Each Media Type Object provides schema and examples for the media type identified by its key.
9
- *
10
- * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#media-type-object
11
- */
1
+ import { z } from "zod";
2
+ import { ExampleObjectSchema } from "./example-object.js";
3
+ import { SchemaObjectSchema } from "./schema-object.js";
12
4
  const MediaTypeObjectSchemaWithoutEncoding = z.object({
13
- /**
14
- * The schema defining the content of the request, response, or parameter.
15
- */
16
- schema: SchemaObjectSchema.optional(),
17
- /**
18
- * Example of the media type. The example object SHOULD be in the correct format as specified by the media type.
19
- * The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains
20
- * an example, the example value SHALL override the example provided by the schema.
21
- */
22
- example: z.any().optional(),
23
- /**
24
- * Examples of the media type. Each example object SHOULD match the media type and specified schema if present.
25
- * The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains
26
- * an example, the examples value SHALL override the example provided by the schema.
27
- */
28
- examples: z.record(z.string(), ExampleObjectSchema).optional(),
29
- // Note: Don’t add `encoding` here.
30
- // The MediaTypeObjectSchema is used in multiple places. And when it’s used in headers, we don’t want the encoding.
31
- // That’s what the OpenAPI specification says.
5
+ /**
6
+ * The schema defining the content of the request, response, or parameter.
7
+ */
8
+ schema: SchemaObjectSchema.optional(),
9
+ /**
10
+ * Example of the media type. The example object SHOULD be in the correct format as specified by the media type.
11
+ * The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains
12
+ * an example, the example value SHALL override the example provided by the schema.
13
+ */
14
+ example: z.any().optional(),
15
+ /**
16
+ * Examples of the media type. Each example object SHOULD match the media type and specified schema if present.
17
+ * The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains
18
+ * an example, the examples value SHALL override the example provided by the schema.
19
+ */
20
+ examples: z.record(z.string(), ExampleObjectSchema).optional()
21
+ // Note: Don’t add `encoding` here.
22
+ // The MediaTypeObjectSchema is used in multiple places. And when it’s used in headers, we don’t want the encoding.
23
+ // That’s what the OpenAPI specification says.
32
24
  });
33
-
34
- export { MediaTypeObjectSchemaWithoutEncoding };
25
+ export {
26
+ MediaTypeObjectSchemaWithoutEncoding
27
+ };
28
+ //# sourceMappingURL=media-type-object-without-encoding.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/processed/media-type-object-without-encoding.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { ExampleObjectSchema } from './example-object'\nimport { SchemaObjectSchema } from './schema-object'\n\n/**\n * Media Type Object (without encoding)\n *\n * Each Media Type Object provides schema and examples for the media type identified by its key.\n *\n * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#media-type-object\n */\nexport const MediaTypeObjectSchemaWithoutEncoding = z.object({\n /**\n * The schema defining the content of the request, response, or parameter.\n */\n schema: SchemaObjectSchema.optional(),\n /**\n * Example of the media type. The example object SHOULD be in the correct format as specified by the media type.\n * The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains\n * an example, the example value SHALL override the example provided by the schema.\n */\n example: z.any().optional(),\n /**\n * Examples of the media type. Each example object SHOULD match the media type and specified schema if present.\n * The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains\n * an example, the examples value SHALL override the example provided by the schema.\n */\n examples: z.record(z.string(), ExampleObjectSchema).optional(),\n // Note: Don\u2019t add `encoding` here.\n // The MediaTypeObjectSchema is used in multiple places. And when it\u2019s used in headers, we don\u2019t want the encoding.\n // That\u2019s what the OpenAPI specification says.\n})\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAS5B,MAAM,uCAAuC,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAI3D,QAAQ,mBAAmB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpC,SAAS,EAAE,IAAI,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,mBAAmB,EAAE,SAAS;AAAA;AAAA;AAAA;AAI/D,CAAC;",
6
+ "names": []
7
+ }
@@ -1,38 +1,32 @@
1
- import { z } from 'zod';
2
- import { EncodingObjectSchema } from './encoding-object.js';
3
- import { ExampleObjectSchema } from './example-object.js';
4
- import { SchemaObjectSchema } from './schema-object.js';
5
-
6
- /**
7
- * Media Type Object
8
- *
9
- * Each Media Type Object provides schema and examples for the media type identified by its key.
10
- *
11
- * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#media-type-object
12
- */
1
+ import { z } from "zod";
2
+ import { EncodingObjectSchema } from "./encoding-object.js";
3
+ import { ExampleObjectSchema } from "./example-object.js";
4
+ import { SchemaObjectSchema } from "./schema-object.js";
13
5
  const MediaTypeObjectSchema = z.object({
14
- /**
15
- * The schema defining the content of the request, response, or parameter.
16
- */
17
- schema: SchemaObjectSchema.optional(),
18
- /**
19
- * Example of the media type. The example object SHOULD be in the correct format as specified by the media type.
20
- * The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains
21
- * an example, the example value SHALL override the example provided by the schema.
22
- */
23
- example: z.any().optional(),
24
- /**
25
- * Examples of the media type. Each example object SHOULD match the media type and specified schema if present.
26
- * The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains
27
- * an example, the examples value SHALL override the example provided by the schema.
28
- */
29
- examples: z.record(z.string(), ExampleObjectSchema).optional(),
30
- /**
31
- * A map between a property name and its encoding information. The key, being the property name, MUST exist in the
32
- * schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is
33
- * multipart or application/x-www-form-urlencoded.
34
- */
35
- encoding: z.record(z.string(), EncodingObjectSchema).optional(),
6
+ /**
7
+ * The schema defining the content of the request, response, or parameter.
8
+ */
9
+ schema: SchemaObjectSchema.optional(),
10
+ /**
11
+ * Example of the media type. The example object SHOULD be in the correct format as specified by the media type.
12
+ * The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains
13
+ * an example, the example value SHALL override the example provided by the schema.
14
+ */
15
+ example: z.any().optional(),
16
+ /**
17
+ * Examples of the media type. Each example object SHOULD match the media type and specified schema if present.
18
+ * The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains
19
+ * an example, the examples value SHALL override the example provided by the schema.
20
+ */
21
+ examples: z.record(z.string(), ExampleObjectSchema).optional(),
22
+ /**
23
+ * A map between a property name and its encoding information. The key, being the property name, MUST exist in the
24
+ * schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is
25
+ * multipart or application/x-www-form-urlencoded.
26
+ */
27
+ encoding: z.record(z.string(), EncodingObjectSchema).optional()
36
28
  });
37
-
38
- export { MediaTypeObjectSchema };
29
+ export {
30
+ MediaTypeObjectSchema
31
+ };
32
+ //# sourceMappingURL=media-type-object.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/processed/media-type-object.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { EncodingObjectSchema } from './encoding-object'\nimport { ExampleObjectSchema } from './example-object'\nimport { SchemaObjectSchema } from './schema-object'\n\n/**\n * Media Type Object\n *\n * Each Media Type Object provides schema and examples for the media type identified by its key.\n *\n * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#media-type-object\n */\nexport const MediaTypeObjectSchema = z.object({\n /**\n * The schema defining the content of the request, response, or parameter.\n */\n schema: SchemaObjectSchema.optional(),\n /**\n * Example of the media type. The example object SHOULD be in the correct format as specified by the media type.\n * The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains\n * an example, the example value SHALL override the example provided by the schema.\n */\n example: z.any().optional(),\n /**\n * Examples of the media type. Each example object SHOULD match the media type and specified schema if present.\n * The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains\n * an example, the examples value SHALL override the example provided by the schema.\n */\n examples: z.record(z.string(), ExampleObjectSchema).optional(),\n /**\n * A map between a property name and its encoding information. The key, being the property name, MUST exist in the\n * schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is\n * multipart or application/x-www-form-urlencoded.\n */\n encoding: z.record(z.string(), EncodingObjectSchema).optional(),\n})\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AAS5B,MAAM,wBAAwB,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA,EAI5C,QAAQ,mBAAmB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpC,SAAS,EAAE,IAAI,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1B,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,mBAAmB,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7D,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,oBAAoB,EAAE,SAAS;AAChE,CAAC;",
6
+ "names": []
7
+ }
@@ -1,78 +1,70 @@
1
- import { z } from 'zod';
2
- import { ComponentsObjectSchema } from './components-object.js';
3
- import { ExternalDocumentationObjectSchema } from './external-documentation-object.js';
4
- import { InfoObjectSchema } from './info-object.js';
5
- import { PathsObjectSchema } from './paths-object.js';
6
- import { SecurityRequirementObjectSchema } from './security-requirement-object.js';
7
- import { ServerObjectSchema } from './server-object.js';
8
- import { TagObjectSchema } from './tag-object.js';
9
- import { WebhooksObjectSchema } from './webhooks-object.js';
10
-
11
- /**
12
- * OpenAPI Object
13
- *
14
- * This is the root object of the OpenAPI Description.
15
- *
16
- * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#openapi-object
17
- */
18
- const OpenApiObjectSchema = z
19
- .object({
20
- /**
21
- * REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI Document uses. The
22
- * openapi field SHOULD be used by tooling to interpret the OpenAPI Document. This is not related to the API
23
- * info.version string.
24
- */
25
- openapi: z.string().regex(/^3\.1\.\d+$/),
26
- /**
27
- * REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
28
- */
29
- info: InfoObjectSchema,
30
- /**
31
- * The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be
32
- * in the form of a URI.
33
- */
34
- jsonSchemaDialect: z.string().optional(),
35
- /**
36
- * An array of Server Objects, which provide connectivity information to a target server. If the servers field is
37
- * not provided, or is an empty array, the default value would be a Server Object with a url value of /.
38
- */
39
- servers: z.array(ServerObjectSchema).optional(),
40
- /**
41
- * The available paths and operations for the API.
42
- */
43
- paths: PathsObjectSchema.optional(),
44
- /**
45
- * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.
46
- * Closely related to the callbacks feature, this section describes requests initiated other than by an API call,
47
- * for example by an out of band registration. The key name is a unique string to refer to each webhook, while the
48
- * (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the
49
- * expected responses. An example is available.
50
- */
51
- webhooks: WebhooksObjectSchema.optional(),
52
- /**
53
- * An element to hold various Objects for the OpenAPI Description.
54
- */
55
- components: ComponentsObjectSchema.optional(),
56
- /**
57
- * A declaration of which security mechanisms can be used across the API. The list of values includes alternative
58
- * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied
59
- * to authorize a request. Individual operations can override this definition. The list can be incomplete, up to
60
- * being empty or absent. To make security explicitly optional, an empty security requirement ({}) can be included
61
- * in the array.
62
- */
63
- security: z.array(SecurityRequirementObjectSchema).optional(),
64
- /**
65
- * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to
66
- * reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared.
67
- * The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list
68
- * MUST be unique.
69
- */
70
- tags: z.array(TagObjectSchema).optional(),
71
- /**
72
- * Additional external documentation.
73
- */
74
- externalDocs: ExternalDocumentationObjectSchema.optional(),
75
- })
76
- .passthrough();
77
-
78
- export { OpenApiObjectSchema };
1
+ import { z } from "zod";
2
+ import { ComponentsObjectSchema } from "./components-object.js";
3
+ import { ExternalDocumentationObjectSchema } from "./external-documentation-object.js";
4
+ import { InfoObjectSchema } from "./info-object.js";
5
+ import { PathsObjectSchema } from "./paths-object.js";
6
+ import { SecurityRequirementObjectSchema } from "./security-requirement-object.js";
7
+ import { ServerObjectSchema } from "./server-object.js";
8
+ import { TagObjectSchema } from "./tag-object.js";
9
+ import { WebhooksObjectSchema } from "./webhooks-object.js";
10
+ const OpenApiObjectSchema = z.object({
11
+ /**
12
+ * REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI Document uses. The
13
+ * openapi field SHOULD be used by tooling to interpret the OpenAPI Document. This is not related to the API
14
+ * info.version string.
15
+ */
16
+ openapi: z.string().regex(/^3\.1\.\d+$/),
17
+ /**
18
+ * REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.
19
+ */
20
+ info: InfoObjectSchema,
21
+ /**
22
+ * The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be
23
+ * in the form of a URI.
24
+ */
25
+ jsonSchemaDialect: z.string().optional(),
26
+ /**
27
+ * An array of Server Objects, which provide connectivity information to a target server. If the servers field is
28
+ * not provided, or is an empty array, the default value would be a Server Object with a url value of /.
29
+ */
30
+ servers: z.array(ServerObjectSchema).optional(),
31
+ /**
32
+ * The available paths and operations for the API.
33
+ */
34
+ paths: PathsObjectSchema.optional(),
35
+ /**
36
+ * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.
37
+ * Closely related to the callbacks feature, this section describes requests initiated other than by an API call,
38
+ * for example by an out of band registration. The key name is a unique string to refer to each webhook, while the
39
+ * (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the
40
+ * expected responses. An example is available.
41
+ */
42
+ webhooks: WebhooksObjectSchema.optional(),
43
+ /**
44
+ * An element to hold various Objects for the OpenAPI Description.
45
+ */
46
+ components: ComponentsObjectSchema.optional(),
47
+ /**
48
+ * A declaration of which security mechanisms can be used across the API. The list of values includes alternative
49
+ * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied
50
+ * to authorize a request. Individual operations can override this definition. The list can be incomplete, up to
51
+ * being empty or absent. To make security explicitly optional, an empty security requirement ({}) can be included
52
+ * in the array.
53
+ */
54
+ security: z.array(SecurityRequirementObjectSchema).optional(),
55
+ /**
56
+ * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to
57
+ * reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared.
58
+ * The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list
59
+ * MUST be unique.
60
+ */
61
+ tags: z.array(TagObjectSchema).optional(),
62
+ /**
63
+ * Additional external documentation.
64
+ */
65
+ externalDocs: ExternalDocumentationObjectSchema.optional()
66
+ }).passthrough();
67
+ export {
68
+ OpenApiObjectSchema
69
+ };
70
+ //# sourceMappingURL=openapi-object.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/processed/openapi-object.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { ComponentsObjectSchema } from './components-object'\nimport { ExternalDocumentationObjectSchema } from './external-documentation-object'\nimport { InfoObjectSchema } from './info-object'\nimport { PathsObjectSchema } from './paths-object'\nimport { SecurityRequirementObjectSchema } from './security-requirement-object'\nimport { ServerObjectSchema } from './server-object'\nimport { TagObjectSchema } from './tag-object'\nimport { WebhooksObjectSchema } from './webhooks-object'\n\ntype OpenApiObject = {\n openapi: string\n info: z.infer<typeof InfoObjectSchema>\n jsonSchemaDialect?: string\n servers?: z.infer<typeof ServerObjectSchema>[]\n paths?: z.infer<typeof PathsObjectSchema>\n webhooks?: z.infer<typeof WebhooksObjectSchema>\n components?: z.infer<typeof ComponentsObjectSchema>\n security?: z.infer<typeof SecurityRequirementObjectSchema>[]\n tags?: z.infer<typeof TagObjectSchema>[]\n externalDocs?: z.infer<typeof ExternalDocumentationObjectSchema>\n}\n\n/**\n * OpenAPI Object\n *\n * This is the root object of the OpenAPI Description.\n *\n * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#openapi-object\n */\nexport const OpenApiObjectSchema = z\n .object({\n /**\n * REQUIRED. This string MUST be the version number of the OpenAPI Specification that the OpenAPI Document uses. The\n * openapi field SHOULD be used by tooling to interpret the OpenAPI Document. This is not related to the API\n * info.version string.\n */\n openapi: z.string().regex(/^3\\.1\\.\\d+$/),\n /**\n * REQUIRED. Provides metadata about the API. The metadata MAY be used by tooling as required.\n */\n info: InfoObjectSchema,\n /**\n * The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be\n * in the form of a URI.\n */\n jsonSchemaDialect: z.string().optional(),\n /**\n * An array of Server Objects, which provide connectivity information to a target server. If the servers field is\n * not provided, or is an empty array, the default value would be a Server Object with a url value of /.\n */\n servers: z.array(ServerObjectSchema).optional(),\n /**\n * The available paths and operations for the API.\n */\n paths: PathsObjectSchema.optional(),\n /**\n * The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.\n * Closely related to the callbacks feature, this section describes requests initiated other than by an API call,\n * for example by an out of band registration. The key name is a unique string to refer to each webhook, while the\n * (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the\n * expected responses. An example is available.\n */\n webhooks: WebhooksObjectSchema.optional(),\n /**\n * An element to hold various Objects for the OpenAPI Description.\n */\n components: ComponentsObjectSchema.optional(),\n /**\n * A declaration of which security mechanisms can be used across the API. The list of values includes alternative\n * Security Requirement Objects that can be used. Only one of the Security Requirement Objects need to be satisfied\n * to authorize a request. Individual operations can override this definition. The list can be incomplete, up to\n * being empty or absent. To make security explicitly optional, an empty security requirement ({}) can be included\n * in the array.\n */\n security: z.array(SecurityRequirementObjectSchema).optional(),\n /**\n * A list of tags used by the OpenAPI Description with additional metadata. The order of the tags can be used to\n * reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared.\n * The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list\n * MUST be unique.\n */\n tags: z.array(TagObjectSchema).optional(),\n /**\n * Additional external documentation.\n */\n externalDocs: ExternalDocumentationObjectSchema.optional(),\n })\n .passthrough() as z.ZodType<OpenApiObject>\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,8BAA8B;AACvC,SAAS,yCAAyC;AAClD,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,uCAAuC;AAChD,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AAsB9B,MAAM,sBAAsB,EAChC,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMN,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA,EAIvC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,mBAAmB,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKvC,SAAS,EAAE,MAAM,kBAAkB,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAI9C,OAAO,kBAAkB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlC,UAAU,qBAAqB,SAAS;AAAA;AAAA;AAAA;AAAA,EAIxC,YAAY,uBAAuB,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ5C,UAAU,EAAE,MAAM,+BAA+B,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO5D,MAAM,EAAE,MAAM,eAAe,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAIxC,cAAc,kCAAkC,SAAS;AAC3D,CAAC,EACA,YAAY;",
6
+ "names": []
7
+ }
@@ -1,72 +1,66 @@
1
- import { z } from 'zod';
2
- import { ExternalDocumentationObjectSchema } from './external-documentation-object.js';
3
- import { ParameterObjectSchema } from './parameter-object.js';
4
- import { RequestBodyObjectSchema } from './request-body-object.js';
5
- import { ResponseObjectSchema } from './response-object.js';
6
- import { SecurityRequirementObjectSchema } from './security-requirement-object.js';
7
-
8
- /**
9
- * Operation Object (without callbacks, used in callbacks)
10
- *
11
- * Describes a single API operation on a path.
12
- *
13
- * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#operation-object
14
- */
1
+ import { z } from "zod";
2
+ import { ExternalDocumentationObjectSchema } from "./external-documentation-object.js";
3
+ import { ParameterObjectSchema } from "./parameter-object.js";
4
+ import { RequestBodyObjectSchema } from "./request-body-object.js";
5
+ import { ResponseObjectSchema } from "./response-object.js";
6
+ import { SecurityRequirementObjectSchema } from "./security-requirement-object.js";
15
7
  const OperationObjectSchemaWithoutCallbacks = z.object({
16
- /**
17
- * A list of tags for API documentation control. Tags can be used for logical
18
- * grouping of operations by resources or any other qualifier.
19
- */
20
- 'tags': z.string().array().optional(),
21
- /**
22
- * A short summary of what the operation does.
23
- */
24
- 'summary': z.string().optional(),
25
- /**
26
- * A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
27
- */
28
- 'description': z.string().optional(),
29
- /**
30
- * External documentation object
31
- */
32
- 'externalDocs': ExternalDocumentationObjectSchema.optional(),
33
- /**
34
- * Unique string used to identify the operation. The id MUST be unique among all operations described in the API.
35
- * The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an
36
- * operation, therefore, it is RECOMMENDED to follow bin common programming naming conventions.
37
- */
38
- 'operationId': z.string().optional(),
39
- /**
40
- * A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,
41
- * the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A
42
- * unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link
43
- * to parameters that are defined in the OpenAPI Object's components.parameters.
44
- */
45
- 'parameters': ParameterObjectSchema.array().optional(),
46
- /**
47
- * The request body applicable for this operation. The requestBody is fully supported in HTTP methods where the
48
- * HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the
49
- * HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined
50
- * semantics and SHOULD be avoided if possible.
51
- */
52
- 'requestBody': RequestBodyObjectSchema.optional(),
53
- /**
54
- * The list of possible responses as they are returned from executing this operation.
55
- */
56
- 'responses': z.record(z.string(), ResponseObjectSchema).optional(),
57
- /**
58
- * A declaration of which security mechanisms can be used across the API. The list of
59
- * values includes alternative security requirement objects that can be used. Only
60
- * one of the security requirement objects need to be satisfied to authorize a request.
61
- * Individual operations can override this definition. To make security optional, an empty
62
- * security requirement ({}) can be included in the array.
63
- */
64
- 'security': z.array(SecurityRequirementObjectSchema).optional(),
65
- /**
66
- * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default
67
- * value is false.
68
- */
69
- 'deprecated': z.boolean().optional(),
8
+ /**
9
+ * A list of tags for API documentation control. Tags can be used for logical
10
+ * grouping of operations by resources or any other qualifier.
11
+ */
12
+ "tags": z.string().array().optional(),
13
+ /**
14
+ * A short summary of what the operation does.
15
+ */
16
+ "summary": z.string().optional(),
17
+ /**
18
+ * A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
19
+ */
20
+ "description": z.string().optional(),
21
+ /**
22
+ * External documentation object
23
+ */
24
+ "externalDocs": ExternalDocumentationObjectSchema.optional(),
25
+ /**
26
+ * Unique string used to identify the operation. The id MUST be unique among all operations described in the API.
27
+ * The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an
28
+ * operation, therefore, it is RECOMMENDED to follow bin common programming naming conventions.
29
+ */
30
+ "operationId": z.string().optional(),
31
+ /**
32
+ * A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,
33
+ * the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A
34
+ * unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link
35
+ * to parameters that are defined in the OpenAPI Object's components.parameters.
36
+ */
37
+ "parameters": ParameterObjectSchema.array().optional(),
38
+ /**
39
+ * The request body applicable for this operation. The requestBody is fully supported in HTTP methods where the
40
+ * HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the
41
+ * HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined
42
+ * semantics and SHOULD be avoided if possible.
43
+ */
44
+ "requestBody": RequestBodyObjectSchema.optional(),
45
+ /**
46
+ * The list of possible responses as they are returned from executing this operation.
47
+ */
48
+ "responses": z.record(z.string(), ResponseObjectSchema).optional(),
49
+ /**
50
+ * A declaration of which security mechanisms can be used across the API. The list of
51
+ * values includes alternative security requirement objects that can be used. Only
52
+ * one of the security requirement objects need to be satisfied to authorize a request.
53
+ * Individual operations can override this definition. To make security optional, an empty
54
+ * security requirement ({}) can be included in the array.
55
+ */
56
+ "security": z.array(SecurityRequirementObjectSchema).optional(),
57
+ /**
58
+ * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default
59
+ * value is false.
60
+ */
61
+ "deprecated": z.boolean().optional()
70
62
  });
71
-
72
- export { OperationObjectSchemaWithoutCallbacks };
63
+ export {
64
+ OperationObjectSchemaWithoutCallbacks
65
+ };
66
+ //# sourceMappingURL=operation-object-without-callbacks.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/processed/operation-object-without-callbacks.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { ExternalDocumentationObjectSchema } from './external-documentation-object'\nimport { ParameterObjectSchema } from './parameter-object'\nimport { RequestBodyObjectSchema } from './request-body-object'\nimport { ResponseObjectSchema } from './response-object'\nimport { SecurityRequirementObjectSchema } from './security-requirement-object'\n\n/**\n * Operation Object (without callbacks, used in callbacks)\n *\n * Describes a single API operation on a path.\n *\n * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#operation-object\n */\nexport const OperationObjectSchemaWithoutCallbacks = z.object({\n /**\n * A list of tags for API documentation control. Tags can be used for logical\n * grouping of operations by resources or any other qualifier.\n */\n 'tags': z.string().array().optional(),\n /**\n * A short summary of what the operation does.\n */\n 'summary': z.string().optional(),\n /**\n * A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.\n */\n 'description': z.string().optional(),\n /**\n * External documentation object\n */\n 'externalDocs': ExternalDocumentationObjectSchema.optional(),\n /**\n * Unique string used to identify the operation. The id MUST be unique among all operations described in the API.\n * The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an\n * operation, therefore, it is RECOMMENDED to follow bin common programming naming conventions.\n */\n 'operationId': z.string().optional(),\n /**\n * A list of parameters that are applicable for this operation. If a parameter is already defined at the Path Item,\n * the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A\n * unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link\n * to parameters that are defined in the OpenAPI Object's components.parameters.\n */\n 'parameters': ParameterObjectSchema.array().optional(),\n /**\n * The request body applicable for this operation. The requestBody is fully supported in HTTP methods where the\n * HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the\n * HTTP spec is vague (such as GET, HEAD and DELETE), requestBody is permitted but does not have well-defined\n * semantics and SHOULD be avoided if possible.\n */\n 'requestBody': RequestBodyObjectSchema.optional(),\n /**\n * The list of possible responses as they are returned from executing this operation.\n */\n 'responses': z.record(z.string(), ResponseObjectSchema).optional(),\n /**\n * A declaration of which security mechanisms can be used across the API. The list of\n * values includes alternative security requirement objects that can be used. Only\n * one of the security requirement objects need to be satisfied to authorize a request.\n * Individual operations can override this definition. To make security optional, an empty\n * security requirement ({}) can be included in the array.\n */\n 'security': z.array(SecurityRequirementObjectSchema).optional(),\n /**\n * Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default\n * value is false.\n */\n 'deprecated': z.boolean().optional(),\n})\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,yCAAyC;AAClD,SAAS,6BAA6B;AACtC,SAAS,+BAA+B;AACxC,SAAS,4BAA4B;AACrC,SAAS,uCAAuC;AASzC,MAAM,wCAAwC,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5D,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAIpC,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAI/B,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA,EAInC,gBAAgB,kCAAkC,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3D,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOnC,cAAc,sBAAsB,MAAM,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOrD,eAAe,wBAAwB,SAAS;AAAA;AAAA;AAAA;AAAA,EAIhD,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,oBAAoB,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjE,YAAY,EAAE,MAAM,+BAA+B,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAK9D,cAAc,EAAE,QAAQ,EAAE,SAAS;AACrC,CAAC;",
6
+ "names": []
7
+ }
@@ -1,22 +1,16 @@
1
- import { z } from 'zod';
2
- import { CallbackObjectSchema } from './callback-object.js';
3
- import { OperationObjectSchemaWithoutCallbacks } from './operation-object-without-callbacks.js';
4
-
5
- /**
6
- * Operation Object
7
- *
8
- * Describes a single API operation on a path.
9
- *
10
- * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#operation-object
11
- */
1
+ import { z } from "zod";
2
+ import { CallbackObjectSchema } from "./callback-object.js";
3
+ import { OperationObjectSchemaWithoutCallbacks } from "./operation-object-without-callbacks.js";
12
4
  const OperationObjectSchema = OperationObjectSchemaWithoutCallbacks.extend({
13
- /**
14
- * A map of possible out-of-band callbacks related to the parent operation. Each value in the map is a
15
- * Path Item Object that describes a set of requests that may be initiated by the API provider and the
16
- * expected responses. The key value used to identify the callback object is an expression, evaluated
17
- * at runtime, that identifies a URL to be used for the callback operation.
18
- */
19
- 'callbacks': z.record(z.string(), CallbackObjectSchema).optional(),
5
+ /**
6
+ * A map of possible out-of-band callbacks related to the parent operation. Each value in the map is a
7
+ * Path Item Object that describes a set of requests that may be initiated by the API provider and the
8
+ * expected responses. The key value used to identify the callback object is an expression, evaluated
9
+ * at runtime, that identifies a URL to be used for the callback operation.
10
+ */
11
+ "callbacks": z.record(z.string(), CallbackObjectSchema).optional()
20
12
  });
21
-
22
- export { OperationObjectSchema };
13
+ export {
14
+ OperationObjectSchema
15
+ };
16
+ //# sourceMappingURL=operation-object.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/schemas/3.1/processed/operation-object.ts"],
4
+ "sourcesContent": ["import { z } from 'zod'\nimport { CallbackObjectSchema } from './callback-object'\nimport { OperationObjectSchemaWithoutCallbacks } from './operation-object-without-callbacks'\n\ntype OperationObject = z.infer<typeof OperationObjectSchemaWithoutCallbacks> & {\n callbacks?: Record<string, z.infer<typeof CallbackObjectSchema>>\n}\n\n/**\n * Operation Object\n *\n * Describes a single API operation on a path.\n *\n * @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#operation-object\n */\nexport const OperationObjectSchema: z.ZodType<OperationObject> = OperationObjectSchemaWithoutCallbacks.extend({\n /**\n * A map of possible out-of-band callbacks related to the parent operation. Each value in the map is a\n * Path Item Object that describes a set of requests that may be initiated by the API provider and the\n * expected responses. The key value used to identify the callback object is an expression, evaluated\n * at runtime, that identifies a URL to be used for the callback operation.\n */\n 'callbacks': z.record(z.string(), CallbackObjectSchema).optional(),\n})\n"],
5
+ "mappings": "AAAA,SAAS,SAAS;AAClB,SAAS,4BAA4B;AACrC,SAAS,6CAA6C;AAa/C,MAAM,wBAAoD,sCAAsC,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAO5G,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,oBAAoB,EAAE,SAAS;AACnE,CAAC;",
6
+ "names": []
7
+ }