openapi-typesafe 1.0.0-rc.2 → 1.0.0-rc.4

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 (514) hide show
  1. package/CHANGELOG.md +1831 -0
  2. package/dist/adapters/node-deprecations/node-deprecations.cjs +14 -0
  3. package/dist/adapters/node-deprecations/node-deprecations.cjs.map +1 -0
  4. package/dist/adapters/node-deprecations/node-deprecations.mjs +12 -0
  5. package/dist/adapters/node-deprecations/node-deprecations.mjs.map +1 -0
  6. package/dist/adapters/node-file-system/file-claims.cjs +105 -0
  7. package/dist/adapters/node-file-system/file-claims.cjs.map +1 -0
  8. package/dist/adapters/node-file-system/file-claims.mjs +95 -0
  9. package/dist/adapters/node-file-system/file-claims.mjs.map +1 -0
  10. package/dist/adapters/node-file-system/file-identity.cjs +82 -0
  11. package/dist/adapters/node-file-system/file-identity.cjs.map +1 -0
  12. package/dist/adapters/node-file-system/file-identity.mjs +74 -0
  13. package/dist/adapters/node-file-system/file-identity.mjs.map +1 -0
  14. package/dist/adapters/node-file-system/node-file-system.cjs +90 -14
  15. package/dist/adapters/node-file-system/node-file-system.cjs.map +1 -1
  16. package/dist/adapters/node-file-system/node-file-system.mjs +90 -14
  17. package/dist/adapters/node-file-system/node-file-system.mjs.map +1 -1
  18. package/dist/adapters/redocly-loader/bundled-mapping-copies.cjs +75 -0
  19. package/dist/adapters/redocly-loader/bundled-mapping-copies.cjs.map +1 -0
  20. package/dist/adapters/redocly-loader/bundled-mapping-copies.mjs +72 -0
  21. package/dist/adapters/redocly-loader/bundled-mapping-copies.mjs.map +1 -0
  22. package/dist/adapters/redocly-loader/bundled-ref-repair.cjs +1 -1
  23. package/dist/adapters/redocly-loader/bundled-ref-repair.cjs.map +1 -1
  24. package/dist/adapters/redocly-loader/bundled-ref-repair.mjs +2 -2
  25. package/dist/adapters/redocly-loader/bundled-ref-repair.mjs.map +1 -1
  26. package/dist/adapters/redocly-loader/loaded-documents.cjs +28 -0
  27. package/dist/adapters/redocly-loader/loaded-documents.cjs.map +1 -0
  28. package/dist/adapters/redocly-loader/loaded-documents.mjs +21 -0
  29. package/dist/adapters/redocly-loader/loaded-documents.mjs.map +1 -0
  30. package/dist/adapters/redocly-loader/redocly-schema-loader.cjs +14 -15
  31. package/dist/adapters/redocly-loader/redocly-schema-loader.cjs.map +1 -1
  32. package/dist/adapters/redocly-loader/redocly-schema-loader.mjs +12 -13
  33. package/dist/adapters/redocly-loader/redocly-schema-loader.mjs.map +1 -1
  34. package/dist/adapters/redocly-loader/ref-access.cjs +31 -3
  35. package/dist/adapters/redocly-loader/ref-access.cjs.map +1 -1
  36. package/dist/adapters/redocly-loader/ref-access.mjs +31 -3
  37. package/dist/adapters/redocly-loader/ref-access.mjs.map +1 -1
  38. package/dist/adapters/redocly-loader/ref-holders.cjs +2 -2
  39. package/dist/adapters/redocly-loader/ref-holders.cjs.map +1 -1
  40. package/dist/adapters/redocly-loader/ref-holders.mjs +3 -3
  41. package/dist/adapters/redocly-loader/ref-holders.mjs.map +1 -1
  42. package/dist/adapters/redocly-loader/remote-body-limit.cjs +50 -0
  43. package/dist/adapters/redocly-loader/remote-body-limit.cjs.map +1 -0
  44. package/dist/adapters/redocly-loader/remote-body-limit.mjs +48 -0
  45. package/dist/adapters/redocly-loader/remote-body-limit.mjs.map +1 -0
  46. package/dist/adapters/redocly-loader/remote-fetch.cjs +35 -6
  47. package/dist/adapters/redocly-loader/remote-fetch.cjs.map +1 -1
  48. package/dist/adapters/redocly-loader/remote-fetch.mjs +35 -6
  49. package/dist/adapters/redocly-loader/remote-fetch.mjs.map +1 -1
  50. package/dist/adapters/redocly-loader/remote-node-limit.cjs +47 -0
  51. package/dist/adapters/redocly-loader/remote-node-limit.cjs.map +1 -0
  52. package/dist/adapters/redocly-loader/remote-node-limit.mjs +44 -0
  53. package/dist/adapters/redocly-loader/remote-node-limit.mjs.map +1 -0
  54. package/dist/adapters/redocly-loader/schema-load-errors.cjs +32 -8
  55. package/dist/adapters/redocly-loader/schema-load-errors.cjs.map +1 -1
  56. package/dist/adapters/redocly-loader/schema-load-errors.mjs +32 -9
  57. package/dist/adapters/redocly-loader/schema-load-errors.mjs.map +1 -1
  58. package/dist/adapters/redocly-loader/schema-source.cjs +11 -7
  59. package/dist/adapters/redocly-loader/schema-source.cjs.map +1 -1
  60. package/dist/adapters/redocly-loader/schema-source.mjs +12 -8
  61. package/dist/adapters/redocly-loader/schema-source.mjs.map +1 -1
  62. package/dist/adapters/redocly-loader/unsupported-keys.cjs +3 -5
  63. package/dist/adapters/redocly-loader/unsupported-keys.cjs.map +1 -1
  64. package/dist/adapters/redocly-loader/unsupported-keys.mjs +3 -5
  65. package/dist/adapters/redocly-loader/unsupported-keys.mjs.map +1 -1
  66. package/dist/adapters/terminal-logger/terminal-logger.cjs +6 -4
  67. package/dist/adapters/terminal-logger/terminal-logger.cjs.map +1 -1
  68. package/dist/adapters/terminal-logger/terminal-logger.mjs +6 -4
  69. package/dist/adapters/terminal-logger/terminal-logger.mjs.map +1 -1
  70. package/dist/api/default-ports.cjs +19 -2
  71. package/dist/api/default-ports.cjs.map +1 -1
  72. package/dist/api/default-ports.mjs +19 -3
  73. package/dist/api/default-ports.mjs.map +1 -1
  74. package/dist/api/discriminator-conflict-warnings.cjs +1 -1
  75. package/dist/api/discriminator-conflict-warnings.cjs.map +1 -1
  76. package/dist/api/discriminator-conflict-warnings.mjs +2 -2
  77. package/dist/api/discriminator-conflict-warnings.mjs.map +1 -1
  78. package/dist/api/discriminator-enum-parent.cjs +2 -2
  79. package/dist/api/discriminator-enum-parent.cjs.map +1 -1
  80. package/dist/api/discriminator-enum-parent.mjs +3 -3
  81. package/dist/api/discriminator-enum-parent.mjs.map +1 -1
  82. package/dist/api/discriminator-other-owners.cjs +5 -3
  83. package/dist/api/discriminator-other-owners.cjs.map +1 -1
  84. package/dist/api/discriminator-other-owners.mjs +5 -3
  85. package/dist/api/discriminator-other-owners.mjs.map +1 -1
  86. package/dist/api/discriminator-patch.cjs +8 -4
  87. package/dist/api/discriminator-patch.cjs.map +1 -1
  88. package/dist/api/discriminator-patch.mjs +9 -5
  89. package/dist/api/discriminator-patch.mjs.map +1 -1
  90. package/dist/api/discriminator-scan.cjs +17 -10
  91. package/dist/api/discriminator-scan.cjs.map +1 -1
  92. package/dist/api/discriminator-scan.mjs +18 -11
  93. package/dist/api/discriminator-scan.mjs.map +1 -1
  94. package/dist/api/document-run.cjs +4 -3
  95. package/dist/api/document-run.cjs.map +1 -1
  96. package/dist/api/document-run.mjs +4 -3
  97. package/dist/api/document-run.mjs.map +1 -1
  98. package/dist/api/legacy-callback-warning.cjs +7 -4
  99. package/dist/api/legacy-callback-warning.cjs.map +1 -1
  100. package/dist/api/legacy-callback-warning.mjs +8 -5
  101. package/dist/api/legacy-callback-warning.mjs.map +1 -1
  102. package/dist/api/legacy-utils.cjs.map +1 -1
  103. package/dist/api/legacy-utils.mjs.map +1 -1
  104. package/dist/api/openapi-ts.cjs +9 -5
  105. package/dist/api/openapi-ts.cjs.map +1 -1
  106. package/dist/api/openapi-ts.mjs +10 -7
  107. package/dist/api/openapi-ts.mjs.map +1 -1
  108. package/dist/api/schema-callbacks.cjs +36 -12
  109. package/dist/api/schema-callbacks.cjs.map +1 -1
  110. package/dist/api/schema-callbacks.mjs +36 -12
  111. package/dist/api/schema-callbacks.mjs.map +1 -1
  112. package/dist/api/string-to-ast.cjs +7 -9
  113. package/dist/api/string-to-ast.cjs.map +1 -1
  114. package/dist/api/string-to-ast.mjs +8 -9
  115. package/dist/api/string-to-ast.mjs.map +1 -1
  116. package/dist/api/transform-context.cjs +7 -3
  117. package/dist/api/transform-context.cjs.map +1 -1
  118. package/dist/api/transform-context.mjs +7 -3
  119. package/dist/api/transform-context.mjs.map +1 -1
  120. package/dist/api/transform-schema.cjs +42 -12
  121. package/dist/api/transform-schema.cjs.map +1 -1
  122. package/dist/api/transform-schema.mjs +44 -14
  123. package/dist/api/transform-schema.mjs.map +1 -1
  124. package/dist/application/print/text-writer.cjs +10 -3
  125. package/dist/application/print/text-writer.cjs.map +1 -1
  126. package/dist/application/print/text-writer.mjs +10 -3
  127. package/dist/application/print/text-writer.mjs.map +1 -1
  128. package/dist/application/stack-overflow.cjs +2 -1
  129. package/dist/application/stack-overflow.cjs.map +1 -1
  130. package/dist/application/stack-overflow.mjs +2 -1
  131. package/dist/application/stack-overflow.mjs.map +1 -1
  132. package/dist/application/transform/document/components.cjs +2 -2
  133. package/dist/application/transform/document/components.cjs.map +1 -1
  134. package/dist/application/transform/document/components.mjs +4 -4
  135. package/dist/application/transform/document/components.mjs.map +1 -1
  136. package/dist/application/transform/document/declared-type-names.cjs +23 -0
  137. package/dist/application/transform/document/declared-type-names.cjs.map +1 -0
  138. package/dist/application/transform/document/declared-type-names.mjs +20 -0
  139. package/dist/application/transform/document/declared-type-names.mjs.map +1 -0
  140. package/dist/application/transform/document/defs-root.cjs +1 -1
  141. package/dist/application/transform/document/defs-root.cjs.map +1 -1
  142. package/dist/application/transform/document/defs-root.mjs +2 -2
  143. package/dist/application/transform/document/defs-root.mjs.map +1 -1
  144. package/dist/application/transform/document/document.cjs +4 -1
  145. package/dist/application/transform/document/document.cjs.map +1 -1
  146. package/dist/application/transform/document/document.mjs +3 -2
  147. package/dist/application/transform/document/document.mjs.map +1 -1
  148. package/dist/application/transform/document/enum-names-given-back.cjs +62 -0
  149. package/dist/application/transform/document/enum-names-given-back.cjs.map +1 -0
  150. package/dist/application/transform/document/enum-names-given-back.mjs +58 -0
  151. package/dist/application/transform/document/enum-names-given-back.mjs.map +1 -0
  152. package/dist/application/transform/document/global-type-references.cjs +1 -0
  153. package/dist/application/transform/document/global-type-references.cjs.map +1 -1
  154. package/dist/application/transform/document/global-type-references.mjs +1 -1
  155. package/dist/application/transform/document/global-type-references.mjs.map +1 -1
  156. package/dist/application/transform/document/media-type.cjs +2 -2
  157. package/dist/application/transform/document/media-type.cjs.map +1 -1
  158. package/dist/application/transform/document/media-type.mjs +3 -3
  159. package/dist/application/transform/document/media-type.mjs.map +1 -1
  160. package/dist/application/transform/document/operation-keys-written.cjs +26 -0
  161. package/dist/application/transform/document/operation-keys-written.cjs.map +1 -0
  162. package/dist/application/transform/document/operation-keys-written.mjs +24 -0
  163. package/dist/application/transform/document/operation-keys-written.mjs.map +1 -0
  164. package/dist/application/transform/document/operation.cjs +1 -1
  165. package/dist/application/transform/document/operation.cjs.map +1 -1
  166. package/dist/application/transform/document/operation.mjs +2 -2
  167. package/dist/application/transform/document/operation.mjs.map +1 -1
  168. package/dist/application/transform/document/parameter-entries.cjs +34 -0
  169. package/dist/application/transform/document/parameter-entries.cjs.map +1 -0
  170. package/dist/application/transform/document/parameter-entries.mjs +30 -0
  171. package/dist/application/transform/document/parameter-entries.mjs.map +1 -0
  172. package/dist/application/transform/document/parameter.cjs +12 -4
  173. package/dist/application/transform/document/parameter.cjs.map +1 -1
  174. package/dist/application/transform/document/parameter.mjs +13 -5
  175. package/dist/application/transform/document/parameter.mjs.map +1 -1
  176. package/dist/application/transform/document/parameters.cjs +7 -30
  177. package/dist/application/transform/document/parameters.cjs.map +1 -1
  178. package/dist/application/transform/document/parameters.mjs +8 -31
  179. package/dist/application/transform/document/parameters.mjs.map +1 -1
  180. package/dist/application/transform/document/path-item.cjs +11 -14
  181. package/dist/application/transform/document/path-item.cjs.map +1 -1
  182. package/dist/application/transform/document/path-item.mjs +12 -16
  183. package/dist/application/transform/document/path-item.mjs.map +1 -1
  184. package/dist/application/transform/document/paths-enum.cjs +1 -0
  185. package/dist/application/transform/document/paths-enum.cjs.map +1 -1
  186. package/dist/application/transform/document/paths-enum.mjs +1 -1
  187. package/dist/application/transform/document/paths-enum.mjs.map +1 -1
  188. package/dist/application/transform/document/paths.cjs +6 -2
  189. package/dist/application/transform/document/paths.cjs.map +1 -1
  190. package/dist/application/transform/document/paths.mjs +8 -4
  191. package/dist/application/transform/document/paths.mjs.map +1 -1
  192. package/dist/application/transform/document/referenced-parameter.cjs +80 -0
  193. package/dist/application/transform/document/referenced-parameter.cjs.map +1 -0
  194. package/dist/application/transform/document/referenced-parameter.mjs +78 -0
  195. package/dist/application/transform/document/referenced-parameter.mjs.map +1 -0
  196. package/dist/application/transform/document/request-body.cjs +1 -1
  197. package/dist/application/transform/document/request-body.cjs.map +1 -1
  198. package/dist/application/transform/document/request-body.mjs +2 -2
  199. package/dist/application/transform/document/request-body.mjs.map +1 -1
  200. package/dist/application/transform/document/response.cjs +2 -2
  201. package/dist/application/transform/document/response.cjs.map +1 -1
  202. package/dist/application/transform/document/response.mjs +3 -3
  203. package/dist/application/transform/document/response.mjs.map +1 -1
  204. package/dist/application/transform/document/responses.cjs +1 -1
  205. package/dist/application/transform/document/responses.cjs.map +1 -1
  206. package/dist/application/transform/document/responses.mjs +2 -2
  207. package/dist/application/transform/document/responses.mjs.map +1 -1
  208. package/dist/application/transform/document/root-type-aliases.cjs +8 -23
  209. package/dist/application/transform/document/root-type-aliases.cjs.map +1 -1
  210. package/dist/application/transform/document/root-type-aliases.mjs +8 -24
  211. package/dist/application/transform/document/root-type-aliases.mjs.map +1 -1
  212. package/dist/application/transform/document/type-resolution.cjs +3 -1
  213. package/dist/application/transform/document/type-resolution.cjs.map +1 -1
  214. package/dist/application/transform/document/type-resolution.mjs +3 -1
  215. package/dist/application/transform/document/type-resolution.mjs.map +1 -1
  216. package/dist/application/transform/document/webhooks.cjs +1 -1
  217. package/dist/application/transform/document/webhooks.cjs.map +1 -1
  218. package/dist/application/transform/document/webhooks.mjs +2 -2
  219. package/dist/application/transform/document/webhooks.mjs.map +1 -1
  220. package/dist/application/transform/footer/document-footer.cjs +10 -2
  221. package/dist/application/transform/footer/document-footer.cjs.map +1 -1
  222. package/dist/application/transform/footer/document-footer.mjs +10 -2
  223. package/dist/application/transform/footer/document-footer.mjs.map +1 -1
  224. package/dist/application/transform/footer/enum-name-claims.cjs +48 -0
  225. package/dist/application/transform/footer/enum-name-claims.cjs.map +1 -0
  226. package/dist/application/transform/footer/enum-name-claims.mjs +46 -0
  227. package/dist/application/transform/footer/enum-name-claims.mjs.map +1 -0
  228. package/dist/application/transform/footer/operation-keys.cjs +23 -0
  229. package/dist/application/transform/footer/operation-keys.cjs.map +1 -0
  230. package/dist/application/transform/footer/operation-keys.mjs +21 -0
  231. package/dist/application/transform/footer/operation-keys.mjs.map +1 -0
  232. package/dist/application/transform/footer/type-evaluation.cjs +4 -4
  233. package/dist/application/transform/footer/type-evaluation.cjs.map +1 -1
  234. package/dist/application/transform/footer/type-evaluation.mjs +4 -4
  235. package/dist/application/transform/footer/type-evaluation.mjs.map +1 -1
  236. package/dist/application/transform/helper-types.cjs +1 -1
  237. package/dist/application/transform/helper-types.cjs.map +1 -1
  238. package/dist/application/transform/helper-types.mjs +1 -1
  239. package/dist/application/transform/helper-types.mjs.map +1 -1
  240. package/dist/application/transform/numbered-names.cjs +9 -0
  241. package/dist/application/transform/numbered-names.cjs.map +1 -1
  242. package/dist/application/transform/numbered-names.mjs +9 -1
  243. package/dist/application/transform/numbered-names.mjs.map +1 -1
  244. package/dist/application/transform/ref-pointer/generated-location.cjs +1 -1
  245. package/dist/application/transform/ref-pointer/generated-location.cjs.map +1 -1
  246. package/dist/application/transform/ref-pointer/generated-location.mjs +2 -2
  247. package/dist/application/transform/ref-pointer/generated-location.mjs.map +1 -1
  248. package/dist/application/transform/ref-pointer/pointer-type.cjs +1 -1
  249. package/dist/application/transform/ref-pointer/pointer-type.cjs.map +1 -1
  250. package/dist/application/transform/ref-pointer/pointer-type.mjs +2 -2
  251. package/dist/application/transform/ref-pointer/pointer-type.mjs.map +1 -1
  252. package/dist/application/transform/ref-type.cjs +2 -1
  253. package/dist/application/transform/ref-type.cjs.map +1 -1
  254. package/dist/application/transform/ref-type.mjs +2 -1
  255. package/dist/application/transform/ref-type.mjs.map +1 -1
  256. package/dist/application/transform/schema/access-flags.cjs +1 -1
  257. package/dist/application/transform/schema/access-flags.cjs.map +1 -1
  258. package/dist/application/transform/schema/access-flags.mjs +2 -2
  259. package/dist/application/transform/schema/access-flags.mjs.map +1 -1
  260. package/dist/application/transform/schema/array-type.cjs +2 -2
  261. package/dist/application/transform/schema/array-type.cjs.map +1 -1
  262. package/dist/application/transform/schema/array-type.mjs +3 -3
  263. package/dist/application/transform/schema/array-type.mjs.map +1 -1
  264. package/dist/application/transform/schema/composition-type.cjs +4 -4
  265. package/dist/application/transform/schema/composition-type.cjs.map +1 -1
  266. package/dist/application/transform/schema/composition-type.mjs +6 -6
  267. package/dist/application/transform/schema/composition-type.mjs.map +1 -1
  268. package/dist/application/transform/schema/enum-rule.cjs +4 -6
  269. package/dist/application/transform/schema/enum-rule.cjs.map +1 -1
  270. package/dist/application/transform/schema/enum-rule.mjs +6 -8
  271. package/dist/application/transform/schema/enum-rule.mjs.map +1 -1
  272. package/dist/application/transform/schema/object-type.cjs +3 -3
  273. package/dist/application/transform/schema/object-type.cjs.map +1 -1
  274. package/dist/application/transform/schema/object-type.mjs +4 -4
  275. package/dist/application/transform/schema/object-type.mjs.map +1 -1
  276. package/dist/application/transform/schema/presence-members.cjs +1 -1
  277. package/dist/application/transform/schema/presence-members.cjs.map +1 -1
  278. package/dist/application/transform/schema/presence-members.mjs +2 -2
  279. package/dist/application/transform/schema/presence-members.mjs.map +1 -1
  280. package/dist/application/transform/schema/ref-siblings.cjs +47 -0
  281. package/dist/application/transform/schema/ref-siblings.cjs.map +1 -0
  282. package/dist/application/transform/schema/ref-siblings.mjs +45 -0
  283. package/dist/application/transform/schema/ref-siblings.mjs.map +1 -0
  284. package/dist/application/transform/schema/required-variants.cjs +2 -2
  285. package/dist/application/transform/schema/required-variants.cjs.map +1 -1
  286. package/dist/application/transform/schema/required-variants.mjs +3 -3
  287. package/dist/application/transform/schema/required-variants.mjs.map +1 -1
  288. package/dist/application/transform/schema/schema-transform.cjs +4 -2
  289. package/dist/application/transform/schema/schema-transform.cjs.map +1 -1
  290. package/dist/application/transform/schema/schema-transform.mjs +4 -2
  291. package/dist/application/transform/schema/schema-transform.mjs.map +1 -1
  292. package/dist/application/transform/schema/unevaluated-properties.cjs +1 -1
  293. package/dist/application/transform/schema/unevaluated-properties.cjs.map +1 -1
  294. package/dist/application/transform/schema/unevaluated-properties.mjs +2 -2
  295. package/dist/application/transform/schema/unevaluated-properties.mjs.map +1 -1
  296. package/dist/application/transform/schema-comment.cjs +6 -2
  297. package/dist/application/transform/schema-comment.cjs.map +1 -1
  298. package/dist/application/transform/schema-comment.mjs +7 -3
  299. package/dist/application/transform/schema-comment.mjs.map +1 -1
  300. package/dist/cli/api-settings.cjs +62 -6
  301. package/dist/cli/api-settings.cjs.map +1 -1
  302. package/dist/cli/api-settings.mjs +60 -7
  303. package/dist/cli/api-settings.mjs.map +1 -1
  304. package/dist/cli/api-writes.cjs +72 -0
  305. package/dist/cli/api-writes.cjs.map +1 -0
  306. package/dist/cli/api-writes.mjs +69 -0
  307. package/dist/cli/api-writes.mjs.map +1 -0
  308. package/dist/cli/cli-errors.cjs +12 -1
  309. package/dist/cli/cli-errors.cjs.map +1 -1
  310. package/dist/cli/cli-errors.mjs +12 -1
  311. package/dist/cli/cli-errors.mjs.map +1 -1
  312. package/dist/cli/cli-output.cjs +106 -1
  313. package/dist/cli/cli-output.cjs.map +1 -1
  314. package/dist/cli/cli-output.mjs +99 -2
  315. package/dist/cli/cli-output.mjs.map +1 -1
  316. package/dist/cli/main.cjs +5 -1
  317. package/dist/cli/main.cjs.map +1 -1
  318. package/dist/cli/main.mjs +6 -2
  319. package/dist/cli/main.mjs.map +1 -1
  320. package/dist/cli/redocly-apis.cjs +82 -36
  321. package/dist/cli/redocly-apis.cjs.map +1 -1
  322. package/dist/cli/redocly-apis.mjs +85 -39
  323. package/dist/cli/redocly-apis.mjs.map +1 -1
  324. package/dist/cli/run-cli.cjs +13 -7
  325. package/dist/cli/run-cli.cjs.map +1 -1
  326. package/dist/cli/run-cli.mjs +14 -8
  327. package/dist/cli/run-cli.mjs.map +1 -1
  328. package/dist/domain/append-all.cjs +10 -0
  329. package/dist/domain/append-all.cjs.map +1 -0
  330. package/dist/domain/append-all.mjs +8 -0
  331. package/dist/domain/append-all.mjs.map +1 -0
  332. package/dist/domain/cause-secrets.cjs +37 -0
  333. package/dist/domain/cause-secrets.cjs.map +1 -0
  334. package/dist/domain/cause-secrets.mjs +35 -0
  335. package/dist/domain/cause-secrets.mjs.map +1 -0
  336. package/dist/domain/deprecations.cjs +11 -0
  337. package/dist/domain/deprecations.cjs.map +1 -0
  338. package/dist/domain/deprecations.mjs +9 -0
  339. package/dist/domain/deprecations.mjs.map +1 -0
  340. package/dist/domain/errors.cjs +9 -3
  341. package/dist/domain/errors.cjs.map +1 -1
  342. package/dist/domain/errors.mjs +9 -3
  343. package/dist/domain/errors.mjs.map +1 -1
  344. package/dist/domain/ir/identifier-text.cjs.map +1 -1
  345. package/dist/domain/ir/identifier-text.mjs +1 -1
  346. package/dist/domain/ir/identifier-text.mjs.map +1 -1
  347. package/dist/domain/ir/ir-shape.cjs +187 -0
  348. package/dist/domain/ir/ir-shape.cjs.map +1 -0
  349. package/dist/domain/ir/ir-shape.mjs +184 -0
  350. package/dist/domain/ir/ir-shape.mjs.map +1 -0
  351. package/dist/domain/ir/newer-identifier-ranges.cjs +182 -29
  352. package/dist/domain/ir/newer-identifier-ranges.cjs.map +1 -1
  353. package/dist/domain/ir/newer-identifier-ranges.mjs +182 -29
  354. package/dist/domain/ir/newer-identifier-ranges.mjs.map +1 -1
  355. package/dist/domain/openapi/alias-expansion.cjs +3 -1
  356. package/dist/domain/openapi/alias-expansion.cjs.map +1 -1
  357. package/dist/domain/openapi/alias-expansion.mjs +3 -1
  358. package/dist/domain/openapi/alias-expansion.mjs.map +1 -1
  359. package/dist/domain/openapi/discriminated-union.cjs +3 -3
  360. package/dist/domain/openapi/discriminated-union.cjs.map +1 -1
  361. package/dist/domain/openapi/discriminated-union.mjs +4 -4
  362. package/dist/domain/openapi/discriminated-union.mjs.map +1 -1
  363. package/dist/domain/openapi/discriminator-conflicts.cjs +10 -6
  364. package/dist/domain/openapi/discriminator-conflicts.cjs.map +1 -1
  365. package/dist/domain/openapi/discriminator-conflicts.mjs +11 -7
  366. package/dist/domain/openapi/discriminator-conflicts.mjs.map +1 -1
  367. package/dist/domain/openapi/json-pointer.cjs +43 -1
  368. package/dist/domain/openapi/json-pointer.cjs.map +1 -1
  369. package/dist/domain/openapi/json-pointer.mjs +40 -2
  370. package/dist/domain/openapi/json-pointer.mjs.map +1 -1
  371. package/dist/domain/openapi/schema-dialect.cjs +15 -0
  372. package/dist/domain/openapi/schema-dialect.cjs.map +1 -0
  373. package/dist/domain/openapi/schema-dialect.mjs +12 -0
  374. package/dist/domain/openapi/schema-dialect.mjs.map +1 -0
  375. package/dist/domain/openapi/unsupported-features.cjs +1 -1
  376. package/dist/domain/openapi/unsupported-features.cjs.map +1 -1
  377. package/dist/domain/openapi/unsupported-features.mjs +2 -2
  378. package/dist/domain/openapi/unsupported-features.mjs.map +1 -1
  379. package/dist/domain/output-fixes.cjs +25 -14
  380. package/dist/domain/output-fixes.cjs.map +1 -1
  381. package/dist/domain/output-fixes.mjs +25 -13
  382. package/dist/domain/output-fixes.mjs.map +1 -1
  383. package/dist/domain/url-secrets.cjs +48 -0
  384. package/dist/domain/url-secrets.cjs.map +1 -0
  385. package/dist/domain/url-secrets.mjs +45 -0
  386. package/dist/domain/url-secrets.mjs.map +1 -0
  387. package/dist/domain/warnings.cjs +0 -1
  388. package/dist/domain/warnings.cjs.map +1 -1
  389. package/dist/domain/warnings.mjs +0 -1
  390. package/dist/domain/warnings.mjs.map +1 -1
  391. package/dist/index.cjs +2 -3
  392. package/dist/index.cjs.map +1 -1
  393. package/dist/index.d.cts +57 -20
  394. package/dist/index.d.mts +57 -20
  395. package/dist/index.d.ts +57 -20
  396. package/dist/index.mjs +3 -2
  397. package/dist/index.mjs.map +1 -1
  398. package/package.json +5 -6
  399. package/src/adapters/node-deprecations/node-deprecations.ts +14 -0
  400. package/src/adapters/node-file-system/file-claims.ts +138 -0
  401. package/src/adapters/node-file-system/file-identity.ts +137 -0
  402. package/src/adapters/node-file-system/node-file-system.ts +145 -18
  403. package/src/adapters/redocly-loader/bundled-mapping-copies.ts +95 -0
  404. package/src/adapters/redocly-loader/bundled-ref-repair.ts +2 -2
  405. package/src/adapters/redocly-loader/loaded-documents.ts +46 -0
  406. package/src/adapters/redocly-loader/redocly-schema-loader.ts +18 -24
  407. package/src/adapters/redocly-loader/ref-access.ts +37 -3
  408. package/src/adapters/redocly-loader/ref-holders.ts +3 -3
  409. package/src/adapters/redocly-loader/remote-body-limit.ts +66 -0
  410. package/src/adapters/redocly-loader/remote-fetch.ts +74 -11
  411. package/src/adapters/redocly-loader/remote-node-limit.ts +62 -0
  412. package/src/adapters/redocly-loader/schema-load-errors.ts +52 -13
  413. package/src/adapters/redocly-loader/schema-source.ts +20 -8
  414. package/src/adapters/redocly-loader/unsupported-keys.ts +3 -7
  415. package/src/adapters/terminal-logger/terminal-logger.ts +10 -5
  416. package/src/api/default-ports.ts +40 -4
  417. package/src/api/discriminator-conflict-warnings.ts +2 -2
  418. package/src/api/discriminator-enum-parent.ts +3 -3
  419. package/src/api/discriminator-other-owners.ts +5 -3
  420. package/src/api/discriminator-patch.ts +9 -6
  421. package/src/api/discriminator-scan.ts +19 -11
  422. package/src/api/document-run.ts +9 -3
  423. package/src/api/legacy-callback-warning.ts +13 -6
  424. package/src/api/legacy-utils.ts +5 -1
  425. package/src/api/openapi-ts.ts +26 -7
  426. package/src/api/run-context.ts +6 -0
  427. package/src/api/schema-callbacks.ts +60 -17
  428. package/src/api/string-to-ast.ts +11 -15
  429. package/src/api/transform-context.ts +7 -3
  430. package/src/api/transform-schema.ts +67 -15
  431. package/src/application/ports/deprecation-reporter.ts +9 -0
  432. package/src/application/ports/file-system.ts +39 -0
  433. package/src/application/ports/schema-loader.ts +11 -1
  434. package/src/application/print/text-writer.ts +10 -3
  435. package/src/application/stack-overflow.ts +9 -5
  436. package/src/application/transform/document/components.ts +4 -4
  437. package/src/application/transform/document/declared-type-names.ts +36 -0
  438. package/src/application/transform/document/defs-root.ts +2 -2
  439. package/src/application/transform/document/document.ts +4 -3
  440. package/src/application/transform/document/enum-names-given-back.ts +91 -0
  441. package/src/application/transform/document/global-type-references.ts +1 -1
  442. package/src/application/transform/document/media-type.ts +4 -3
  443. package/src/application/transform/document/operation-keys-written.ts +27 -0
  444. package/src/application/transform/document/operation.ts +2 -2
  445. package/src/application/transform/document/parameter-entries.ts +70 -0
  446. package/src/application/transform/document/parameter.ts +21 -9
  447. package/src/application/transform/document/parameters.ts +13 -58
  448. package/src/application/transform/document/path-item.ts +13 -31
  449. package/src/application/transform/document/paths-enum.ts +1 -1
  450. package/src/application/transform/document/paths.ts +8 -4
  451. package/src/application/transform/document/referenced-parameter.ts +146 -0
  452. package/src/application/transform/document/request-body.ts +2 -2
  453. package/src/application/transform/document/response.ts +3 -3
  454. package/src/application/transform/document/responses.ts +2 -2
  455. package/src/application/transform/document/root-type-aliases.ts +17 -38
  456. package/src/application/transform/document/type-resolution.ts +2 -1
  457. package/src/application/transform/document/webhooks.ts +2 -2
  458. package/src/application/transform/footer/document-footer.ts +18 -1
  459. package/src/application/transform/footer/enum-name-claims.ts +62 -0
  460. package/src/application/transform/footer/operation-keys.ts +28 -0
  461. package/src/application/transform/footer/type-evaluation.ts +4 -4
  462. package/src/application/transform/helper-types.ts +6 -5
  463. package/src/application/transform/numbered-names.ts +15 -0
  464. package/src/application/transform/ref-pointer/generated-location.ts +2 -2
  465. package/src/application/transform/ref-pointer/pointer-type.ts +2 -4
  466. package/src/application/transform/ref-type.ts +2 -1
  467. package/src/application/transform/schema/access-flags.ts +2 -2
  468. package/src/application/transform/schema/array-type.ts +3 -5
  469. package/src/application/transform/schema/composition-type.ts +6 -6
  470. package/src/application/transform/schema/enum-rule.ts +10 -8
  471. package/src/application/transform/schema/object-type.ts +4 -4
  472. package/src/application/transform/schema/presence-members.ts +2 -2
  473. package/src/application/transform/schema/ref-siblings.ts +76 -0
  474. package/src/application/transform/schema/required-variants.ts +3 -3
  475. package/src/application/transform/schema/schema-context.ts +3 -0
  476. package/src/application/transform/schema/schema-transform.ts +4 -2
  477. package/src/application/transform/schema/unevaluated-properties.ts +2 -2
  478. package/src/application/transform/schema-comment.ts +7 -3
  479. package/src/application/transform/transform-context.ts +5 -0
  480. package/src/cli/api-settings.ts +82 -7
  481. package/src/cli/api-writes.ts +117 -0
  482. package/src/cli/cli-dependencies.ts +21 -4
  483. package/src/cli/cli-errors.ts +20 -1
  484. package/src/cli/cli-output.ts +186 -7
  485. package/src/cli/main.ts +6 -3
  486. package/src/cli/redocly-apis.ts +153 -48
  487. package/src/cli/run-cli.ts +37 -8
  488. package/src/domain/append-all.ts +10 -0
  489. package/src/domain/cause-secrets.ts +52 -0
  490. package/src/domain/deprecations.ts +15 -0
  491. package/src/domain/errors.ts +22 -7
  492. package/src/domain/ir/identifier-text.ts +6 -5
  493. package/src/domain/ir/ir-shape.ts +299 -0
  494. package/src/domain/ir/newer-identifier-ranges.ts +183 -30
  495. package/src/domain/openapi/alias-expansion.ts +4 -1
  496. package/src/domain/openapi/discriminated-union.ts +6 -4
  497. package/src/domain/openapi/discriminator-conflicts.ts +21 -7
  498. package/src/domain/openapi/document-object.ts +2 -0
  499. package/src/domain/openapi/json-pointer.ts +96 -7
  500. package/src/domain/openapi/schema-dialect.ts +22 -0
  501. package/src/domain/openapi/unsupported-features.ts +2 -2
  502. package/src/domain/output-fixes.ts +37 -18
  503. package/src/domain/url-secrets.ts +72 -0
  504. package/src/domain/warnings.ts +0 -1
  505. package/src/index.ts +2 -6
  506. package/src/types/generator-options.ts +1 -1
  507. package/dist/cli/main.d.cts +0 -2
  508. package/dist/cli/main.d.mts +0 -2
  509. package/dist/cli/main.d.ts +0 -2
  510. package/dist/domain/url-credentials.cjs +0 -10
  511. package/dist/domain/url-credentials.cjs.map +0 -1
  512. package/dist/domain/url-credentials.mjs +0 -8
  513. package/dist/domain/url-credentials.mjs.map +0 -1
  514. package/src/domain/url-credentials.ts +0 -18
package/CHANGELOG.md ADDED
@@ -0,0 +1,1831 @@
1
+ # openapi-typesafe
2
+
3
+ This package is a fork of `openapi-typescript`. The entries above `7.13.0` are releases of openapi-typesafe; `7.13.0` and the entries below it are the upstream history up to the fork point (upstream commit `d46a319a`), with `openapi-typescript` versions.
4
+
5
+ ## 1.0.0-rc.4
6
+
7
+ ### Minor Changes
8
+
9
+ - [#49](https://github.com/openapi-typesafe/openapi-typesafe/pull/49) [`e12bc23`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e12bc2323d5e61a2755af13ed9939db589c18151) Thanks [@fedorello](https://github.com/fedorello)! - An `--output` or `x-openapi-ts.output` that cannot be a file fails with the new error code
10
+ `CLI_OUTPUT_INVALID` (exit code `2`) before anything is generated: a URL of another scheme
11
+ (`-o https://…`), a path that ends with a separator (`-o gen/`) or with `.` or `..`
12
+ (`-o gen/.`), or an existing directory. openapi-typescript failed on them with `EISDIR` or a
13
+ stack trace, or wrote a file named like the directory. An output that cannot be written (a file name too long
14
+ for the file system) leaves no new directories behind; openapi-typescript left them.
15
+
16
+ - [#39](https://github.com/openapi-typesafe/openapi-typesafe/pull/39) [`a4a1104`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a4a110406891ecd37e39b23f01838f74233adca1) Thanks [@fedorello](https://github.com/fedorello)! - The CLI no longer overwrites a file it should not. Both checks follow symlinks and hard links,
17
+ and the letter case of a file system that ignores case (asked of the file system, not assumed from
18
+ the OS), also for outputs that do not exist yet. They run before anything is written and fail with
19
+ exit code `2`. openapi-typescript checked neither:
20
+ - An `--output`, or an `x-openapi-ts.output` in `redocly.yaml`, that names a file the CLI
21
+ reads fails with the new error code `CLI_OUTPUT_IS_INPUT`: the schema, a local file one of
22
+ its `$ref`s loads, or `redocly.yaml`. With several APIs, every API is read before any output
23
+ is written, and no output may be a file that any API reads. openapi-typescript replaced the
24
+ file with the types.
25
+ - APIs in `redocly.yaml` whose outputs are the same file all fail with the new error code
26
+ `CLI_OUTPUT_DUPLICATE`; the other APIs are still generated. openapi-typescript let the API
27
+ that finished last win. Before writing, the CLI creates every missing output, empty, and asks
28
+ the file system whether two of them are one file, so names that differ only in Unicode
29
+ normalization or case folding (`café.ts` in NFC and NFD, `straße.ts` and `STRASSE.ts`) or a
30
+ path through a link to a missing directory are caught too. A run that fails this way leaves no
31
+ new file or directory.
32
+
33
+ - [#50](https://github.com/openapi-typesafe/openapi-typesafe/pull/50) [`90e2668`](https://github.com/openapi-typesafe/openapi-typesafe/commit/90e2668f1ac2fe7093fa9bd1858ac1e1aceb8184) Thanks [@fedorello](https://github.com/fedorello)! - Remote documents have size limits. The loader reads each body as a stream and counts the bytes
34
+ after `gzip`, `deflate` or `br` is decoded, so a compressed "zip bomb" behind a remote `$ref` no
35
+ longer fills the memory: 1.6 MB on the wire became 1.6 GB before. A body larger than 128 MiB, or
36
+ remote documents larger than 256 MiB together for one schema, fail with `SCHEMA_REF_FORBIDDEN` and
37
+ the new reasons `remote-document-too-large` and `remote-documents-too-large`. The parser also
38
+ counts the nodes it builds: remote documents that parse into more than 8,000,000 nodes together
39
+ fail with the new reason `remote-documents-too-many-nodes`, so a dense body such as
40
+ `[{},{},…]` within the byte limits no longer ends the process with an out-of-memory crash.
41
+ The largest real document we know is 71 MiB and 2.65 million nodes. A `customFetch` in the
42
+ Redocly config is limited too.
43
+
44
+ ### Patch Changes
45
+
46
+ - [#53](https://github.com/openapi-typesafe/openapi-typesafe/pull/53) [`5e1d76a`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5e1d76a67d8b64aaa16683d7caed8dfdc9cae297) Thanks [@fedorello](https://github.com/fedorello)! - A key that contains `#/`, such as a path `/items/#/%zz`, a property `a#/b` or a parameter name,
47
+ no longer makes the generator throw `URIError: URI malformed`. openapi-typescript read such a key
48
+ as a `$ref`; now it is one segment of the pointers the generator builds, so an `--enum-values`
49
+ array of such a key points at its own node. The exported `createRef` keeps the old behaviour. The
50
+ new enum names of such keys are listed under Major Changes.
51
+
52
+ These pointers, and the ones in the generator's errors, escape `#` as `%23` and `%` as `%25`
53
+ (RFC 6901), so a key like `a#` no longer cuts a pointer short. A discriminator `mapping` to a
54
+ schema whose name has a `%`, such as `50%`, no longer throws `URIError` either.
55
+
56
+ - [#49](https://github.com/openapi-typesafe/openapi-typesafe/pull/49) [`e12bc23`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e12bc2323d5e61a2755af13ed9939db589c18151) Thanks [@fedorello](https://github.com/fedorello)! - `silent: true` in the Node API also hides the problem lines of a document that fails to load,
57
+ such as `Can't resolve $ref`; the rejected `SCHEMA_INVALID` error lists them in
58
+ `details.problems`. openapi-typescript printed them to stderr even with `silent`.
59
+
60
+ ## 1.0.0-rc.3
61
+
62
+ ### Patch Changes
63
+
64
+ - [#30](https://github.com/openapi-typesafe/openapi-typesafe/pull/30) [`7650cd9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7650cd982433fc2c36acc7a4092fe49456e81cdf) Thanks [@fedorello](https://github.com/fedorello)! - Every deprecation of something 2.0 removes is now a Node.js `DeprecationWarning` with an
65
+ `OPENAPI_TYPESAFE_DEP_*` code, shown once per process. The TypeScript-node forms of `transform`,
66
+ `postTransform` and `transformProperty` used to print a warning line with the code
67
+ `LEGACY_CALLBACK_DEPRECATED` through the generator's logger; they now emit
68
+ `OPENAPI_TYPESAFE_DEP_TS_TRANSFORM`, `OPENAPI_TYPESAFE_DEP_TS_POST_TRANSFORM` and
69
+ `OPENAPI_TYPESAFE_DEP_TS_TRANSFORM_PROPERTY`, as `stringToAST()` emits
70
+ `OPENAPI_TYPESAFE_DEP_STRING_TO_AST`. `node --no-deprecation` hides them, `--throw-deprecation`
71
+ makes them errors, and `silent` no longer hides them. The new `DEPRECATION_CODES` export lists the
72
+ codes; `STRING_TO_AST_DEPRECATION_CODE` and the `LEGACY_CALLBACK_DEPRECATED` warning code, which
73
+ only rc versions had, are removed.
74
+
75
+ - [#30](https://github.com/openapi-typesafe/openapi-typesafe/pull/30) [`7650cd9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7650cd982433fc2c36acc7a4092fe49456e81cdf) Thanks [@fedorello](https://github.com/fedorello)! - The types generated for the OpenAPI 3.2 additions (`query` operations, `additionalOperations`,
76
+ `itemSchema`, `in: querystring`, `components.mediaTypes`) are experimental in 1.x: a minor release
77
+ may change their shape, for example to match openapi-typescript once it supports 3.2, and its
78
+ changelog says so. The output of documents without these keys, `client.QUERY()` and the `"query"`
79
+ member of `HttpMethod` keep the full semver promise.
80
+
81
+ - [#30](https://github.com/openapi-typesafe/openapi-typesafe/pull/30) [`7650cd9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7650cd982433fc2c36acc7a4092fe49456e81cdf) Thanks [@fedorello](https://github.com/fedorello)! - The fix names are exported as the `OutputFix` union, the `OUTPUT_FIXES` list and `OutputFixName`
82
+ (a fix name or `"all"`), as ADR-021 describes. The `OutputFix` object (`OutputFix.ALLOF_REQUIRED`)
83
+ and the `ALL_OUTPUT_FIXES` constant, which only rc versions had, are removed: write the fix names
84
+ as strings, for example `fix: ["allof-required"]` or `fix: ["all"]`.
85
+
86
+ - [#29](https://github.com/openapi-typesafe/openapi-typesafe/pull/29) [`a74808d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a74808dd891f435e860ffabb24947b75238e9d40) Thanks [@fedorello](https://github.com/fedorello)! - The `@redocly/openapi-core` range is `^1.34.22` again. In 1.0.0-rc.2 it was `^1.34.23`, which a
87
+ package manager with a minimum release age (for example bun's `minimum-release-age` of 7 days)
88
+ refused while that version was new.
89
+
90
+ ## 1.0.0-rc.2
91
+
92
+ ### Minor Changes
93
+
94
+ - [#15](https://github.com/openapi-typesafe/openapi-typesafe/pull/15) [`5837bac`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5837baca3bbcd58bd132622d9a4723e97bc5a9bc) Thanks [@fedorello](https://github.com/fedorello)! - Every warning ends with a stable code (exported as `WARNING_CODES`); lint warnings name their
95
+ Redocly rule. New warnings, which change neither output nor exit code: a repeated `operationId`,
96
+ paths that differ only in parameter names, a discriminator value its member does not allow, an
97
+ unknown `x-openapi-ts` key, and an unknown CLI flag.
98
+
99
+ ### Patch Changes
100
+
101
+ - [#16](https://github.com/openapi-typesafe/openapi-typesafe/pull/16) [`cd79dbd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cd79dbd39d33dc913ec101a4c46560dff801da4e) Thanks [@fedorello](https://github.com/fedorello)! - The type declarations keep their JSDoc, so editors show descriptions and mark deprecated exports.
102
+
103
+ - [#15](https://github.com/openapi-typesafe/openapi-typesafe/pull/15) [`5837bac`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5837baca3bbcd58bd132622d9a4723e97bc5a9bc) Thanks [@fedorello](https://github.com/fedorello)! - The declarations type-check with TypeScript 7 and `skipLibCheck: false`.
104
+
105
+ - [#23](https://github.com/openapi-typesafe/openapi-typesafe/pull/23) [`54c59f2`](https://github.com/openapi-typesafe/openapi-typesafe/commit/54c59f233907bf75a61419b1ff933094e790b852) Thanks [@fedorello](https://github.com/fedorello)! - The deprecated `resolveRef` takes the document as `unknown` instead of `any`, so any value is still
106
+ accepted. It now returns the node when a `$ref` that is not a string is found, instead of failing.
107
+
108
+ ## 1.0.0-rc.1
109
+
110
+ ### Patch Changes
111
+
112
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New output fix `allof-discriminated-union` (`--fix allof-discriminated-union`, ADR-021): a schema
113
+ that `allOf`s a discriminated `oneOf` or `anyOf` it is not a member of is typed as that union.
114
+ Before, it got `Omit<Union, "pet_type">`, which keeps only the keys every member has, and a value
115
+ of its own schema name (`{ pet_type: "B" } & …`) that no member allows, so
116
+ `B: { pet_type: "B" } & Omit<components["schemas"]["A"], "pet_type">` is now
117
+ `B: components["schemas"]["A"]` (openapi-typescript
118
+ [#1464](https://github.com/openapi-ts/openapi-typescript/issues/1464),
119
+ [#1690](https://github.com/openapi-ts/openapi-typescript/issues/1690)). A schema that the union's
120
+ `mapping` names is a member and stays as it was. A schema that only reuses the union gets no
121
+ `DISCRIMINATOR_VALUE_NOT_ALLOWED` warning for a value it does not get. Without the fix the output
122
+ does not change; `--fix all` now includes it.
123
+
124
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - The CLI with a `redocly.yaml` or a `.redocly.lint-ignore.yaml` that cannot be parsed printed
125
+ "Unexpected error" with a stack trace and exited with 70, the code for a bug. It now prints one
126
+ line that names the file and the reason, with the new error code `CLI_CONFIG_INVALID`, and exits
127
+ with 2, the code for a wrong Redocly config.
128
+
129
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - The CLI without a schema path or URL, without `apis` in `redocly.yaml` and with nothing piped into
130
+ stdin (stdin is a terminal) now fails at once with exit code `2` and `CLI_INPUT_MISSING`. Before,
131
+ it waited for a schema typed into the terminal with no prompt, which looked like a hang
132
+ (openapi-typescript [#1905](https://github.com/openapi-ts/openapi-typescript/issues/1905)). A
133
+ schema piped into stdin is read as before.
134
+
135
+ - [#8](https://github.com/openapi-typesafe/openapi-typesafe/pull/8) [`ff6b717`](https://github.com/openapi-typesafe/openapi-typesafe/commit/ff6b717836b81e929295a4db4e731221e17322ac) Thanks [@fedorello](https://github.com/fedorello)! - The CLI reads a path as a path: a `#`, `?` or `%` in the schema path, in `--output`, `--redocly`,
136
+ `--local-ref-root` or in a `redocly.yaml` `root` or `output` is part of the file name. Before, the
137
+ path was parsed as a URL, so `specs/#v2/api.yaml` read `specs/` and `a%20b.yaml` read `a b.yaml`.
138
+ A one-letter scheme is a Windows drive, so `C:\specs\api.yaml` is a path. URLs (`https:`, `file:`)
139
+ work as before.
140
+
141
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - A discriminated `oneOf` or `anyOf` whose members `allOf` it now compiles (openapi-typescript
142
+ [#1665](https://github.com/openapi-ts/openapi-typescript/issues/1665)). Each member was typed as
143
+ `Omit<Union, "type"> & …`, and the union contains the member, so TypeScript failed with "is
144
+ referenced directly or indirectly in its own type annotation" (TS2502). A member now gets the
145
+ union's own properties instead (`{ id?: string } & { age?: number } & { type: "CAT" }`), or none
146
+ when the union has only the discriminator property. A union that inherits its discriminator
147
+ through `allOf` gets no value of its own (`kind: "Pet"`), which made every member `never`. On by
148
+ default: only output that did not
149
+ compile changes.
150
+
151
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - A schema that inherits a discriminator through `allOf` and declares the discriminator property in
152
+ its own `properties` got the property twice in one object type (`class: "Child"; class?:
153
+ "Child";`), and the output did not compile (TS2300). The schema's own declaration is now kept,
154
+ required as a discriminator property must be. Output that compiled stays the same.
155
+
156
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New output fix `discriminator-member-required` (`--fix discriminator-member-required`, ADR-021):
157
+ `required` next to an `allOf` `$ref` keeps `WithRequired` when the target is also a member of a
158
+ discriminated `oneOf`. Before, a discriminator elsewhere in the document dropped it, so
159
+ `Cat: WithRequired<components["schemas"]["CatProps"], "kittens">` became
160
+ `Cat: components["schemas"]["CatProps"]` and `kittens` stayed optional (openapi-typescript
161
+ [#2162](https://github.com/openapi-ts/openapi-typescript/issues/2162)). The discriminator property
162
+ itself is required in the target already and is not repeated. Without the fix the output does not
163
+ change; `--fix all` now includes it.
164
+
165
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - A discriminator member whose value (its mapping key, or its schema name without one) its own
166
+ property `enum` or `const` does not allow now gets a warning that names the Discriminator Object
167
+ rule and the mapping entry to add (`DISCRIMINATOR_VALUE_NOT_ALLOWED`). No value of such a schema matches the discriminator. A member that inherits
168
+ the discriminator through an `allOf` chain (`Lion` of `Cat` of `Pet`) is checked too.
169
+
170
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - The output fix `discriminator-values` (`--fix discriminator-values`, ADR-021, ADR-024) now
171
+ corrects every case of the value a discriminator member gets. Projects that list it in rc.0 get
172
+ new output:
173
+ - A schema that defines a discriminator with a `mapping` and also `allOf`s another discriminator
174
+ owner keeps its own discriminator. Before, the inherited one replaced it, so the schemas listed
175
+ after the owner got their schema name instead of the mapped value (`contentType:
176
+ "JDocumentContentModel"` instead of `"jDocument"`), and the output depended on the order of the
177
+ schemas (openapi-typescript [#2200](https://github.com/openapi-ts/openapi-typescript/issues/2200)).
178
+ A discriminator of another property that the owner inherits still gives its members a value:
179
+ `Video` of `Content` (which owns `subtype`) of `Element` (which owns `contentType`) gets both.
180
+ Its value of the other property is its own (`contentType: "Video"` when no mapping names it),
181
+ also when `Element`'s mapping names `Content`: `Content`'s `"content"` is left out of `Video`.
182
+ - A member that already requires the property with exactly its values (`enum: [agent]` or
183
+ `const: agent`) gets no second, added property: `{ type: "agent" }`, not
184
+ `{ type: "agent" } & { type: "agent" }`
185
+ ([#2124](https://github.com/openapi-ts/openapi-typescript/issues/2124)).
186
+ - With `--enum`, when the owner's property is an enum (`petType: { $ref: PetType }`), a member's
187
+ value is a member of that enum, `petType: PetType.Cat`, with or without a mapping. Before, each
188
+ member declared an enum of its own (`CatPetType`) or got the string `"Cat"`, and neither is
189
+ assignable to `PetType`, so a `Cat` was not a `Pet`
190
+ ([#1700](https://github.com/openapi-ts/openapi-typescript/issues/1700)). A value from a
191
+ discriminator that declares no such property (a `oneOf` with a `mapping`) is a member of the
192
+ enum the member inherits. With `--dedupe-enums`, a shared enum keeps the name it has without
193
+ the fix (`OtherK`, not the owner's `PetPetType`).
194
+
195
+ Without the fix the output does not change; `--fix all` includes it.
196
+
197
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--enum`: two enums that got one name, such as those of a property and an inline `allOf` item of
198
+ one schema, were declared twice with the same member names, and the output did not compile
199
+ (TS2300). TypeScript merges the declarations, so a later one now leaves out the members an earlier
200
+ one has, a member whose name an earlier one gives another value gets a number (`a_b_2`), and a
201
+ declaration with nothing new is left out. Output that compiled stays the same.
202
+
203
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--enum-values` declares each values array once. A schema typed twice at the same place, such as
204
+ two `prefixItems` entries with the same enum, declared the same `export const …Values` twice, and
205
+ the file failed with "Cannot redeclare block-scoped variable" (TS2451). Output that compiled
206
+ before does not change.
207
+
208
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--enum-values` arrays whose type, the location of their schema in the generated types, cannot
209
+ hold their values are typed by their own values (`ReadonlyArray<"a" | "b">`), so the output
210
+ compiles: a schema under `definitions` or an `allOf` member, a property of a schema whose type is
211
+ `unknown`, an `anyOf` array member next to a non-array one, an empty enum (`readonly never[]`), a
212
+ property `--read-write-markers` wraps in `$Read<T>` or `$Write<T>`, or a schema that contradicts
213
+ itself (an `allOf` of different enums, a discriminator value its enum does not list). The last
214
+ case also prints a warning (`ENUM_VALUES_EXCLUDED`). Arrays whose type compiled stay the same
215
+ (ADR-027).
216
+
217
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--enum-values`: the type of a values array for an enum under a `oneOf`/`anyOf` variant narrows
218
+ the union with `Extract<T, { name: unknown }>`. A property name that is not an identifier, such as
219
+ `content-type`, was written without quotes there, and the output had a syntax error. It is now
220
+ quoted. Output that compiled stays the same.
221
+
222
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--enum-values`: two different arrays that got one name, such as those of `Discount/type` and
223
+ `discount/type`, or of a property and an inline `allOf` item of one schema, declared one `const`
224
+ twice, and the output did not compile (TS2451). The later array now gets a number,
225
+ `discountTypeValues_2`. Output that compiled stays the same.
226
+
227
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--enum-values`: the values array of an enum in a path item parameter (`paths`, `webhooks`,
228
+ `components.pathItems`) was typed as `paths["/a"]["parameters"]["parameters"]["path"]["id"]`, which
229
+ does not exist, and the output did not compile (TS2339). It now indexes `parameters` once. The
230
+ array names and output that compiled stay the same.
231
+
232
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `anyof-oneof-descriptions` (`--fix anyof-oneof-descriptions`): the JSDoc of a
233
+ property or schema lists the `description` of each `anyOf` and `oneOf` member, which was dropped
234
+ (openapi-typescript [#2142](https://github.com/openapi-typesafe/openapi-typesafe/issues/2142)).
235
+
236
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `anyof-oneof-required` (`--fix anyof-oneof-required`): an `anyOf` or `oneOf` whose
237
+ variants have only `required` keys of the sibling `properties` gives the parent with each variant's
238
+ keys required (`WithRequired<Props, "a"> | WithRequired<Props, "b">`) instead of `Props | unknown`,
239
+ which is `unknown`. A key whose property `--exclude-deprecated` leaves out keeps the old output.
240
+ With a `type` list (`[object, "null"]`) only the `object` member gets the keys.
241
+
242
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `dedupe-enum-names` (`--enum --dedupe-enums --fix dedupe-enum-names`): a shared
243
+ enum is named by a rule that does not depend on the document order (its component schema, else the
244
+ shortest name, else code-unit order), so adding a schema no longer renames it
245
+ (openapi-typescript [#1683](https://github.com/openapi-typesafe/openapi-typesafe/issues/1683)).
246
+
247
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `exploded-query-objects` (`--fix exploded-query-objects`, or `fix:
248
+ ["exploded-query-objects"]`): a query parameter with an object schema and the default `style: form`,
249
+ `explode: true` is sent as its own keys (`?page=1&size=10`), so its properties become keys of
250
+ `query` instead of one key named after the parameter (openapi-typescript [#2361](https://github.com/openapi-typesafe/openapi-typesafe/issues/2361)). The default
251
+ `querySerializer` of `openapi-typesafe-fetch` already sends this format.
252
+
253
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `nullable-enums` (`--enum --fix nullable-enums`): an enum that lists `null` becomes a
254
+ TypeScript enum of its other values, typed `E | null` where the schema allows `null`, instead of
255
+ staying a union (openapi-typescript [#1872](https://github.com/openapi-typesafe/openapi-typesafe/issues/1872)).
256
+
257
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `prefix-items` (`--fix prefix-items`): a `prefixItems` tuple follows JSON Schema
258
+ 2020-12. It is open unless `items` or `unevaluatedItems` is `false`, further items get the `items`
259
+ type, and elements after `minItems` are optional (openapi-typescript [#1892](https://github.com/openapi-typesafe/openapi-typesafe/issues/1892)).
260
+
261
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - New opt-in fix `read-write-refs` (`--fix read-write-refs`): `readOnly` and `writeOnly` of a schema
262
+ that a property references with `$ref` or `allOf` make the property `readonly` and count for
263
+ `--read-write-markers`, as in OpenAPI 3.0 and 3.1 (openapi-typescript [#1938](https://github.com/openapi-typesafe/openapi-typesafe/issues/1938)).
264
+
265
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - Paths that differ only in their parameter names, such as `/users/{id}` and `/users/{name}`, now
266
+ get a warning, `PATH_TEMPLATES_IDENTICAL`: the OpenAPI Paths Object forbids them. With
267
+ `--path-params-as-types` they share one key type, and when their path items had the same type the
268
+ output repeated the index signature and did not compile (TS2374); each of them is now in an object
269
+ of its own in the `paths` intersection, as paths with different types already were. Warnings about
270
+ the document now end with a code, as errors do: the `in: querystring` warning ends with
271
+ `(QUERYSTRING_NEXT_TO_QUERY)`.
272
+
273
+ - [#6](https://github.com/openapi-typesafe/openapi-typesafe/pull/6) [`19c5d85`](https://github.com/openapi-typesafe/openapi-typesafe/commit/19c5d85bc6bdc77f7f7165067bf479aba99d32fb) Thanks [@fedorello](https://github.com/fedorello)! - Relative `$ref`s of a string, object, buffer or stream source (and of a schema read from stdin) now
274
+ resolve in `cwd`. openapi-typescript 7.13 and 1.0.0-rc.0 read them from the parent of `cwd`. A
275
+ `cwd` path with `#` or `%` works, and a `cwd` URL without a trailing slash is a directory. A setup
276
+ that kept the shared files one level up must now pass that directory as `cwd` (ADR-023).
277
+
278
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - Lint problems listed in `.redocly.lint-ignore.yaml` no longer fail the run: they are skipped, as
279
+ `redocly lint` skips them (openapi-typescript
280
+ [#2189](https://github.com/openapi-ts/openapi-typescript/issues/2189)). Before, an ignored error
281
+ still stopped the generation with `SCHEMA_INVALID`.
282
+
283
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: a path whose response is an item of another path's array response
284
+ (`$ref: "#/paths/~1a/get/responses/200/content/application~1json/schema/items"`, written as
285
+ `...["application/json"][number]`) stayed in the `paths` interface under a template that covers
286
+ it, and the output did not compile (TS2413). The overlap check now reads `T[number]` of an array
287
+ as its element, so it sees that an item is no array and moves the template, as rc.0 did.
288
+
289
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: a `boolean` response under a path that a template with a
290
+ `true | false` response also matches (`enum: [true, false]`) moved the template into a `paths`
291
+ intersection, although TypeScript accepts `boolean` there. The overlap check now reads `boolean`
292
+ as `true | false` against a union, and the output is the same as openapi-typescript 7.13 gives.
293
+
294
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - With `--path-params-as-types`, output where a template also matches a path whose type differs in
295
+ a union, an array item, a tuple or a property type other than an object compiles. It gave TS2413
296
+ for 66 documents of the APIs.guru corpus, Magento and Microsoft Graph among them (upstream [#1752](https://github.com/openapi-typesafe/openapi-typesafe/issues/1752)):
297
+ the overlap check read only methods, parameter locations and required properties. It now compares
298
+ the types the way TypeScript does and writes such a template in an object of its own. Output that
299
+ compiled is unchanged.
300
+
301
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: a template such as `` `/${string}/${number}` `` next to `/a/b/{n}` was
302
+ moved into a `paths` intersection, although that output compiles. The overlap check matched the
303
+ keys by trying every split of the text; TypeScript matches each text of the template at its first
304
+ occurrence and never checks `` `/a/b/${number}` `` against that template. The check now follows
305
+ TypeScript's matching only, so the output is the same as openapi-typescript 7.13 gives.
306
+ A template of only `${boolean}` placeholders, which is no index signature (TS1337), no longer
307
+ moves another template either.
308
+
309
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types` is fast on large documents again. The overlap check compared every pair of
310
+ paths, which took over four minutes for Microsoft Graph beta (about 10 000 paths); it now compares
311
+ a template only with the paths that start with its first text, and takes seconds.
312
+
313
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: output that compiled could still change. A template such as
314
+ `` `/a/${string}` `` that also matches `/a/{id}/b` was moved into a `paths` intersection whenever
315
+ the overlap check could not read a type of the covered path, such as `Record<string, never>` for
316
+ an empty object schema, although TypeScript accepts it. The check now moves a template only where
317
+ the covered type surely does not fit; where it cannot tell, the output is the same as
318
+ openapi-typescript 7.13 gives, `export interface paths` included.
319
+
320
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types` with a path parameter named `number`, `string` or `boolean`, such as
321
+ `/invoices/{id}/lines/{number}`, now gives the same key as openapi-typescript 7.13,
322
+ `` `/invoices/$${number}/lines/{number}` ``: the original replaces the first `{number}` in the
323
+ key, which is in the placeholder of `{id}`. The rc gave every parameter its own placeholder; that
324
+ key is now the new opt-in fix `path-param-type-names` (`--fix=path-param-type-names`), since both
325
+ outputs compile.
326
+
327
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: nested paths such as `/cases/{id}` and `/cases/{id}/summary`, whose
328
+ operations differ only in a referenced response schema, gave output that did not compile (TS2413,
329
+ openapi-typescript [#1752](https://github.com/openapi-typesafe/openapi-typesafe/issues/1752)). The overlap check now reads the `operations` and `components` types the
330
+ paths reference, so such a template gets its own object in the `paths` intersection. Output that
331
+ compiled stays byte-identical. This fix is on by default.
332
+
333
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types` with `--fix=prefix-items`: a template that also matches a path whose
334
+ response is an open `prefixItems` tuple, such as `[string?, ...string[]]`, under a `string[]`
335
+ response gave output that did not compile (TS2413). The overlap check took the optional element
336
+ for a `string`; it may be `undefined`, so the template now gets an object of its own.
337
+
338
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--binary-as-blob` with `--root-types --root-types-no-schema-prefix`: a schema named `Blob` got
339
+ the alias `Blob`, which hid the global type, so every binary body and response silently had the
340
+ type of that schema. Its alias is now `Blob_2`, as a schema named `Record` already gets
341
+ `Record_2`.
342
+
343
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - `--root-types --root-types-no-schema-prefix`: a schema named after a TypeScript global type that
344
+ the output uses, such as `Record`, got an alias of that name (`export type Record = …`). It shadowed
345
+ the global, and every `Record<string, never>` of the output failed to compile (TS2315). The alias is
346
+ now numbered like other root type conflicts (`Record_2`). An alias of a global name that the output
347
+ does not use, and output that compiled, stay the same.
348
+
349
+ - [#11](https://github.com/openapi-typesafe/openapi-typesafe/pull/11) [`578bd5d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/578bd5df6e6937cc3a8870a78ff84bfa6837f0b7) Thanks [@fedorello](https://github.com/fedorello)! - `--fix=root-type-numbering`: with `--root-types --root-types-no-schema-prefix`, schemas named
350
+ `record` and `Record` gave `Record_2` to `record`, although without the fix `Record_2` is the alias
351
+ of `Record` (the name `Record` itself shadows the global type the output uses). The earlier schemas
352
+ are now numbered after the shared name got its own, so `Record_2` keeps its schema and the fix
353
+ only adds `Record_3`, as the docs promise.
354
+
355
+ - [#9](https://github.com/openapi-typesafe/openapi-typesafe/pull/9) [`14494f5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/14494f5553575d15ad8f4d54f59ddabddb3a3e01) Thanks [@fedorello](https://github.com/fedorello)! - A schema `$ref` into the keywords of another schema, such as
356
+ `#/paths/~1a/get/responses/200/content/application~1json/schema/items/properties/time`,
357
+ `#/components/schemas/Base/allOf/0/properties/id` or `#/components/schemas/A/definitions/B`, was
358
+ indexed by the keyword names (`["schema"]["items"]`), which the generated types do not have, and did
359
+ not look through optional or nullable values; the output did not compile (TS2339, TS2532, TS2344).
360
+ Where it does not compile, the `schema` of a media type, header or component parameter is now left
361
+ out, `items` is indexed by `number`, `additionalProperties` by `string`, an optional value (also a
362
+ response header without `required: true`) is wrapped in `NonNullable`, and a target behind
363
+ `allOf/N`, `definitions` or operation and path item `parameters/N` is written inline. Output that
364
+ compiled stays the same (ADR-026): a key of `type: object` without properties
365
+ (`Record<string, never>`) is `never` and compiles, so it is kept, and `items` next to
366
+ `type: string` or `type: object` has no type of its own, so its target is written inline. With
367
+ `--enum` an inline target uses the enum the generator declares for that schema, so no second,
368
+ incompatible TypeScript enum (and no second `--enum-values` array) is named after the pointer.
369
+ A pointer that indexes a value typed `unknown` is corrected too: one into a schema with no `type`
370
+ and no object keywords, or, with `--additional-properties`, one past `allOf` of a schema whose parts
371
+ all read `allOf` through `[key: string]: unknown` (`B["allOf"]["0"]`, TS2339).
372
+
373
+ New opt-in fix `ref-pointers` (`--fix ref-pointers`): the same type also where the original compiled
374
+ through an index signature (`--additional-properties`) as `unknown`.
375
+
376
+ - [#8](https://github.com/openapi-typesafe/openapi-typesafe/pull/8) [`ff6b717`](https://github.com/openapi-typesafe/openapi-typesafe/commit/ff6b717836b81e929295a4db4e731221e17322ac) Thanks [@fedorello](https://github.com/fedorello)! - The notice for an unknown negated flag names it as written: `--no-alphabetise` is reported as
377
+ `--no-alphabetise`, not `--alphabetise`.
378
+
379
+ ## 1.0.0-rc.0
380
+
381
+ ### Major Changes
382
+
383
+ - [#2](https://github.com/openapi-typesafe/openapi-typesafe/pull/2) [`fe3b751`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fe3b75106b6a737a3c54d1e629518a88d40375c9) Thanks [@fedorello](https://github.com/fedorello)! - First release of openapi-typesafe, a maintained fork of openapi-typescript 7.13, openapi-fetch and
384
+ openapi-react-query. The CLI flags, the Node API and the output of valid schemas match
385
+ openapi-typescript 7.13; the changes below are fixes and opt-in features. Version 1.0 makes these
386
+ contracts semver-stable. `npx openapi-typesafe-migrate --write` moves a project over.
387
+
388
+ ### Minor Changes
389
+
390
+ - [`6fdfcf7`](https://github.com/openapi-typesafe/openapi-typesafe/commit/6fdfcf7d5457dae3deddd3bce76e02a5306408bb) Thanks [@fedorello](https://github.com/fedorello)! - New `--fix` option (`fix` in the Node API and in `redocly.yaml`) for opt-in fixes of the output of
391
+ valid schemas (ADR-021). Give fix names, comma-separated, or `all` for every fix of the installed
392
+ version; an unknown name fails with `OPTION_FIX_UNKNOWN`. Without it the output does not change.
393
+ The fixes become the default in 2.0.
394
+
395
+ The first fix, `allof-required`: an `allOf` member with only `required` (and `type: object` or
396
+ annotations), inline or behind a `$ref`, no longer adds `& Record<string, never>` or `& unknown`;
397
+ its keys become required in the other members, so `Info & Record<string, never>` is now
398
+ `WithRequired<Info, "name">` (openapi-typescript [#1474](https://github.com/openapi-typesafe/openapi-typesafe/issues/1474), [#1520](https://github.com/openapi-typesafe/openapi-typesafe/issues/1520), [#2165](https://github.com/openapi-typesafe/openapi-typesafe/issues/2165)). An empty `type: object`
399
+ member is left out too.
400
+
401
+ - [`51893c4`](https://github.com/openapi-typesafe/openapi-typesafe/commit/51893c44af634b0ff7a122a6d6e5f7001f3727ea) Thanks [@fedorello](https://github.com/fedorello)! - New output fix `anyof-properties` (`--fix anyof-properties`, ADR-021): `anyOf` next to
402
+ `properties`, `additionalProperties` or `allOf` is intersected with them, so
403
+ `{ name?: string } | Email | Phone` is now `{ name?: string } & (Email | Phone)` and a value must
404
+ match a variant (openapi-typescript [#2380](https://github.com/openapi-typesafe/openapi-typesafe/issues/2380)); `type: string` with `anyOf` enums becomes
405
+ `string & ("a" | "b")`. With a `type` list, each listed type is intersected
406
+ and `null` is kept. Without the fix the output does not change; `--fix all` now includes it.
407
+
408
+ - [`5bf785f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5bf785f6657f25b00a08a9cb505b44bde076df65) Thanks [@fedorello](https://github.com/fedorello)! - New output fix `array-length-tuples` (`--fix array-length-tuples`, ADR-021), for `--array-length`:
409
+ `minItems: 1, maxItems: 2` gives `[string] | [string, string]` instead of `[] | [string]`; a nested
410
+ array is no longer wrapped twice (`[string[]]`, not `[string[][]]`); with `--immutable` the length
411
+ tuples are `readonly`; and a `prefixItems` tuple is not wrapped in length tuples
412
+ (openapi-typescript [#2048](https://github.com/openapi-typesafe/openapi-typesafe/issues/2048), [#2330](https://github.com/openapi-typesafe/openapi-typesafe/issues/2330), [#2546](https://github.com/openapi-typesafe/openapi-typesafe/issues/2546)). Without `--array-length` the fix changes nothing, and
413
+ naming it prints a notice. Without the fix the output does not change.
414
+
415
+ - [`a60df75`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a60df750c26f00aa56aee663c9519ec9aae6fa05) Thanks [@fedorello](https://github.com/fedorello)! - New option `--binary-as-blob` (`binaryAsBlob` in the Node API): raw binary strings become `Blob`
416
+ instead of `string`, so file uploads and downloads type check without a `transform` callback.
417
+ Raw binary is `format: binary` (OpenAPI 3.0), or a `contentMediaType` that is not text and has no
418
+ `contentEncoding` (3.1, also without `type`). `format: byte`, encoded strings and text media types
419
+ (`text/*`, JSON, XML, YAML) stay `string`. Off by default, so the output does not change. The
420
+ names follow openapi-typescript PR [#2878](https://github.com/openapi-typesafe/openapi-typesafe/issues/2878) by @joaodibba; closes openapi-typescript#1214.
421
+
422
+ The `SchemaObject` type of the Node API gains the OpenAPI 3.1 keywords `contentMediaType` and
423
+ `contentEncoding`.
424
+
425
+ - [`236ea3f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/236ea3fce582a2befa9be4c04e72d9f70d5a3ade) Thanks [@fedorello](https://github.com/fedorello)! - Report document limits as typed errors instead of crashes or hangs. A document nested too deeply
426
+ for the call stack fails with `SCHEMA_TOO_DEEP`. A `$ref` cycle with no schema in between fails
427
+ with `SCHEMA_REF_INVALID`. Keys such as `valueOf` that the schema loader cannot read fail with
428
+ `SCHEMA_KEY_UNSUPPORTED` and are all listed. A remote `$ref` that does not answer stops after 60
429
+ seconds. See the new Limits section in the advanced guide.
430
+
431
+ - [`9a9567d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/9a9567daa5c041b0cbf468e72fb95547254bc4e6) Thanks [@fedorello](https://github.com/fedorello)! - Mark the rarely used utility exports `resolveRef`, `scanDiscriminators`, `walk`, `c`, `debug`, `warn` and `error` as `@deprecated`. They keep working in 1.x and are removed in 2.0 (ADR-004, decision 9).
432
+
433
+ - [`de5f101`](https://github.com/openapi-typesafe/openapi-typesafe/commit/de5f101ef4464ccf85ad1c446046704a4187817e) Thanks [@fedorello](https://github.com/fedorello)! - Add the `discriminator-values` output fix (`--fix discriminator-values`, ADR-021). Without it a
434
+ schema that a `mapping` names and that a discriminated `oneOf` without a mapping also lists gets
435
+ two discriminator properties, the mapped value and the schema name (`kind: "cat"` and
436
+ `kind: "Cat"`), which intersect to `never`. With it the values of a property merge into one enum,
437
+ and the schema name is used only where no mapping gives the schema a value. Without the fix the
438
+ output is unchanged.
439
+
440
+ - [`fed3f15`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fed3f15371340eff01c9d694f01dbd7028fb863e) Thanks [@fedorello](https://github.com/fedorello)! - **Breaking compared with `openapi-typescript`:** the type helpers (`tsUnion`, `tsIntersection`, `tsNullable`, `tsOmit`, `tsRecord`, `tsLiteral`, `tsWithRequired`, `oapiRef`), the type constants (`STRING`, `NUMBER`, `BOOLEAN`, `NULL`, `UNKNOWN`, `NEVER`, `TRUE`, `FALSE`, `UNDEFINED`) and the exported transformers (`transformSchemaObject`, `transformComponentsObject`, `transformPathsObject` and the others) return IR objects instead of TypeScript compiler nodes. The helpers still accept TypeScript type nodes as input, and `astToString` prints IR, TypeScript nodes or a mix of both. `ctx.injectFooter` holds IR declarations; TypeScript nodes pushed by user callbacks still work. A `transform` or `transformProperty` callback may return IR or TypeScript nodes. Code that passes the constants or helper results into `ts.factory` calls must convert them first or build the whole type with the helpers (see ADR-004).
441
+
442
+ - [`6d0d224`](https://github.com/openapi-typesafe/openapi-typesafe/commit/6d0d22458bb3ecf341b6801b8ea583ad8695b996) Thanks [@fedorello](https://github.com/fedorello)! - Add the `irCallbacks: true` option (`OpenAPITSIrOptions`). With it, `transform`, `postTransform` and `transformProperty` receive and return IR nodes; a type result may also be TypeScript type text, printed as written. The TypeScript-node forms of `postTransform` and `transformProperty` are deprecated (ADR-004).
443
+
444
+ - [`099a961`](https://github.com/openapi-typesafe/openapi-typesafe/commit/099a961729ecad1af19b1ed79f9254ebddd0411e) Thanks [@fedorello](https://github.com/fedorello)! - The TypeScript compiler is loaded only when a callback or helper uses TypeScript nodes: from the project's `typescript` (version 6 or earlier), or from `@typescript/typescript6` on TypeScript 7 projects. When neither is installed, the run fails with an error that names both packages. Legacy callbacks warn once per run: `transform` when it returns a TypeScript node, `postTransform` and `transformProperty` whenever they use the TypeScript form.
445
+
446
+ - [`70eb1b0`](https://github.com/openapi-typesafe/openapi-typesafe/commit/70eb1b0dc03a48e4dc0cc09786c60d23f25fdf15) Thanks [@fedorello](https://github.com/fedorello)! - Add `--no-lint` (CLI) and `lint: false` (Node API, and `x-openapi-ts` per API) to skip the Redocly lint step. Bundling errors still fail the run. Lint stays on by default. Closes upstream [#2840](https://github.com/openapi-typesafe/openapi-typesafe/issues/2840) (design of upstream PR [#2845](https://github.com/openapi-typesafe/openapi-typesafe/issues/2845)).
447
+
448
+ - [`1fd16d1`](https://github.com/openapi-typesafe/openapi-typesafe/commit/1fd16d12c293c8397512c7bb4ec393eec9ffd276) Thanks [@fedorello](https://github.com/fedorello)! - **Breaking compared with `openapi-typescript`:** `openapiTS()` returns the generated declarations as IR objects (`IrDeclaration[]`) instead of TypeScript compiler nodes. `astToString(await openapiTS(…))` works unchanged and prints them with the package's own printer, byte for byte as before. Code that inspected or edited the returned `ts.Node`s must work with the IR objects instead (see ADR-004).
449
+
450
+ - [`19e1d9d`](https://github.com/openapi-typesafe/openapi-typesafe/commit/19e1d9d864acbec2ae17446002e2bdd71f19f806) Thanks [@fedorello](https://github.com/fedorello)! - Accept OpenAPI 3.2 documents. The schema loader update to `@redocly/openapi-core` 1.34.22 removed the
451
+ "Unsupported OpenAPI version: 3.2.0" error that `openapi-typescript` 7.13.0 reports (see ADR-005).
452
+
453
+ - [`9e6f3f1`](https://github.com/openapi-typesafe/openapi-typesafe/commit/9e6f3f116a25f391498316cf6f303531ade6723b) Thanks [@fedorello](https://github.com/fedorello)! - OpenAPI 3.2 features are typed, with no flag (ADR-020): a path item's `query` operation becomes a
454
+ `query` member after `trace` (only where declared), `additionalOperations` a member keyed by the
455
+ exact method name, `itemSchema` an `itemContent` map next to `content` (which keeps the `schema`
456
+ type), an `in: querystring` parameter the `query` member of `parameters`, and
457
+ `components.mediaTypes` a `components` member that `content` entries can reference. Documents that
458
+ use none of these keep their output. The warnings for these features are gone; a `querystring`
459
+ parameter next to `in: query` parameters (not allowed in 3.2) still warns and is not typed.
460
+ `--make-paths-enum` and `--path-params-as-types` include the new operations. A discriminator
461
+ without `propertyName` (allowed in 3.2) no longer omits a property named `undefined`.
462
+
463
+ The Node API types gain `query`, `additionalOperations`, `itemSchema`, `in: "querystring"`,
464
+ `components.mediaTypes` and `discriminator.defaultMapping`. Upstream: openapi-typescript#2577,
465
+ PRs [#2683](https://github.com/openapi-typesafe/openapi-typesafe/issues/2683), [#2844](https://github.com/openapi-typesafe/openapi-typesafe/issues/2844), [#2853](https://github.com/openapi-typesafe/openapi-typesafe/issues/2853).
466
+
467
+ - [`a8c7a1b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a8c7a1beab8683f7df4cd3d75276fbd48cdb6712) Thanks [@fedorello](https://github.com/fedorello)! - Add opt-in limits for `$ref` in documents you did not write. `--local-ref-root <dir>`
468
+ (`localRefRoot`) loads local `$ref` files only from that directory, and `--remote-ref-hosts
469
+ <hosts>` (`remoteRefHosts`) loads remote `$ref` documents only from the listed hosts, including
470
+ each redirect. A refused `$ref` fails with the new error code `SCHEMA_REF_FORBIDDEN`. Without the
471
+ options nothing changes. See "Untrusted documents" in the advanced guide.
472
+
473
+ - [`53e2c32`](https://github.com/openapi-typesafe/openapi-typesafe/commit/53e2c3237ee0455706e025638cdd4b297b4d7420) Thanks [@fedorello](https://github.com/fedorello)! - Add the `root-type-numbering` output fix (`--fix root-type-numbering`, ADR-021). With `--root-types
474
+ --root-types-no-schema-prefix`, schemas of one PascalCase name (`PetStore`, `pet_store`) each get
475
+ a root alias: the later keeps the name, as before, and the earlier get the next free number
476
+ (`PetStore_2`), instead of no alias. It needs both flags and prints a notice without them. Without
477
+ the fix the output is unchanged.
478
+
479
+ - [`9c69bfc`](https://github.com/openapi-typesafe/openapi-typesafe/commit/9c69bfcbc99a0151f7abd0434e50003ded130c95) Thanks [@fedorello](https://github.com/fedorello)! - Add typed errors: every expected failure is an `OpenAPITypesafeError` with a stable `code` and structured `details` (exported with `ERROR_CODES` and `isOpenAPITypesafeError`). Messages are unchanged; a reader or parser error is kept as `cause` (check `error.cause.code` instead of `error.code === "ENOENT"`). The CLI now prints one line per failure with its code and exits with a documented code: `1` stale output with `--check` (as before), `2` usage or configuration, `3` input document, `4` output files, `70` unexpected error. Other failures used to exit with `1` (ADR-011).
480
+
481
+ - [`a866985`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a8669856084adf4614c38ce4284ab46e7eb4086e) Thanks [@fedorello](https://github.com/fedorello)! - The generator no longer needs the `typescript` package: it is now an optional peer dependency, next to the optional `@typescript/typescript6` for TypeScript 7 projects. Only legacy callbacks and the deprecated `ts.Node` helpers load it.
482
+
483
+ **Breaking compared with `openapi-typescript`:** the `inject` option is printed as written (without the blank lines around it) instead of being reformatted by the TypeScript printer, so comments in it are kept. With `--path-params-as-types`, a backtick in a URL is escaped, so the key is a valid template literal type (the original produced a broken type).
484
+
485
+ - [`d9e3755`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d9e3755180f55f279dd1879b9c9a1f9f7c52e8b5) Thanks [@fedorello](https://github.com/fedorello)! - Add the `unevaluated-properties` output fix (`--fix unevaluated-properties`, ADR-021). Without it
486
+ `unevaluatedProperties` is ignored, so an object with only that keyword is `Record<string, never>`.
487
+ With it the keys that no other keyword declares get its type through an index signature, which
488
+ also holds the declared property types of the schema and its `allOf`, `anyOf` and `oneOf` members
489
+ (`PropertyValues<T>` for a `$ref`), so valid values stay assignable (openapi-typescript [#2839](https://github.com/openapi-typesafe/openapi-typesafe/issues/2839),
490
+ [#2880](https://github.com/openapi-typesafe/openapi-typesafe/issues/2880)). Without the fix the output is unchanged.
491
+
492
+ - [`323e9a5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/323e9a567c7ff3ddad7bc7a1bfa39b859e94b296) Thanks [@drwpow](https://github.com/drwpow)! - Add ability to set flags in redocly.yaml
493
+
494
+ ### Patch Changes
495
+
496
+ - [`ad94710`](https://github.com/openapi-typesafe/openapi-typesafe/commit/ad94710c5c2535f301e13b1aaf82c2447bf64823) Thanks [@fedorello](https://github.com/fedorello)! - Fix `$ref`s to keys with `~`, `/` or `%` in another file (`./parts.yaml#/a~0b`, `#/50%25`).
497
+ The bundled ref named a different key, so the types did not compile, or crashed the generator.
498
+ A local `$ref` with a malformed `%` escape now fails with `SCHEMA_REF_INVALID` and names the ref,
499
+ instead of an unexpected error.
500
+
501
+ - [`e434933`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e43493399026d9ecfa3088e8139f47f3e930f436) Thanks [@fedorello](https://github.com/fedorello)! - A `transform`, `postTransform` or `transformProperty` callback that returns a value that is not a
502
+ TypeScript node (a plain object, or text from `postTransform`) now fails with
503
+ `CALLBACK_RESULT_UNREADABLE` and names the callback and the schema path, instead of
504
+ `Debug Failure. Unhandled SyntaxKind` or a `TypeError`. `transform` returning text still keeps the
505
+ default type, as in openapi-typescript.
506
+
507
+ - [`98e6188`](https://github.com/openapi-typesafe/openapi-typesafe/commit/98e618873aa53fd2431f353360a882835c8cb9e3) Thanks [@fedorello](https://github.com/fedorello)! - `--check` without `--output` (and without `apis` in `redocly.yaml`) now fails with exit code 2 and
508
+ `CLI_CHECK_OUTPUT_MISSING`. Before, it printed the types and exited with 0 without checking
509
+ anything, so a CI check could pass by mistake.
510
+
511
+ - [`07b20a9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/07b20a9378824e669a8d872d4129a424597d4216) Thanks [@fedorello](https://github.com/fedorello)! - CommonJS consumers get types and a working `require()`. The package exports now carry `types` conditions (`index.d.cts` for `require`, `index.d.mts` for `import`), so TypeScript with `"module": "node16"` finds the declarations from a CommonJS file. `engines.node` is now `>=22.12.0`: the CommonJS build loads ESM-only dependencies (`parse-json`, `change-case`, `supports-color`, `yargs-parser`) through `require()`, which Node.js supports without a flag from 22.12. Fixes upstream [#2047](https://github.com/openapi-typesafe/openapi-typesafe/issues/2047), [#2155](https://github.com/openapi-typesafe/openapi-typesafe/issues/2155), [#2342](https://github.com/openapi-typesafe/openapi-typesafe/issues/2342).
512
+
513
+ - [`c988054`](https://github.com/openapi-typesafe/openapi-typesafe/commit/c9880541b806c85d3d20c90e4ff3d6f0e71b9836) Thanks [@fedorello](https://github.com/fedorello)! - Fix `--check` with several APIs in `redocly.yaml`: the CLI exited with `0` as soon as one output was up to date, so a stale output of another API went unnoticed. Every API is now generated or checked; each failure prints a line, and the exit code is that of the first failing API. The CLI is now TypeScript (ADR-012); it passes only the documented flags to the generator, so undocumented flags such as `--silent` no longer reach the Node API options.
514
+
515
+ - [`7577f44`](https://github.com/openapi-typesafe/openapi-typesafe/commit/7577f44e417e20d96a8df11f0132d924cbd1daa9) Thanks [@fedorello](https://github.com/fedorello)! - The CLI now warns when two operations share an `operationId`. The generated file declares the
516
+ operation twice in `operations` and does not compile without `skipLibCheck`. The warning does not
517
+ change the output or the exit code; the Node API already rejects such a schema.
518
+
519
+ - [`626a1d1`](https://github.com/openapi-typesafe/openapi-typesafe/commit/626a1d1ef1ad34df2e2b1ac2b10f0370e4d6d658) Thanks [@fedorello](https://github.com/fedorello)! - Fix kebab-case boolean flags before the schema path (for example `openapi-typesafe --root-types schema.yaml`): the flag took the path as its value, so the CLI waited on stdin. Fixes upstream [#2523](https://github.com/openapi-typesafe/openapi-typesafe/issues/2523), [#1651](https://github.com/openapi-typesafe/openapi-typesafe/issues/1651), [#2764](https://github.com/openapi-typesafe/openapi-typesafe/issues/2764), [#2694](https://github.com/openapi-typesafe/openapi-typesafe/issues/2694).
520
+
521
+ - [`98e6188`](https://github.com/openapi-typesafe/openapi-typesafe/commit/98e618873aa53fd2431f353360a882835c8cb9e3) Thanks [@fedorello](https://github.com/fedorello)! - The `CLI_GLOB_UNSUPPORTED` and `CLI_CONFIG_OUTPUT_MISSING` messages link to this project's docs
522
+ for multiple schemas instead of the openapi-typescript site.
523
+
524
+ - [`78024de`](https://github.com/openapi-typesafe/openapi-typesafe/commit/78024decda862937e9521d8099147c9a95885f15) Thanks [@fedorello](https://github.com/fedorello)! - Clearer CLI messages for two failures. A remote schema that cannot be fetched now prints the
525
+ network reason and the URL (`fetch failed: connect ECONNREFUSED … (http://…)`), not only
526
+ `fetch failed`; the Node API error keeps its message and now has the network error in `cause`.
527
+ YAML nested deeper than the parser limit now says to move nested schemas to `components` and
528
+ use `$ref`.
529
+
530
+ - [`5a01c7e`](https://github.com/openapi-typesafe/openapi-typesafe/commit/5a01c7e0a3db2c2fab97b4ba9544bc0b53bea9f3) Thanks [@fedorello](https://github.com/fedorello)! - The CLI now prints `Unknown flag --x is ignored (see --help)` for each flag it does not know. The
531
+ run still goes on, as before, but a typo such as `--alphabetise` no longer changes the output
532
+ without a word.
533
+
534
+ - [`ecc50e8`](https://github.com/openapi-typesafe/openapi-typesafe/commit/ecc50e84ee7c14687a48a091f83b0e4e040c8a4a) Thanks [@fedorello](https://github.com/fedorello)! - A schema source nested deeper than the call stack now fails with `SCHEMA_TOO_DEEP` on Node.js 22
535
+ and 24 too. Before, parsing it threw a raw `RangeError` there.
536
+
537
+ - [`153dff3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/153dff3dd490c09607b1d2377fe916df87427585) Thanks [@fedorello](https://github.com/fedorello)! - Fix `$defs` types. A schema's `$defs` member is now optional (`$defs?: { … }`), so values no
538
+ longer need a `$defs` key, and refs into it use `NonNullable<…>` (upstream [#2664](https://github.com/openapi-typesafe/openapi-typesafe/issues/2664)). The root
539
+ `$defs` now has one member per subschema instead of `Record<string, never>`, so `#/$defs/<name>`
540
+ refs resolve to the subschema type instead of `never`.
541
+
542
+ - [`374f824`](https://github.com/openapi-typesafe/openapi-typesafe/commit/374f8248e06ebf57ccada0fa0f680253bc787501) Thanks [@fedorello](https://github.com/fedorello)! - `stringToAST()` is deprecated (removed in 2.0). It works as before through the TypeScript bridge and emits one Node `DeprecationWarning` (code `OPENAPI_TYPESAFE_DEP_STRING_TO_AST`). Return TypeScript type text from an IR callback (`irCallbacks: true`) instead.
543
+
544
+ - [`05aa2de`](https://github.com/openapi-typesafe/openapi-typesafe/commit/05aa2de70187c1a6ccbfc37a45e4f264bca2b4af) Thanks [@fedorello](https://github.com/fedorello)! - `--enum` no longer writes the same discriminator enum twice. A schema that its parent's
545
+ `discriminator.mapping` names and that a discriminated `oneOf` lists got its `…Kind` enum twice,
546
+ and the file failed with "Duplicate identifier". Inherited from openapi-typescript.
547
+
548
+ - [`93f547f`](https://github.com/openapi-typesafe/openapi-typesafe/commit/93f547f94e3aaa64042b460e4012c28323048d1c) Thanks [@fedorello](https://github.com/fedorello)! - An empty schema file, or a document that is only `null`, now fails with
549
+ `SCHEMA_VERSION_UNSUPPORTED` ("Unsupported schema format, expected `openapi: 3.x`") instead of a
550
+ `TypeError` and exit code 70. Inherited from openapi-typescript.
551
+
552
+ - [`ed32986`](https://github.com/openapi-typesafe/openapi-typesafe/commit/ed32986f7f062390e755629b74a5bfd615e05061) Thanks [@fedorello](https://github.com/fedorello)! - Fix `--enum` output that did not compile: an empty string value now gives the member `"" = ""`, a member name that must be quoted is escaped (`"\\"` instead of `"\"`), and a line break in `x-enum-descriptions` no longer ends the `//` comment early (it becomes a space). The deprecated `tsEnum` / `tsEnumMember` helpers get the same fixes. Fixes upstream [#2807](https://github.com/openapi-typesafe/openapi-typesafe/issues/2807), [#2812](https://github.com/openapi-typesafe/openapi-typesafe/issues/2812), [#2614](https://github.com/openapi-typesafe/openapi-typesafe/issues/2614), [#2838](https://github.com/openapi-typesafe/openapi-typesafe/issues/2838).
553
+
554
+ - [`c4d5367`](https://github.com/openapi-typesafe/openapi-typesafe/commit/c4d5367235b49ac76301e3c5953e76c4243f8358) Thanks [@fedorello](https://github.com/fedorello)! - `--enum` and `--make-paths-enum`: values whose member names come out the same after invalid
555
+ characters are replaced (`reactions-+1` and `reactions--1` are both `reactions_1`) gave a
556
+ "Duplicate identifier" error. A repeated name now gets a number (`reactions_1_2`); names that did
557
+ not collide stay the same.
558
+
559
+ - [`4b88b54`](https://github.com/openapi-typesafe/openapi-typesafe/commit/4b88b546b12cf3a11ffbbb00aa72a2dd4eee2072) Thanks [@fedorello](https://github.com/fedorello)! - Fix `--enum-values` output that did not compile: the `FlattenedDeepRequired` helper now flattens readonly arrays (with `--immutable`) and looks through nullable parent objects, and the `ReadonlyArray` helper accepts readonly arrays. The helper text in the generated footer changes accordingly; the exported types stay the same where they compiled before. Fixes upstream [#2714](https://github.com/openapi-typesafe/openapi-typesafe/issues/2714), [#2749](https://github.com/openapi-typesafe/openapi-typesafe/issues/2749), [#2737](https://github.com/openapi-typesafe/openapi-typesafe/issues/2737).
560
+
561
+ - [`d1c4913`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d1c4913348cffd6b485ededb01a348385a060b0c) Thanks [@fedorello](https://github.com/fedorello)! - Security: document text can no longer add code to the generated file. With `--root-types`, a quote, backslash or line break in a component name is now escaped in `components['schemas']['…']`. Before, a name such as `A']; export const x = 1; //` added its own declaration. With `--path-params-as-types`, backslashes, `${` and carriage returns in a URL are now escaped in the template literal key; before, a backslash before a backtick ended the literal. Output for other names and URLs is unchanged.
562
+
563
+ - [`e0ae531`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e0ae531e2df0f7c22e6f0e7e2e7455d4b5bf569c) Thanks [@fedorello](https://github.com/fedorello)! - `--exclude-deprecated`: a deprecated component that kept output still references, such as the
564
+ `items` of a kept array or a kept operation's response, is kept, so the output no longer names a
565
+ missing `components["schemas"]` key (TS2339). A deprecated component that only dropped parts
566
+ reference (deprecated operations, parameters or properties) is still left out.
567
+
568
+ - [`fffe42b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/fffe42babe4a5c98665479fb2988513627653072) Thanks [@fedorello](https://github.com/fedorello)! - `openapiTS()` with a `Readable` stream that fails now rejects with `SCHEMA_LOAD_FAILED`. Before,
569
+ the promise never settled.
570
+
571
+ - [`04c5dac`](https://github.com/openapi-typesafe/openapi-typesafe/commit/04c5dac6ad3201f5c938f2979c065ef8b044ceea) Thanks [@fedorello](https://github.com/fedorello)! - A YAML or JSON file that does not parse (a tab indent, a second YAML document, broken JSON) now
572
+ fails with `SCHEMA_PARSE_FAILED`, as text input does, instead of `SCHEMA_LOAD_FAILED`, and the
573
+ message names the file. The exit code stays `3`.
574
+
575
+ - [#3](https://github.com/openapi-typesafe/openapi-typesafe/pull/3) [`186774b`](https://github.com/openapi-typesafe/openapi-typesafe/commit/186774bc97ffe258da1adfcb58ab41dbab886666) Thanks [@fedorello](https://github.com/fedorello)! - A `file:` URL source that names no path on the platform (an encoded slash, a host on POSIX, no
576
+ drive letter on Windows) fails with `SCHEMA_LOAD_FAILED` and the URL in `details.source`, as a
577
+ missing file does. Before, it failed with Node's untyped `TypeError`.
578
+
579
+ - [`e49344a`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e49344a208fb3bb38cd86f62c1395f8f7ca950f6) Thanks [@fedorello](https://github.com/fedorello)! - Packages contain only their build output, sources for source maps, the CLI, and the README, license and changelog. Coverage reports, local logs and tool configs are no longer packed.
580
+
581
+ - [`98e6188`](https://github.com/openapi-typesafe/openapi-typesafe/commit/98e618873aa53fd2431f353360a882835c8cb9e3) Thanks [@fedorello](https://github.com/fedorello)! - `--help` now lists `--generate-path-params`, which the CLI already accepted.
582
+
583
+ - [`3e690a3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/3e690a3952aee7f85c89635007abefe68117edd8) Thanks [@fedorello](https://github.com/fedorello)! - `--root-types` names no longer keep letters that the running Node.js knows and TypeScript's scanner
584
+ does not (Unicode 16 and 17 letters such as `꟒`): they become `_`, so the generated file parses.
585
+ Before, such a schema name gave "Invalid character" errors. See ADR-019.
586
+
587
+ - [`0415208`](https://github.com/openapi-typesafe/openapi-typesafe/commit/0415208a644c505c008e6db9aafb9a7d1aad65b0) Thanks [@fedorello](https://github.com/fedorello)! - The error for the removed `-it` alias now names `--immutable`. It named `--immutable-types`, which is removed too.
588
+
589
+ - [`365452e`](https://github.com/openapi-typesafe/openapi-typesafe/commit/365452ec70175d0de1866a31c9140bf12ad6bf4e) Thanks [@fedorello](https://github.com/fedorello)! - With `--local-ref-root` reached through a symbolic link (macOS `/tmp` is one), a `$ref` to a
590
+ missing file inside the root was refused with `SCHEMA_REF_FORBIDDEN` as if it were outside.
591
+ It is now reported as an unresolved `$ref`, like any missing file.
592
+
593
+ - [`f55fb72`](https://github.com/openapi-typesafe/openapi-typesafe/commit/f55fb72f93ef4fe009278bcc1f62e5d16e4012e5) Thanks [@remy90](https://github.com/remy90)! - Support `additionalProperties: true` on string enums by generating a loose autocomplete union (`(enum literals) | (string & {})`), preserving editor suggestions while still accepting arbitrary string values.
594
+
595
+ - [`307f7df`](https://github.com/openapi-typesafe/openapi-typesafe/commit/307f7dfb7752d7c2406ebbfd33863f940b70468d) Thanks [@fedorello](https://github.com/fedorello)! - Fix a crash when a schema's `summary` or `title` is not a string, as when a property named `summary` is written without `properties:`. Such values no longer go into the JSDoc. Fixes upstream [#2349](https://github.com/openapi-typesafe/openapi-typesafe/issues/2349).
596
+
597
+ - [`35992ed`](https://github.com/openapi-typesafe/openapi-typesafe/commit/35992ed156502393f9b87dbc7541eeb68cb1a4ea) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: when a template key such as `` `/apps/${string}` `` also matches another
598
+ path (`/apps/regions`, `` `/apps/${string}/restart` ``) whose type does not fit the template's (a
599
+ method or a parameter location one has and the other has not), the output did not compile
600
+ (TS2411, TS2413). `paths` is then an intersection type alias with each such template in an object
601
+ of its own, which removes those errors, and every path keeps the type it had. Output that
602
+ compiled stays the same, `export interface paths` included.
603
+
604
+ - [`26f08b7`](https://github.com/openapi-typesafe/openapi-typesafe/commit/26f08b74203dba7f4934978cc7a9badeb9333c15) Thanks [@fedorello](https://github.com/fedorello)! - `openapiTS("./openapi.yaml")` now fails with `SCHEMA_SOURCE_INVALID` and says to pass
605
+ `pathToFileURL(path)`. A string source is document text, so a file path was parsed as YAML and
606
+ failed with the unclear "Unsupported schema format, expected `openapi: 3.x`".
607
+
608
+ - [`35d9092`](https://github.com/openapi-typesafe/openapi-typesafe/commit/35d9092f55b791354f77b150dab13a6f7a71ea36) Thanks [@fedorello](https://github.com/fedorello)! - `--make-paths-enum` no longer writes an `ApiPaths` enum that does not compile. Names built from
609
+ the URL that collided (`GetUser` for both `/user` and `/user/{user_id}`) now name the path
610
+ parameters (`GetUserByUserId`), and a name that still repeats, such as a repeated `operationId`,
611
+ gets a number (`listItems2`). Names that did not collide are unchanged.
612
+
613
+ - [`6882bd5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/6882bd5c6f040f624378527f493e1b687cb7bdb1) Thanks [@fedorello](https://github.com/fedorello)! - Fix names that contain `%` (for example a property `50%`): the generator escapes `%` as `%25` in the `$ref` pointers it builds, so reading them back no longer throws `URIError`, and a name like `a%2Fb` no longer reads back as `a/b`. The exported `createRef` escapes the same way. Fixes upstream [#2251](https://github.com/openapi-typesafe/openapi-typesafe/issues/2251), [#2828](https://github.com/openapi-typesafe/openapi-typesafe/issues/2828).
614
+
615
+ - [`63275f8`](https://github.com/openapi-typesafe/openapi-typesafe/commit/63275f86ff7ba855338f09f87fb9567c8ed91300) Thanks [@fedorello](https://github.com/fedorello)! - `Readable` and `Writable` keep function types as they are. Before, they mapped a `Blob` or a `Date`
616
+ in response data into an object whose methods could not be called, so `data.file.arrayBuffer()`
617
+ did not type check. The helper types that `--read-write-markers` writes into the output change the
618
+ same way. See ADR-014, decision 6.
619
+
620
+ - [`d5dcbb3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d5dcbb3f38e4d583334977c50db92461085d4a11) Thanks [@fedorello](https://github.com/fedorello)! - `Readable` and `Writable` keep the shape of types without markers: readonly arrays stay arrays, tuples stay tuples, branded primitives (`string & { __brand }`) stay as they are, `allOf` arrays keep the properties of every member (so unions narrow again), and an optional `null` property is no longer dropped from request bodies. The `--read-write-markers` output carries the same fixed helpers (ADR-014). Fixes upstream [#2615](https://github.com/openapi-typesafe/openapi-typesafe/issues/2615), [#2620](https://github.com/openapi-typesafe/openapi-typesafe/issues/2620), [#2632](https://github.com/openapi-typesafe/openapi-typesafe/issues/2632), [#2717](https://github.com/openapi-typesafe/openapi-typesafe/issues/2717), [#2765](https://github.com/openapi-typesafe/openapi-typesafe/issues/2765).
621
+
622
+ - [`df1abc5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/df1abc5a4d86d096983fc07237ff55cd69b34a06) Thanks [@fedorello](https://github.com/fedorello)! - Require `@redocly/openapi-core` `^1.34.22`. The old range allowed 1.34.6 to 1.34.14, which reject
623
+ OpenAPI 3.2 documents, so an install that resolved one of them failed on 3.2 input.
624
+
625
+ - [`cbf804a`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cbf804aafefc7ffe5374eaa68f52e269b9652fe5) Thanks [@fedorello](https://github.com/fedorello)! - The 60-second limit on a remote document or `$ref` now covers the body too. A server that sent
626
+ the body slowly kept the run waiting, and a root URL then failed with "Cannot set property message
627
+ of ... which has only a getter" instead of "Timed out after 60000 ms loading <url>".
628
+
629
+ - [`4638165`](https://github.com/openapi-typesafe/openapi-typesafe/commit/4638165e140ce4d097e4c20581e4e893a5ec873e) Thanks [@fedorello](https://github.com/fedorello)! - `--remote-ref-hosts` (`remoteRefHosts`) now matches hosts as URLs write them. A listed default
630
+ port (`api.example.com:443`), a bare IPv6 address (`::1`), a trailing dot, a Unicode host name or
631
+ another IPv4 form now match the URLs they name; before, such `$ref`s were refused. Entries that
632
+ are not a host (with `/`, `@` or `#`) never match.
633
+
634
+ - [`cb058cd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/cb058cdbf852b7549de553000d4bb36e390acc60) Thanks [@fedorello](https://github.com/fedorello)! - `--root-types`: a root alias whose name a helper type of the file also declares (a schema named
635
+ `WithRequired` with `--root-types-no-schema-prefix`) is renamed to `WithRequired_2`, as aliases that
636
+ an enum takes already are. Before, both were declared under one name, which does not compile.
637
+
638
+ - [`70d5ef9`](https://github.com/openapi-typesafe/openapi-typesafe/commit/70d5ef93425423c6faad5c775629541aa4bce54c) Thanks [@fedorello](https://github.com/fedorello)! - `--enum` with `--root-types`: a root type alias no longer gets the same name as an enum. Before,
639
+ both were exported under one name and the output did not compile. The alias now gets the next free
640
+ suffix (`ClusterState_2`); the enum keeps its name. Fixes upstream [#2099](https://github.com/openapi-typesafe/openapi-typesafe/issues/2099), [#2341](https://github.com/openapi-typesafe/openapi-typesafe/issues/2341), [#2206](https://github.com/openapi-typesafe/openapi-typesafe/issues/2206).
641
+
642
+ - [`3d4cafd`](https://github.com/openapi-typesafe/openapi-typesafe/commit/3d4cafd70d1da8bc80d6f3e4e3b9204f4643f840) Thanks [@fedorello](https://github.com/fedorello)! - `--root-types --root-types-no-schema-prefix --root-types-keep-casing`: a schema whose name
643
+ TypeScript reserves (`void`, `class`, `string`, …) keeps the prefix (`Schemavoid`), as a name that
644
+ starts with a digit already does. Before, `export type void` did not compile.
645
+
646
+ - [`68a5741`](https://github.com/openapi-typesafe/openapi-typesafe/commit/68a574108b02082d5d91f0c9bcef8b282cd23ea7) Thanks [@fedorello](https://github.com/fedorello)! - `--root-types-no-schema-prefix` with schemas of one PascalCase name (`Void` and `void`) gives the
647
+ same output as openapi-typescript again: the last schema gets `Void` and the earlier ones have no
648
+ root alias. `1.0.0-beta.2` also added numbered aliases (`Void_2`), which changed valid output;
649
+ that is now a backlog item for an opt-in flag.
650
+
651
+ - [`afcaca4`](https://github.com/openapi-typesafe/openapi-typesafe/commit/afcaca4c97c718017c2b46a80e5a2084246465f8) Thanks [@fedorello](https://github.com/fedorello)! - `--check` names the stale file: `Generated types are not up-to-date! src/api.ts differs from its
652
+ schema.` With several APIs in `redocly.yaml`, this tells which output to regenerate.
653
+
654
+ - [`8a4c592`](https://github.com/openapi-typesafe/openapi-typesafe/commit/8a4c59221d4ed99fcf11c51ad0d14dbac2ad057f) Thanks [@fedorello](https://github.com/fedorello)! - The public `StringSubtype` type has `minLength`, `maxLength` and `pattern`, so callbacks can read
655
+ them after narrowing a Schema Object to `type: "string"`.
656
+
657
+ - [`1081515`](https://github.com/openapi-typesafe/openapi-typesafe/commit/1081515c69d6346dd9d7fc408e0a8a6082d6ed2f) Thanks [@fedorello](https://github.com/fedorello)! - Always generate names that parse. An `--enum` or `--enum-values` name that starts with a digit
658
+ after invalid characters are removed now gets the `Value` prefix (`0 a-b` gave `value0 a-b`).
659
+ With `--root-types-keep-casing`, characters that cannot be in an identifier become `_`
660
+ (`Schemamy pet` is now `Schemamy_pet`). With `--root-types-no-schema-prefix`, a name that would
661
+ start with a digit keeps its prefix (`Schema1`). Names that were valid before do not change.
662
+
663
+ - [`e271999`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e2719997bdfb326d28849a6162892dfdff21a468) Thanks [@fedorello](https://github.com/fedorello)! - Warn about OpenAPI 3.2 features that the generated types leave out: the `query` operation,
664
+ `additionalOperations`, `in: querystring` parameters and `itemSchema`. Each use prints its JSON
665
+ Pointer. Before, they were dropped without a word. See "OpenAPI 3.2 features" in the docs.
666
+
667
+ - [`77d7d5c`](https://github.com/openapi-typesafe/openapi-typesafe/commit/77d7d5cf867d21a3424d14bda60aec62d7e5ea96) Thanks [@fedorello](https://github.com/fedorello)! - A YAML document whose aliases (`*name`) expand it far beyond its written size (a "billion laughs"
668
+ document) now fails at once with `SCHEMA_PARSE_FAILED`. Before, the run took minutes and ended
669
+ with "RangeError: Set maximum size exceeded". Real documents that reuse anchors are not affected:
670
+ the limit starts at 1,000,000 expanded nodes and 100 times the written size.
671
+
672
+ ## 7.13.0
673
+
674
+ ### Minor Changes
675
+
676
+ - [#2549](https://github.com/openapi-ts/openapi-typescript/pull/2549) [`a690e52`](https://github.com/openapi-ts/openapi-typescript/commit/a690e526b7693479bc2f2f002d71a020fa5e4e16) Thanks [@abumalick](https://github.com/abumalick)! - Add readOnly/writeOnly support via `--read-write-markers` flag. When enabled, readOnly properties are wrapped with `$Read<T>` and writeOnly properties with `$Write<T>`. openapi-fetch uses `Readable<T>` and `Writable<T>` helpers to exclude these properties from responses and request bodies respectively.
677
+
678
+ ## 7.12.0
679
+
680
+ ### Minor Changes
681
+
682
+ - [#2524](https://github.com/openapi-ts/openapi-typescript/pull/2524) [`697f7fe`](https://github.com/openapi-ts/openapi-typescript/commit/697f7fe8bf3f23bfa36cb29c093a359b562a377e) Thanks [@gunnarvelle](https://github.com/gunnarvelle)! - Added flag to keep casing for exported root types
683
+
684
+ ### Patch Changes
685
+
686
+ - [#2536](https://github.com/openapi-ts/openapi-typescript/pull/2536) [`e3c05a4`](https://github.com/openapi-ts/openapi-typescript/commit/e3c05a40752b02fcabe63fda88d7e0afae00ab6d) Thanks [@darkbasic](https://github.com/darkbasic)! - Fix `enumValues: true` output for schemas that use `oneOf`/`anyOf` unions by narrowing union types with `Extract<>` before accessing variant-specific properties. This prevents invalid type paths when an accessed property only exists on some union members.
687
+
688
+ ## 7.11.0
689
+
690
+ ### Minor Changes
691
+
692
+ - [#2433](https://github.com/openapi-ts/openapi-typescript/pull/2433) [`27c9370`](https://github.com/openapi-ts/openapi-typescript/commit/27c9370911b50a981d146fa5c561b90d66dd2c0d) Thanks [@danitt](https://github.com/danitt)! - Conditionally generate TS enums
693
+
694
+ ## 7.10.2
695
+
696
+ ### Patch Changes
697
+
698
+ - [#2139](https://github.com/openapi-ts/openapi-typescript/pull/2139) [`12f9c29`](https://github.com/openapi-ts/openapi-typescript/commit/12f9c29b7653db3ab5d6beb4ac698ce5b58177aa) Thanks [@darkbasic](https://github.com/darkbasic)! - All kinds of enum related fixes (enums in arrays, in optional props, in unions, in request body, with record types...)
699
+
700
+ - [#2548](https://github.com/openapi-ts/openapi-typescript/pull/2548) [`4385590`](https://github.com/openapi-ts/openapi-typescript/commit/438559038baa931144768f186e8825f9e84cdb85) Thanks [@mynnx](https://github.com/mynnx)! - Fixes the `--redocly` flag so that it no longer hangs and is able to lookup the Redocly file at a custom path
701
+
702
+ ## 7.10.1
703
+
704
+ ### Patch Changes
705
+
706
+ - [#2480](https://github.com/openapi-ts/openapi-typescript/pull/2480) [`e04dc65`](https://github.com/openapi-ts/openapi-typescript/commit/e04dc65817a91eb7ceaea1992f0e674e5d885bb2) Thanks [@MatissJanis](https://github.com/MatissJanis)! - Fix multi-line jsdoc comments
707
+
708
+ ## 7.10.0
709
+
710
+ ### Minor Changes
711
+
712
+ - [#2449](https://github.com/openapi-ts/openapi-typescript/pull/2449) [`bdd5ddb`](https://github.com/openapi-ts/openapi-typescript/commit/bdd5ddb7d5f8463bd0515f0b2d5c98a8a394dabf) Thanks [@kristianjf](https://github.com/kristianjf)! - Add transformProperty hook for property signature modification
713
+
714
+ - [#2288](https://github.com/openapi-ts/openapi-typescript/pull/2288) [`0f22be2`](https://github.com/openapi-ts/openapi-typescript/commit/0f22be218f0c8050a96f35a6a271b959b2c5a23f) Thanks [@hontas](https://github.com/hontas)! - Add support for patternProperties
715
+
716
+ ## 7.9.1
717
+
718
+ ### Patch Changes
719
+
720
+ - [#2393](https://github.com/openapi-ts/openapi-typescript/pull/2393) [`6943ccf`](https://github.com/openapi-ts/openapi-typescript/commit/6943ccf216f602f004eb178dd652ffcbafc05346) Thanks [@simon-curtis](https://github.com/simon-curtis)! - Now checking for null & empty string when generating enum description
721
+
722
+ - [#2375](https://github.com/openapi-ts/openapi-typescript/pull/2375) [`5be22d7`](https://github.com/openapi-ts/openapi-typescript/commit/5be22d7adc8bc36fdfa91f1aa3473919107060f2) Thanks [@ParkerVR](https://github.com/ParkerVR)! - Fix behavior when using enum and export-type flags
723
+
724
+ ## 7.9.0
725
+
726
+ ### Minor Changes
727
+
728
+ - [#2374](https://github.com/openapi-ts/openapi-typescript/pull/2374) [`c5ebbb8`](https://github.com/openapi-ts/openapi-typescript/commit/c5ebbb8d5a0945c2360a2a147a3256d7e8585020) Thanks [@cmlee-accelins](https://github.com/cmlee-accelins)! - Add JSDoc support for the recommended examples array on JSON Schema objects.
729
+
730
+ ## 7.8.0
731
+
732
+ ### Minor Changes
733
+
734
+ - [#2310](https://github.com/openapi-ts/openapi-typescript/pull/2310) [`e66b5ce`](https://github.com/openapi-ts/openapi-typescript/commit/e66b5ce63bfcdc57c6ee942e5ed4e7667e64c290) Thanks [@drwpow](https://github.com/drwpow)! - Build package with unbuild to improve CJS support
735
+
736
+ ## 7.7.3
737
+
738
+ ### Patch Changes
739
+
740
+ - [#2185](https://github.com/openapi-ts/openapi-typescript/pull/2185) [`67889ba`](https://github.com/openapi-ts/openapi-typescript/commit/67889baf7832188f6589e0fb2e3d31a2e6ede257) Thanks [@duncanbeevers](https://github.com/duncanbeevers)! - Fix invalid $ref index into path
741
+
742
+ ## 7.7.2
743
+
744
+ ### Patch Changes
745
+
746
+ - [#2145](https://github.com/openapi-ts/openapi-typescript/pull/2145) [`d79efae`](https://github.com/openapi-ts/openapi-typescript/commit/d79efaea3385d2421d3d295f69d7036cddb106b5) Thanks [@luhn](https://github.com/luhn)! - Don't remove `null` type if a default is present.
747
+
748
+ ## 7.7.1
749
+
750
+ ### Patch Changes
751
+
752
+ - [#2260](https://github.com/openapi-ts/openapi-typescript/pull/2260) [`7205e12`](https://github.com/openapi-ts/openapi-typescript/commit/7205e12e07e5fd36a6bb3be44ea911f57bbbeb60) Thanks [@zrosenbauer](https://github.com/zrosenbauer)! - Prevents a `TypeError` due to a bad in operator for `type: "array"` when a `boolean` is set on `items`
753
+
754
+ ## 7.7.0
755
+
756
+ ### Minor Changes
757
+
758
+ - [#2249](https://github.com/openapi-ts/openapi-typescript/pull/2249) [`7f3f7b6`](https://github.com/openapi-ts/openapi-typescript/commit/7f3f7b65da5ef8caf5304486184118352665eb3f) Thanks [@gzm0](https://github.com/gzm0)! - Add jsdoc comments to response object
759
+
760
+ ### Patch Changes
761
+
762
+ - [#2199](https://github.com/openapi-ts/openapi-typescript/pull/2199) [`fc3f7f8`](https://github.com/openapi-ts/openapi-typescript/commit/fc3f7f8b9cf52f0d4daf31ed4579d588c5b0f3e6) Thanks [@StefanTerdell](https://github.com/StefanTerdell)! - Fix boolean object property schemas
763
+
764
+ - [#2152](https://github.com/openapi-ts/openapi-typescript/pull/2152) [`47e4b5e`](https://github.com/openapi-ts/openapi-typescript/commit/47e4b5eb86adc59e3de2a4179741d35a26db61c0) Thanks [@insertmike](https://github.com/insertmike)! - - Fixed --make-paths-enum option transforming the paths URL (`:id` instead of `{id}`)
765
+
766
+ - [#2241](https://github.com/openapi-ts/openapi-typescript/pull/2241) [`ef23947`](https://github.com/openapi-ts/openapi-typescript/commit/ef239479b5f15fc4c98dd15c72974d4cb8722fb0) Thanks [@stanleyk](https://github.com/stanleyk)! - Replacing `any` with `unknown` in the `ReadonlyArray` type declaration.
767
+
768
+ ## 7.6.1
769
+
770
+ ### Patch Changes
771
+
772
+ - [#2131](https://github.com/openapi-ts/openapi-typescript/pull/2131) [`41bed98`](https://github.com/openapi-ts/openapi-typescript/commit/41bed98f2ff6b41f4f4759724af2d9582f8c4449) Thanks [@htunnicliff](https://github.com/htunnicliff)! - Update @redocly/openapi-core to fix punycode deprecation bug
773
+
774
+ ## 7.6.0
775
+
776
+ ### Minor Changes
777
+
778
+ - [#2102](https://github.com/openapi-ts/openapi-typescript/pull/2102) [`0cdfc47`](https://github.com/openapi-ts/openapi-typescript/commit/0cdfc479b981c26ead188f8883b856c0c8e3c841) Thanks [@ViktorPontinen](https://github.com/ViktorPontinen)! - Support generating path params for flaky schemas using --generate-path-params option
779
+
780
+ ## 7.5.2
781
+
782
+ ### Patch Changes
783
+
784
+ - [#2085](https://github.com/openapi-ts/openapi-typescript/pull/2085) [`2bffe2a`](https://github.com/openapi-ts/openapi-typescript/commit/2bffe2a652864a54c8dc969327e4a8eb4081eb25) Thanks [@drwpow](https://github.com/drwpow)! - Update @redocly/openapi-core to 1.27.0
785
+
786
+ ## 7.5.1
787
+
788
+ ### Patch Changes
789
+
790
+ - [#2049](https://github.com/openapi-ts/openapi-typescript/pull/2049) [`39f9b2f`](https://github.com/openapi-ts/openapi-typescript/commit/39f9b2fb913eb13817592b22f1bbe35de1bc4c33) Thanks [@duncanbeevers](https://github.com/duncanbeevers)! - Add schema to postTransform options
791
+
792
+ ## 7.5.0
793
+
794
+ ### Minor Changes
795
+
796
+ - [#2052](https://github.com/openapi-ts/openapi-typescript/pull/2052) [`d2de5c7`](https://github.com/openapi-ts/openapi-typescript/commit/d2de5c7e596d1b427d6d5d629974627456623305) Thanks [@laurenz-glueck](https://github.com/laurenz-glueck)! - brings back --make-paths-enum option to generate ApiPaths enum
797
+
798
+ - [#2059](https://github.com/openapi-ts/openapi-typescript/pull/2059) [`9e4f61c`](https://github.com/openapi-ts/openapi-typescript/commit/9e4f61c530fe634051fa5c9b25e18a5f9ff1f76f) Thanks [@gduliscouet-ubitransport](https://github.com/gduliscouet-ubitransport)! - Allow all types except UNKNOWN to be nullable
799
+
800
+ ## 7.4.4
801
+
802
+ ### Patch Changes
803
+
804
+ - [#1999](https://github.com/openapi-ts/openapi-typescript/pull/1999) [`e2d8541`](https://github.com/openapi-ts/openapi-typescript/commit/e2d854131a1dc11d3b8e8513d3e0ce1f04ea1211) Thanks [@patzick](https://github.com/patzick)! - Improved error messages to contain locations.
805
+
806
+ ## 7.4.3
807
+
808
+ ### Patch Changes
809
+
810
+ - [#1982](https://github.com/openapi-ts/openapi-typescript/pull/1982) [`8d00218`](https://github.com/openapi-ts/openapi-typescript/commit/8d00218aaaa65bd175a2538f60cb508a1219a415) Thanks [@prewk](https://github.com/prewk)! - Make pathParamsAsTypes work with integer/boolean types
811
+
812
+ ## 7.4.2
813
+
814
+ ### Patch Changes
815
+
816
+ - [#1873](https://github.com/openapi-ts/openapi-typescript/pull/1873) [`c2c396d`](https://github.com/openapi-ts/openapi-typescript/commit/c2c396d8282692f3ac2df50656ebcd9e8615a685) Thanks [@DanDeMicco](https://github.com/DanDeMicco)! - Support for generating enums when enums definition has null value
817
+
818
+ ## 7.4.1
819
+
820
+ ### Patch Changes
821
+
822
+ - [#1917](https://github.com/openapi-ts/openapi-typescript/pull/1917) [`4a59124`](https://github.com/openapi-ts/openapi-typescript/commit/4a591248175f918369a9713dea0856b12dca16c3) Thanks [@drwpow](https://github.com/drwpow)! - Bump Redocly Core
823
+
824
+ ## 7.4.0
825
+
826
+ ### Minor Changes
827
+
828
+ - [#1876](https://github.com/openapi-ts/openapi-typescript/pull/1876) [`a9cd9aa`](https://github.com/openapi-ts/openapi-typescript/commit/a9cd9aa56dd9dec043a4e4fd85527acac227a142) Thanks [@BradHacker](https://github.com/BradHacker)! - Add option to export all root component types
829
+
830
+ ## 7.3.3
831
+
832
+ ### Patch Changes
833
+
834
+ - [#1877](https://github.com/openapi-ts/openapi-typescript/pull/1877) [`94592a4`](https://github.com/openapi-ts/openapi-typescript/commit/94592a494566255807a3fc9bc19369af86d7cb78) Thanks [@phk422](https://github.com/phk422)! - fix: replace special characters using `SPECIAL_CHARACTER_MAP` for duplicate-identifiers
835
+
836
+ ## 7.3.2
837
+
838
+ ### Patch Changes
839
+
840
+ - [#1867](https://github.com/openapi-ts/openapi-typescript/pull/1867) [`21fb8b0`](https://github.com/openapi-ts/openapi-typescript/commit/21fb8b0febbae1a12dd1bb43eb9130422629409e) Thanks [@phk422](https://github.com/phk422)! - fix(openapi-typescript): type errors generated under `enumValues`
841
+
842
+ ## 7.3.1
843
+
844
+ ### Patch Changes
845
+
846
+ - [#1849](https://github.com/openapi-ts/openapi-typescript/pull/1849) [`08bde72`](https://github.com/openapi-ts/openapi-typescript/commit/08bde72cfeed14ecc3a15251a2f77d0770382442) Thanks [@liangskyli](https://github.com/liangskyli)! - fix: keyedParameters use unique key
847
+
848
+ ## 7.3.0
849
+
850
+ ### Minor Changes
851
+
852
+ - [#1799](https://github.com/openapi-ts/openapi-typescript/pull/1799) [`9939b76`](https://github.com/openapi-ts/openapi-typescript/commit/9939b76f29b90baa868b8764a403dcb98fc2ca65) Thanks [@drwpow](https://github.com/drwpow)! - Don’t generate `| undefined` for additionalProperties
853
+
854
+ ## 7.2.0
855
+
856
+ ### Minor Changes
857
+
858
+ - [#1775](https://github.com/openapi-ts/openapi-typescript/pull/1775) [`b1bbe62`](https://github.com/openapi-ts/openapi-typescript/commit/b1bbe6295fad3a798fe3d8c5c9c1347ae17e268f) Thanks [@phk422](https://github.com/phk422)! - feat: add dedupeEnums option
859
+
860
+ ## 7.1.2
861
+
862
+ ### Patch Changes
863
+
864
+ - [#1717](https://github.com/openapi-ts/openapi-typescript/pull/1717) [`335530c`](https://github.com/openapi-ts/openapi-typescript/commit/335530c4f8f966d0154f19504585c462f5f5a409) Thanks [@kerwanp](https://github.com/kerwanp)! - Ignore configuration files in published package
865
+
866
+ ## 7.1.1
867
+
868
+ ### Patch Changes
869
+
870
+ - [#1784](https://github.com/openapi-ts/openapi-typescript/pull/1784) [`c2f8655`](https://github.com/openapi-ts/openapi-typescript/commit/c2f8655c0be5f8131d0ef115724fa4a443c44a8b) Thanks [@yoshi2no](https://github.com/yoshi2no)! - Fix: Correct handling of identical minItems and maxItems in array schemas when arrayLength option is true
871
+
872
+ ## 7.1.0
873
+
874
+ ### Minor Changes
875
+
876
+ - [#1766](https://github.com/openapi-ts/openapi-typescript/pull/1766) [`0ce35d7`](https://github.com/openapi-ts/openapi-typescript/commit/0ce35d7ca707b4bd8e2d794c002dcd158079864e) Thanks [@phk422](https://github.com/phk422)! - feat: Add the inject option
877
+
878
+ - [#1768](https://github.com/openapi-ts/openapi-typescript/pull/1768) [`285b097`](https://github.com/openapi-ts/openapi-typescript/commit/285b0970a6d32406bb67677860e2dcbb3d7ad993) Thanks [@phk422](https://github.com/phk422)! - feat: Add check option
879
+
880
+ ### Patch Changes
881
+
882
+ - [#1772](https://github.com/openapi-ts/openapi-typescript/pull/1772) [`41cb9a2`](https://github.com/openapi-ts/openapi-typescript/commit/41cb9a232127e5ae421b1853506b75f718683c3d) Thanks [@ashwin153](https://github.com/ashwin153)! - fix: add explicit import of performance to fix bazel compatibility issues
883
+
884
+ - [#1764](https://github.com/openapi-ts/openapi-typescript/pull/1764) [`2793049`](https://github.com/openapi-ts/openapi-typescript/commit/2793049b1102d9e3ae6ec0f933794993a228c745) Thanks [@michalfedyna](https://github.com/michalfedyna)! - Fix --properties-required-by-default flag not working
885
+
886
+ - [#1763](https://github.com/openapi-ts/openapi-typescript/pull/1763) [`19b9383`](https://github.com/openapi-ts/openapi-typescript/commit/19b9383de63b6aa6a9c71cdd8741a0de6f206a55) Thanks [@nkt](https://github.com/nkt)! - fix: schema.content might be omitted
887
+
888
+ ## 7.0.4
889
+
890
+ ### Patch Changes
891
+
892
+ - [#1746](https://github.com/openapi-ts/openapi-typescript/pull/1746) [`e705909`](https://github.com/openapi-ts/openapi-typescript/commit/e705909f2b15d8b207be4be22f329e29e5f6444b) Thanks [@phk422](https://github.com/phk422)! - fix: Correct handling of default parameter values in referenced component schema
893
+
894
+ ## 7.0.3
895
+
896
+ ### Patch Changes
897
+
898
+ - [#1761](https://github.com/openapi-ts/openapi-typescript/pull/1761) [`8043c5d`](https://github.com/openapi-ts/openapi-typescript/commit/8043c5d27d3abf9df1a3e9cf031531a52921a122) Thanks [@yoshi2no](https://github.com/yoshi2no)! - fix: Enum option cannot generate enums if values are not valid property names
899
+
900
+ ## 7.0.2
901
+
902
+ ### Patch Changes
903
+
904
+ - [#1743](https://github.com/openapi-ts/openapi-typescript/pull/1743) [`8f6ec20`](https://github.com/openapi-ts/openapi-typescript/commit/8f6ec20d5d26396c1745690f0e42675776e1a691) Thanks [@avaly](https://github.com/avaly)! - Generate valid types for referenced nested properties
905
+
906
+ ## 7.0.1
907
+
908
+ ### Patch Changes
909
+
910
+ - [#1724](https://github.com/openapi-ts/openapi-typescript/pull/1724) [`f47268f`](https://github.com/openapi-ts/openapi-typescript/commit/f47268f38b542b0adf61861efe3fdbf63d0a37f1) Thanks [@simensol](https://github.com/simensol)! - Make sure result is an object before using the in operator.
911
+
912
+ ## 7.0.0
913
+
914
+ ### Major Changes
915
+
916
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: The Node.js API now returns the TypeScript AST for the main method as well as `transform()` and `postTransform()`. To migrate, you’ll have to use the `typescript` compiler API:
917
+
918
+ ```diff
919
+ + import ts from "typescript";
920
+
921
+ + const DATE = ts.factory.createIdentifier("Date");
922
+ + const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull());
923
+
924
+ const ast = await openapiTS(mySchema, {
925
+ transform(schemaObject, metadata) {
926
+ if (schemaObject.format === "date-time") {
927
+ - return schemaObject.nullable ? "Date | null" : "Date";
928
+ + return schemaObject.nullable
929
+ + ? ts.factory.createUnionTypeNode([DATE, NULL])
930
+ + : DATE;
931
+ }
932
+ },
933
+ };
934
+ ```
935
+
936
+ Though it’s more verbose, it’s also more powerful, as now you have access to additional properties of the generated code you didn’t before (such as injecting comments).
937
+
938
+ For example syntax, search this codebae to see how the TypeScript AST is used.
939
+
940
+ Also see [AST Explorer](https://astexplorer.net/)’s `typescript` parser to inspect how TypeScript is interpreted as an AST.
941
+
942
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: Changing of several CLI flags and Node.js API options
943
+ - The `--auth`, `--httpHeaders`, `--httpMethod`, and `fetch` (Node.js-only) options were all removed from the CLI and Node.js API
944
+ - To migrate, you’ll need to create a [redocly.yaml config](https://redocly.com/docs/cli/configuration/) that specifies your auth options [in the http setting](https://redocly.com/docs/cli/configuration/#resolve-non-public-or-non-remote-urls)
945
+ - You can also set your fetch client in redocly.yaml as well.
946
+ - `--immutable-types` has been renamed to `--immutable`
947
+ - `--support-array-length` has been renamed to `--array-length`
948
+
949
+ - [`fbaf96d`](https://github.com/openapi-ts/openapi-typescript/commit/fbaf96d33181a2fabd3d4748e54c0f111ed6756e) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: Remove globbing schemas in favor of `redocly.yaml` config. Specify multiple schemas with outputs in there instead. See [Multiple schemas](https://openapi-ts.dev/docs/cli/#multiple-schemas) for more info.
950
+
951
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: Most optional objects are now always present in types, just typed as `:never`. This includes keys of the Components Object as well as HTTP methods.
952
+
953
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking**: No more `external` export in schemas anymore. Everything gets flattened into the `components` object instead (if referencing a schema object from a remote partial, note it may have had a minor name change to avoid conflict).
954
+
955
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ⚠️ **Breaking** `defaultNonNullable` option now defaults to `true`. You’ll now need to manually set `false` to return to old behavior.
956
+
957
+ - [`799194d `](https://github.com/openapi-ts/openapi-typescript/commit/799194d98c3934570c6500d986496eee17b79309) Thanks [@drwpow](https://github.com/drwpow)~ - ⚠️ **Breaking** TypeScript is now a peerDependency and must be installed alongside `openapi-typescript`
958
+
959
+ ### Minor Changes
960
+
961
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: automatically validate schemas with Redocly CLI ([docs](https://redocly.com/docs/cli/)). No more need for external tools to report errors! 🎉
962
+ - By default, it will only throw on actual schema errors (uses Redocly’s default settings)
963
+ - For stricter linting or custom rules, you can create a [redocly.yaml config](https://redocly.com/docs/cli/configuration/)
964
+
965
+ - [`312b7ba`](https://github.com/openapi-ts/openapi-typescript/commit/312b7ba03fc0334153d4eeb51d6159f3fc63934e) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature:** allow configuration of schemas via `apis` key in redocly.config.yaml. [See docs](https://openapi-ts.dev/cli/) for more info.
966
+ - Any options passed into your [redocly.yaml config](https://redocly.com/docs/cli/configuration/) are respected
967
+
968
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: add `enum` option to export top-level enums from schemas
969
+
970
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: add `formatOptions` to allow formatting TS output
971
+
972
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: header responses add `[key: string]: unknown` index type to allow for additional untyped headers
973
+
974
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: bundle schemas with Redocly CLI
975
+
976
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: Added debugger that lets you profile performance and see more in-depth messages
977
+
978
+ - [#1374](https://github.com/openapi-ts/openapi-typescript/pull/1374) [`7ac5174`](https://github.com/openapi-ts/openapi-typescript/commit/7ac5174a1f767c1103573543bb17622ac8d25fe4) Thanks [@ElForastero](https://github.com/ElForastero)! - Add support for x-enum-varnames and x-enum-descriptions
979
+
980
+ - [#1545](https://github.com/openapi-ts/openapi-typescript/pull/1545) [`9158b81`](https://github.com/openapi-ts/openapi-typescript/commit/9158b81e8fdd45491afde8e291a786d7b2abc154) Thanks [@jaredLunde](https://github.com/openapi-ts/openapi-typescript/commits?author=jaredLunde)! - Replace # characters in operation IDs with a slash
981
+
982
+ ### Patch Changes
983
+
984
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - Refactor internals to use TypeScript AST rather than string mashing
985
+
986
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - 🧹 Cleaned up and reorganized all tests
987
+
988
+ - [#1602](https://github.com/openapi-ts/openapi-typescript/pull/1602) [`9da96cd`](https://github.com/openapi-ts/openapi-typescript/commit/9da96cda4eb8f959c4703637d8fc89e1d3532af1) Thanks [@JeanRemiDelteil](https://github.com/JeanRemiDelteil)! - Do not add readonly on Typescript enum when the --immutable option is used.
989
+
990
+ ## 6.7.0
991
+
992
+ ### Minor Changes
993
+
994
+ - [#1355](https://github.com/openapi-ts/openapi-typescript/pull/1355) [`7568941`](https://github.com/openapi-ts/openapi-typescript/commit/7568941fb378a9b94c96754553a720093645dd64) Thanks [@drwpow](https://github.com/drwpow)! - Revert optional parameters breaking change (v6.6.0, #1335)
995
+
996
+ ## 6.6.2
997
+
998
+ ### Patch Changes
999
+
1000
+ - [#1348](https://github.com/openapi-ts/openapi-typescript/pull/1348) [`f6fdd2f`](https://github.com/openapi-ts/openapi-typescript/commit/f6fdd2f59d035fec22f7fee27136939faae4628b) Thanks [@drwpow](https://github.com/drwpow)! - Improve YAML vs JSON parsing
1001
+
1002
+ - [#1352](https://github.com/openapi-ts/openapi-typescript/pull/1352) [`33b2c4f`](https://github.com/openapi-ts/openapi-typescript/commit/33b2c4f6d9f8d2a1bd42b13b3c8c168ed86609d6) Thanks [@drwpow](https://github.com/drwpow)! - Fix all parameters optional
1003
+
1004
+ - [#1345](https://github.com/openapi-ts/openapi-typescript/pull/1345) [`6f078c1`](https://github.com/openapi-ts/openapi-typescript/commit/6f078c1eb008a278858e6764e92af6ceb39922b4) Thanks [@SchabaJo](https://github.com/SchabaJo)! - Mirror directory structure of input files if output is a directory to prevent overwriting the same file again and again.
1005
+
1006
+ ## 6.6.1
1007
+
1008
+ ### Patch Changes
1009
+
1010
+ - [#1342](https://github.com/openapi-ts/openapi-typescript/pull/1342) [`c17669d`](https://github.com/openapi-ts/openapi-typescript/commit/c17669dbee47af49136bea3c40e12009e92cd81b) Thanks [@drwpow](https://github.com/drwpow)! - Fix discriminator propertyName inference
1011
+
1012
+ ## 6.6.0
1013
+
1014
+ ### Minor Changes
1015
+
1016
+ - [#1335](https://github.com/openapi-ts/openapi-typescript/pull/1335) [`7cb02ac`](https://github.com/openapi-ts/openapi-typescript/commit/7cb02acbcf57946b8202b9598a888454f09f81fa) Thanks [@duncanbeevers](https://github.com/duncanbeevers)! - Request parameters member is optional when all parameters are optional.
1017
+
1018
+ ## 6.5.5
1019
+
1020
+ ### Patch Changes
1021
+
1022
+ - [#1332](https://github.com/openapi-ts/openapi-typescript/pull/1332) [`8e8ebfd`](https://github.com/openapi-ts/openapi-typescript/commit/8e8ebfdcd84ff6a3d7b6f5d00695fc11366b436e) Thanks [@drwpow](https://github.com/drwpow)! - Restore original .d.ts module-resolution behavior
1023
+
1024
+ ## 6.5.4
1025
+
1026
+ ### Patch Changes
1027
+
1028
+ - [#1324](https://github.com/openapi-ts/openapi-typescript/pull/1324) [`0357325`](https://github.com/openapi-ts/openapi-typescript/commit/0357325ae136cbdd9c9891ebb7f5414e3ad8bfec) Thanks [@drwpow](https://github.com/drwpow)! - Fix accidental quote appearing in components/responses with $refs
1029
+
1030
+ ## 6.5.3
1031
+
1032
+ ### Patch Changes
1033
+
1034
+ - [#1320](https://github.com/openapi-ts/openapi-typescript/pull/1320) [`3cf78b9`](https://github.com/openapi-ts/openapi-typescript/commit/3cf78b920ab23624c0524e0d58338ee66acad799) Thanks [@duncanbeevers](https://github.com/duncanbeevers)! - Wrap nested readonly types in parentheses, allowing for nested immutable arrays
1035
+
1036
+ ## 6.5.2
1037
+
1038
+ ### Patch Changes
1039
+
1040
+ - [#1317](https://github.com/openapi-ts/openapi-typescript/pull/1317) [`5e054db`](https://github.com/openapi-ts/openapi-typescript/commit/5e054dbc0984198c7f89e29b6f38e9d60790cafb) Thanks [@drwpow](https://github.com/drwpow)! - Fix JSONSchema $defs
1041
+
1042
+ - [#1317](https://github.com/openapi-ts/openapi-typescript/pull/1317) [`5e054db`](https://github.com/openapi-ts/openapi-typescript/commit/5e054dbc0984198c7f89e29b6f38e9d60790cafb) Thanks [@drwpow](https://github.com/drwpow)! - Improve remote $ref parsing
1043
+
1044
+ ## 6.5.1
1045
+
1046
+ ### Patch Changes
1047
+
1048
+ - [#1308](https://github.com/openapi-ts/openapi-typescript/pull/1308) [`ebb73b6`](https://github.com/openapi-ts/openapi-typescript/commit/ebb73b68c3a2f9a8c8193888735f9c0b7855722f) Thanks [@drwpow](https://github.com/drwpow)! - Fix bugs with remote $refs, add `cwd` option for JSON schema parsing
1049
+
1050
+ ## 6.5.0
1051
+
1052
+ ### Minor Changes
1053
+
1054
+ - [#1295](https://github.com/openapi-ts/openapi-typescript/pull/1295) [`99a1648`](https://github.com/openapi-ts/openapi-typescript/commit/99a1648affd5731c2d303619f050fee2ed834eef) Thanks [@pvanagtmaal](https://github.com/pvanagtmaal)! - Avoid adding a undefined union to additionProperties
1055
+
1056
+ ## 6.4.5
1057
+
1058
+ ### Patch Changes
1059
+
1060
+ - [#1280](https://github.com/openapi-ts/openapi-typescript/pull/1280) [`50441d0`](https://github.com/openapi-ts/openapi-typescript/commit/50441d048b8724d1ec31d20a1583c8748b7ddc99) Thanks [@pvanagtmaal](https://github.com/pvanagtmaal)! - Fix invalid typescript for empty request bodies, fix headers being left out when response body is omitted
1061
+
1062
+ - [#1289](https://github.com/openapi-ts/openapi-typescript/pull/1289) [`7f452fa`](https://github.com/openapi-ts/openapi-typescript/commit/7f452fa00044c7191c2721b6691178158f97940f) Thanks [@adamschoenemann](https://github.com/adamschoenemann)! - Fixed a bug where references to types with discriminators with implicit mappings would generate incorrect types
1063
+
1064
+ ## 6.4.4
1065
+
1066
+ ### Patch Changes
1067
+
1068
+ - [#1281](https://github.com/openapi-ts/openapi-typescript/pull/1281) [`ebd31ff`](https://github.com/openapi-ts/openapi-typescript/commit/ebd31ff3d143dbe8e4d91a4ba18b110ff6656dd0) Thanks [@pvanagtmaal](https://github.com/pvanagtmaal)! - Refactor CLI path handling, fixing several bugs
1069
+
1070
+ ## 6.4.3
1071
+
1072
+ ### Patch Changes
1073
+
1074
+ - [#1287](https://github.com/openapi-ts/openapi-typescript/pull/1287) [`8a9d8ed`](https://github.com/openapi-ts/openapi-typescript/commit/8a9d8ede95802370c4015846a4856fd0701ada33) Thanks [@drwpow](https://github.com/drwpow)! - Fix oneOf handling with empty object parent type
1075
+
1076
+ ## 6.4.2
1077
+
1078
+ ### Patch Changes
1079
+
1080
+ - [#1278](https://github.com/openapi-ts/openapi-typescript/pull/1278) [`d7420e3`](https://github.com/openapi-ts/openapi-typescript/commit/d7420e30f1697ad8cfc0fdefc93127ad2b813f99) Thanks [@pvanagtmaal](https://github.com/pvanagtmaal)! - Fix externalizing external refs
1081
+
1082
+ ## 6.4.1
1083
+
1084
+ ### Patch Changes
1085
+
1086
+ - [#1269](https://github.com/openapi-ts/openapi-typescript/pull/1269) [`e735ff2`](https://github.com/openapi-ts/openapi-typescript/commit/e735ff2b9307eaec1959d0d3bf733a240a880c48) Thanks [@pimveldhuisen](https://github.com/pimveldhuisen)! - Stop trimming whitespace other than linebreaks in string values
1087
+
1088
+ ## 6.4.0
1089
+
1090
+ ### Minor Changes
1091
+
1092
+ - [#1263](https://github.com/openapi-ts/openapi-typescript/pull/1263) [`1bf2d4d`](https://github.com/openapi-ts/openapi-typescript/commit/1bf2d4db73b93fd1d36ffb56bdfb90321b0bfaba) Thanks [@drwpow](https://github.com/drwpow)! - Ship CJS bundle
1093
+
1094
+ ## 6.3.9
1095
+
1096
+ ### Patch Changes
1097
+
1098
+ - [#1248](https://github.com/openapi-ts/openapi-typescript/pull/1248) [`c145f5f`](https://github.com/openapi-ts/openapi-typescript/commit/c145f5f6164b52a8b437b2e944f60927d546edbf) Thanks [@drwpow](https://github.com/drwpow)! - Fix Record<string, never> appearing in union
1099
+
1100
+ - [#1248](https://github.com/openapi-ts/openapi-typescript/pull/1248) [`c145f5f`](https://github.com/openapi-ts/openapi-typescript/commit/c145f5f6164b52a8b437b2e944f60927d546edbf) Thanks [@drwpow](https://github.com/drwpow)! - Improve oneOf generated types
1101
+
1102
+ ## 6.3.8
1103
+
1104
+ ### Patch Changes
1105
+
1106
+ - [#1246](https://github.com/openapi-ts/openapi-typescript/pull/1246) [`17a375e`](https://github.com/openapi-ts/openapi-typescript/commit/17a375ec5d13b89f526a63f6d9b9f15db85b75e9) Thanks [@drwpow](https://github.com/drwpow)! - Fix remote path item object $refs
1107
+
1108
+ ## 6.3.7
1109
+
1110
+ ### Patch Changes
1111
+
1112
+ - [#1236](https://github.com/openapi-ts/openapi-typescript/pull/1236) [`95a4c8c`](https://github.com/openapi-ts/openapi-typescript/commit/95a4c8c573c8eea2c911359879419eb07e10bd63) Thanks [@drwpow](https://github.com/drwpow)! - Improve oneOf and enum handling
1113
+
1114
+ ## 6.3.6
1115
+
1116
+ ### Patch Changes
1117
+
1118
+ - [#1231](https://github.com/openapi-ts/openapi-typescript/pull/1231) [`e1ce2d6`](https://github.com/openapi-ts/openapi-typescript/commit/e1ce2d67a5350ff2871ae01503df2280454b7a80) Thanks [@tkrotoff](https://github.com/tkrotoff)! - Do not append trailing spaces to JSDoc tags
1119
+
1120
+ - [#1232](https://github.com/openapi-ts/openapi-typescript/pull/1232) [`31c030d`](https://github.com/openapi-ts/openapi-typescript/commit/31c030d5f1bf2739dbc146e42372cf9aec922f93) Thanks [@tkrotoff](https://github.com/tkrotoff)! - Remove unnecessary array parenthesis
1121
+
1122
+ ## 6.3.5
1123
+
1124
+ ### Patch Changes
1125
+
1126
+ - [#1228](https://github.com/openapi-ts/openapi-typescript/pull/1228) [`3107f1e`](https://github.com/openapi-ts/openapi-typescript/commit/3107f1edb9119397fca3e34aeda4def3555c0811) Thanks [@m-ronchi](https://github.com/m-ronchi)! - Fix boolean JSON Schemas
1127
+
1128
+ ## 6.3.4
1129
+
1130
+ ### Patch Changes
1131
+
1132
+ - [#1221](https://github.com/openapi-ts/openapi-typescript/pull/1221) [`4e96e9d`](https://github.com/openapi-ts/openapi-typescript/commit/4e96e9dcb845adc501d7256c3c3c9c30c8c6d99d) Thanks [@drwpow](https://github.com/drwpow)! - Remove OneOf<> helper for simple type comparisons
1133
+
1134
+ - [#1221](https://github.com/openapi-ts/openapi-typescript/pull/1221) [`4e96e9d`](https://github.com/openapi-ts/openapi-typescript/commit/4e96e9dcb845adc501d7256c3c3c9c30c8c6d99d) Thanks [@drwpow](https://github.com/drwpow)! - Fix 3.1 nullable types
1135
+
1136
+ ## 6.3.3
1137
+
1138
+ ### Patch Changes
1139
+
1140
+ - [#1200](https://github.com/openapi-ts/openapi-typescript/pull/1200) [`4fc8c20`](https://github.com/openapi-ts/openapi-typescript/commit/4fc8c20c079e81c600ecffffd90fc9c77c11d49e) Thanks [@toomuchdesign](https://github.com/toomuchdesign)! - Remove unexpected empty string in generated nullable polymophic enum types (["string", "null"])
1141
+
1142
+ ## 6.3.2
1143
+
1144
+ ### Patch Changes
1145
+
1146
+ - [#1212](https://github.com/openapi-ts/openapi-typescript/pull/1212) [`e173ccf`](https://github.com/openapi-ts/openapi-typescript/commit/e173ccf0d92fd4b54cb2dec54056f4647cbadc83) Thanks [@drwpow](https://github.com/drwpow)! - Fix bug with remote schema $refs
1147
+
1148
+ ## 6.3.1
1149
+
1150
+ ### Patch Changes
1151
+
1152
+ - [#1207](https://github.com/openapi-ts/openapi-typescript/pull/1207) [`914e049`](https://github.com/openapi-ts/openapi-typescript/commit/914e049573218b1bf791ce7855cdb1022bedc2b2) Thanks [@drwpow](https://github.com/drwpow)! - Fall back to TypeScript unions for long oneOf lists
1153
+
1154
+ ## 6.3.0
1155
+
1156
+ ### Minor Changes
1157
+
1158
+ - [#1205](https://github.com/openapi-ts/openapi-typescript/pull/1205) [`c753f7b`](https://github.com/openapi-ts/openapi-typescript/commit/c753f7b27a93bb963d8b762b8faa785025aa9135) Thanks [@drwpow](https://github.com/drwpow)! - Add prefixItems support
1159
+
1160
+ ### Patch Changes
1161
+
1162
+ - [#1203](https://github.com/openapi-ts/openapi-typescript/pull/1203) [`902fde1`](https://github.com/openapi-ts/openapi-typescript/commit/902fde156a55f2f0f4889680cea3605cc9d137b4) Thanks [@drwpow](https://github.com/drwpow)! - Fix mutating $refs in Node.js API
1163
+
1164
+ ## 6.2.9
1165
+
1166
+ ### Patch Changes
1167
+
1168
+ - [#1193](https://github.com/openapi-ts/openapi-typescript/pull/1193) [`64decb7`](https://github.com/openapi-ts/openapi-typescript/commit/64decb7243e3f4962dd3a97378f37142ee89546a) Thanks [@psychedelicious](https://github.com/psychedelicious)! - Add example for `Blob` type transforms
1169
+
1170
+ ## 6.2.8
1171
+
1172
+ ### Patch Changes
1173
+
1174
+ - [#1166](https://github.com/openapi-ts/openapi-typescript/pull/1166) [`db37f3c`](https://github.com/openapi-ts/openapi-typescript/commit/db37f3ca2993a3d7e7cf580273452c21a68c503d) Thanks [@pvanagtmaal](https://github.com/pvanagtmaal)! - Fix property escaping for discriminators
1175
+
1176
+ ## 6.2.7
1177
+
1178
+ ### Patch Changes
1179
+
1180
+ - [#1149](https://github.com/openapi-ts/openapi-typescript/pull/1149) [`b82cffb`](https://github.com/openapi-ts/openapi-typescript/commit/b82cffbc6c3fc0da9a24d9b90b303dcb2dd71c62) Thanks [@duncanbeevers](https://github.com/duncanbeevers)! - Stringify const values with no specified type
1181
+
1182
+ - [#1156](https://github.com/openapi-ts/openapi-typescript/pull/1156) [`ad017a9`](https://github.com/openapi-ts/openapi-typescript/commit/ad017a9ac2dc5b01726267fca9418b311fe91896) Thanks [@horaklukas](https://github.com/horaklukas)! - Avoid index signature TS error for paths with empty params
1183
+
1184
+ ## 6.2.6
1185
+
1186
+ ### Patch Changes
1187
+
1188
+ - [#1146](https://github.com/openapi-ts/openapi-typescript/pull/1146) [`12aa721`](https://github.com/openapi-ts/openapi-typescript/commit/12aa7212fbe09efd0fe89dca18713145e8da9c8e) Thanks [@drwpow](https://github.com/drwpow)! - Fix js-yaml $refs
1189
+
1190
+ ## 6.2.5
1191
+
1192
+ ### Patch Changes
1193
+
1194
+ - 7d09c3b: Support nested path parameters in `--path-params-as-types` (#1130). Thanks, [barakalon](https://github.com/barakalon)!
1195
+
1196
+ ## 6.2.4
1197
+
1198
+ ### Patch changes
1199
+
1200
+ - Fix remote `$ref`s to complete schemas (#1087)
1201
+ - Fix incorrect check for protocol by [@happycollision](https://github.com/happycollision) (#1088)
1202
+ - Fix missing parameters in operation object (#1090)
1203
+
1204
+ ## 6.2.3
1205
+
1206
+ ### Patch changes
1207
+
1208
+ - Fix tuples type generation by [@liangskyli](https://github.com/liangskyli) (#1085)
1209
+
1210
+ ## 6.2.2
1211
+
1212
+ ### Patch changes
1213
+
1214
+ - Fix path generation by [@HiiiiD](https://github.com/HiiiiD) (#991)
1215
+ - If no type is specified, type as `unknown` by [@mitchell-merry](https://github.com/mitchell-merry) (#1049)
1216
+ - Ensure not required parameters are created as optional properties by [@AplusKminus](https://github.com/AplusKminus) (#1053)
1217
+ - Fix missing type defs (#1072)
1218
+ - Deduplicate unions by [@mitchell-merry](https://github.com/mitchell-merry) (#1069)
1219
+ - Fix tuples type generation support by [@liangskyli](https://github.com/liangskyli) (#1011)
1220
+
1221
+ ## 6.2.1
1222
+
1223
+ ### Patch changes
1224
+
1225
+ - Fix `$ref`’d parameters missing (#1061)
1226
+ - Fix `oneOf` number const (#1056) by [@qnp](https://github.com/qnp)
1227
+
1228
+ ## 6.2.0
1229
+
1230
+ ### Minor changes
1231
+
1232
+ - New `--empty-objects-unknown` flag for better control over unspecified object types’ default shape by [@duncanbeevers](https://github.com/duncanbeevers) (#1032)
1233
+
1234
+ ### Patch changes
1235
+
1236
+ - JSDoc improvements by [@mitchell-merry](https://github.com/mitchell-merry) (#1029)
1237
+ - Fix readonly nullable properties by [@mtth](https://github.com/mtth) (#1036)
1238
+ - Tiny QoL improvements to invalid schema errors (#1043)
1239
+
1240
+ ## 6.1.1
1241
+
1242
+ ### Patch changes
1243
+
1244
+ - Fix response key for HTTP ranges (#1010) [@stefanmaric](https://github.com/stefanmaric)
1245
+ - Escape constant string in generated schema (#1014) [@mvdbeek](https://github.com/mvdbeek)
1246
+ - Support fully-qualified refs as discriminator mapping values (#1017) [@sgrimm](https://github.com/sgrimm)
1247
+ - Improve behavior of allOf + required properties (#1027) [@Swiftwork](https://github.com/Swiftwork)
1248
+ - Make params non-nullable even if all params are optional (#1022) [@sgrimm](https://github.com/sgrimm)
1249
+
1250
+ ## 6.1.0
1251
+
1252
+ ### Minor changes
1253
+
1254
+ - Adds `webhook` typings by [@yacinehmito](https://github.com/yacinehmito) (#1001)
1255
+ - Use undici’s `fetch()` instead of `request()` which can be overridden locally by [@yacinehmito](https://github.com/yacinehmito) (#1002)
1256
+ - Adds type helpers only when used by [@imagoiq](https://github.com/imagoiq) (#992)
1257
+
1258
+ ### Patch changes
1259
+
1260
+ - Fixes bug in glob output by [@BTMPL](https://github.com/BTMPL) (#999)
1261
+ - Fixes header casing by [@HiiiiD](https://github.com/HiiiiD) (#990)
1262
+ - Fixed multiple causes of bug #988 “cannot read properties of undefined” by [@HiiiiD](https://github.com/HiiiiD) and [@yacinehmito](https://github.com/yacinehmito) (#990 and #1002)
1263
+
1264
+ ## 6.0.3
1265
+
1266
+ ### Patch changes
1267
+
1268
+ - Fixed `nullable: true` (#983)
1269
+ - Fixed `additionalProperties` bug (#983)
1270
+
1271
+ ## 6.0.2
1272
+
1273
+ ### Patch changes
1274
+
1275
+ - Fixes #975 where `#/components/examples` were being parsed as schema objects
1276
+
1277
+ ## 6.0.1
1278
+
1279
+ ### Patch changes
1280
+
1281
+ - Remove `postinstall` hook only meant for dev
1282
+
1283
+ ## 6.0.0
1284
+
1285
+ ## ⚠️ Breaking changes
1286
+
1287
+ - Dropped Prettier formatting and all formatting options. Now, simply format at your discretion (or not at all!)
1288
+ - Dropped support for Swagger 2.0
1289
+ - Dropped Node 14 support (it still works for now, but Node 14 bugs won’t be fixed if any arise)
1290
+ - `--version` was changed to return the version of this library (also by dropping Swagger 2.0 support the old usage was no longer needed)
1291
+ - Dropped `--raw-schema`. Your entry schema MUST be valid and complete (however, your $refs to subschemas may be partials).
1292
+ - Dropped `--make-paths-enum` because it was incompatible with `--path-params-as-types`
1293
+ - Dropped the CLI aliases `-it` and `-ap` (specify the full -`-immutable-types` or `--additional-properties` flag)
1294
+ - Empty content: `{}` now returns `never`. Dropped the `--content-never` flag as this is now the default behavior.
1295
+ - Renamed and upgraded the Node API’s `formatter()` function to `transform()` and `postTransform()`. It’s an overall improvement on the original concept with even more power than before.
1296
+
1297
+ ### Major changes
1298
+
1299
+ - Sped up type generation by **3×** by dropping Prettier & optimizing deep-object crawl speed
1300
+ - OpenAPI 3.1 support for `discriminator` and polymorphic types
1301
+ - Complete codebase rewrite and cleanup
1302
+ - Now ships modern ESNext code rather than ES2018
1303
+ - Improved internal types & documentation
1304
+ - Test cleanup, now powered by Vitest
1305
+ - New `transform()` and `postTransform()` hooks give you more control in overriding/extending generated types
1306
+
1307
+ ### Minor changes
1308
+
1309
+ - More accurate types for `oneOf` / `anyOf` / `allOf` (#894)
1310
+ - `--immutable-types` has a new `-t` alias
1311
+ - Addition of path.default types
1312
+ - Support `nullable` as type arrays for OpenAPI 3.1 (#898)
1313
+
1314
+ ### Patch changes
1315
+
1316
+ - Fixed multiple bugs with deep-linked remote schemas and complex `$ref`s
1317
+ - Fixed `anyOf` intersections resulting in unexpected type signatures
1318
+ - Fixed `[string, null]` generating as `unknown`
1319
+ - Fixed `{ property: unknown; }` with `allOf` union
1320
+ - Fixed `requestBody` missing `content` property
1321
+ - Fixed headers missing remote `$ref`s
1322
+
1323
+ ## 5.4.0
1324
+
1325
+ ### Minor changes
1326
+
1327
+ - New `--content-never` flag forces never response body by [@duncanbeevers](https://github.com/duncanbeevers) (#905)
1328
+
1329
+ ### Patch changes
1330
+
1331
+ - Empty strings are now allowed for properties like `@default` by [@duncanbeevers](https://github.com/duncanbeevers) (#906)
1332
+ - Throws friendlier error on bad `--prettier-config` path by [@duncanbeevers](https://github.com/duncanbeevers) (#909)
1333
+ - Objects are now allowed for properties like `@default` by [@duncanbeevers](https://github.com/duncanbeevers) (#910)
1334
+ - Fixes `enum` export of operation paths by [@duncanbeevers](https://github.com/duncanbeevers) (#912)
1335
+
1336
+ ## 5.3.0
1337
+
1338
+ ### Minor changes
1339
+
1340
+ - New `--make-paths-enum` CLI flag by [@berzi](https://github.com/berzi) (#883)
1341
+ - New `--path-params-as-types` CLI flag by [@Powell-v2](https://github.com/Powell-v) (#891)
1342
+ - Supports `/** @constant */` JSDoc comments by [@PhilipTrauner](https://github.com/PhilipTrauner) (#896)
1343
+ - You can now add your own custom comment header at the top of every generated doc (#904)
1344
+
1345
+ ### Patch changes
1346
+
1347
+ - Fixes inconsistent comment title (#904)
1348
+
1349
+ ## 5.2.0
1350
+
1351
+ ### Minor changes
1352
+
1353
+ - The `--export-type` flag was added to generate type instead of interface by [@dominikdosoudil](https://github.com/dominikdosoudil) (#868)
1354
+ - Updated schemas & examples
1355
+
1356
+ ### Patch changes
1357
+
1358
+ - Tiny optimizations for a little speed boost (#881)
1359
+ - Fixes CommonJS error for undici on older versions of Node (#879)
1360
+
1361
+ ## 5.1.1
1362
+
1363
+ ### Patch changes
1364
+
1365
+ - Removes CJS version from npm (to use CJS, use `openapi-typescript@4`). Version 5 switched to ESM as default anyway, and since tests are now testing ESM, the reliability of CJS was dubious (and there were TypeScript problems as well)
1366
+ - Fixes type error when using TypeScript nightly (#847)
1367
+ - Patches [security vulnerability with node-fetch](https://security.snyk.io/vuln/SNYK-JS-NODEFETCH-2342118) (by replacing with [undici](https://undici.nodejs.org/#/))
1368
+
1369
+ ## 5.1.0
1370
+
1371
+ ### Minor changes
1372
+
1373
+ - Adds constants support by [@sadfsdfdsa](https://github.com/sadfsdfdsa) (#831)
1374
+
1375
+ ### Patch changes
1376
+
1377
+ - Fixes a syntax error caused by an empty `oneOf` by [@sadfsdfdsa](https://github.com/sadfsdfdsa) (#830)
1378
+
1379
+ ## 5.0.1
1380
+
1381
+ ### Patch changes
1382
+
1383
+ - Adds missing types for CJS build (#861)
1384
+
1385
+ ## 5.0.0
1386
+
1387
+ ### ⚠️ Breaking changes
1388
+
1389
+ - 5.x drops support for Node 12. If you’re still on Node 12, be sure to lock your version to 4.x.
1390
+
1391
+ ### Major changes
1392
+
1393
+ - Updates this library to full ESM! ✨ This is the future of JavaScript, and is now natively supported in Node 14+.
1394
+
1395
+ ### Minor changes
1396
+
1397
+ - Now supports a `URL()` as input to make ESM usage easier ([see example](https://github.com/openapi-ts/openapi-typescript/tree/5.x#-node))
1398
+
1399
+ ## 4.5.0
1400
+
1401
+ ### Minor changes
1402
+
1403
+ - Significantly-enhanced JSDoc output by [@sadfsdfdsa](https://github.com/sadfsdfdsa) (#797)
1404
+
1405
+ ## 4.4.0
1406
+
1407
+ ### Minor changes
1408
+
1409
+ - Adds TypeScript `@deprecated` comment to deprecated schema objects by [@bunkscene](https://github.com/bunkscene)
1410
+
1411
+ ## 4.3.0
1412
+
1413
+ ### Minor changes
1414
+
1415
+ - In many areas, changed out `any` with `unknown` (#769). See #554 for more explanation / context
1416
+
1417
+ ### Patch changes
1418
+
1419
+ - An old bug is now gone! openapi-typescript would incorrectly generate `{ [key: string]: unknown }` for a type when it may have been a `string` or `number`. Now it will generate a more generic `unknown` type, unless it knows it’s dealing with an object for sure.
1420
+
1421
+ ## 4.2.0
1422
+
1423
+ ### Minor changes
1424
+
1425
+ - Reference arbitrary data on generated types via the `properties` key by [@Peteck](https://github.com/Peteck) (#626)
1426
+
1427
+ ## 4.1.1
1428
+
1429
+ ### Patch changes
1430
+
1431
+ - Fixes the remote schema URL cache being too long-lived by [@mbelsky](https://github.com/mbelsky) (#708)
1432
+
1433
+ ## 4.1.0
1434
+
1435
+ ### Minor changes
1436
+
1437
+ - New `--headersObject` and `--headers` CLI flags by [@ericzorn93](https://github.com/ericzorn93) (#764)
1438
+
1439
+ ### Patch changes
1440
+
1441
+ - `"type": "file"` no longer generates unexpected results (#766)
1442
+
1443
+ ## 4.0.2
1444
+
1445
+ ### Patch changes
1446
+
1447
+ - Loading in-memory schemas through the JS API resulted in broken `$ref`s (#689)
1448
+
1449
+ ## 4.0.1
1450
+
1451
+ ### Patch changes
1452
+
1453
+ - Fixes `properties` + `anyOf` with only `required` properties by [@gr2m](https://github.com/gr2m) (#643)
1454
+
1455
+ ## 4.0.0
1456
+
1457
+ ### ⚠️ Breaking changes
1458
+
1459
+ - The Node.js API now returns a promise, and can no longer be run synchronously (a necessity because resolving remote schemas can never be synchronous). Other than that, there are no other breaking changes. CLI users are unaffected, and the types generated are backwards-compatible with previous versions.
1460
+
1461
+ ### Major changes
1462
+
1463
+ - Now supports remote references (`$ref: "remote.yaml#/components/schemas/User`) 🎉 (#602)!
1464
+
1465
+ ## 3.4.1
1466
+
1467
+ ### Patch changes
1468
+
1469
+ - Fix glob accidentally generating empty folders alongside single-file schemas (#633)
1470
+
1471
+ ## 3.4.0
1472
+
1473
+ ### Minor changes
1474
+
1475
+ - Adds glob support thanks to [@sharmarajdaksh](https://github.com/sharmarajdaksh) (#615)
1476
+ - Reverts #613 and adds a `--default-non-nullable` flag (#631)
1477
+
1478
+ ## 3.3.1
1479
+
1480
+ ### Patch changes
1481
+
1482
+ - Schema objects that have a `default:` property shouldn’t be marked as nullable (#613)
1483
+
1484
+ ## 3.3.0
1485
+
1486
+ ### Minor changes
1487
+
1488
+ - Changes default behavior of #585 to require an opt-in `--additional-properties` flag (#607)
1489
+ - Adds `-c` shortcut alias for `--prettier-config` (#607)
1490
+ - Adds `-it` shortcut alias for `--immutable-types` (#607)
1491
+
1492
+ ## 3.2.4
1493
+
1494
+ ### Patch changes
1495
+
1496
+ - `additionalProperties` now default to `true` per the OpenAPI 3.0 spec by [@mehalter](https://github.com/mehalter) (#583)
1497
+
1498
+ ## 3.2.3
1499
+
1500
+ ### Patch changes
1501
+
1502
+ - Fixed a parse error on `enum: []` (#563)
1503
+ - Fixed another parse error on responses missing schemas (#565)
1504
+ - Fixed a bug with the latest version of Prettier and `options.prettierConfig` (#566)
1505
+
1506
+ ## 3.2.2
1507
+
1508
+ ### Patch changes
1509
+
1510
+ - RequestBodies that had hyphens in their name would generate an error (#550). Thanks (again), [@ashsmith](https://github.com/ashsmith)!
1511
+
1512
+ ## 3.2.1
1513
+
1514
+ ### Patch changes
1515
+
1516
+ - Fixed an issue where a comment within a schema definition would break type gen (#548). Thanks, [@ashsmith](https://github.com/ashsmith)!
1517
+
1518
+ ## 3.2.0
1519
+
1520
+ ### Minor changes
1521
+
1522
+ - Added a new `--immutable-types` flag by [@dnalborczyk](https://github.com/dnalborczyk) (#522)
1523
+
1524
+ ### Patch changes
1525
+
1526
+ - The `operations` interface inherits parameters properly by [@henhal](https://github.com/henhal) (#530)
1527
+
1528
+ ## 3.1.2
1529
+
1530
+ ### Patch changes
1531
+
1532
+ - Fixes package types for TypeScript projects (#520)
1533
+
1534
+ ## 3.1.1
1535
+
1536
+ ### Patch changes
1537
+
1538
+ - Better handles remote schema content types (#516)
1539
+
1540
+ ## 3.1.0
1541
+
1542
+ ### Minor changes
1543
+
1544
+ - Remote schema loading now follows redirects (#510)
1545
+ - New `--auth` flag to access private schemas (#508)
1546
+ - npm version now ships with ESM [package exports](https://nodejs.org/api/packages.html#packages_package_entry_points) for better interop between ESM & CommonJS (#509)
1547
+
1548
+ ### Patch changes
1549
+
1550
+ - Fixes an OpenAPI V2 parameter bug by [@yamacent](https://github.com/yamacent) (#489)
1551
+
1552
+ ## 3.0.4
1553
+
1554
+ ### Patch changes
1555
+
1556
+ - If using OpenAPI 2.0, and you didn’t have `definitions`, an unexpected error was encountered. This is now fixed.
1557
+
1558
+ ## 3.0.3
1559
+
1560
+ ### Patch changes
1561
+
1562
+ - Improves handling of complex `oneOf` by [@gr2m](https://github.com/gr2m) (#491)
1563
+
1564
+ ## 3.0.2
1565
+
1566
+ ### Patch changes
1567
+
1568
+ - Fixed `requestBodies` transform by [@radist2s](https://github.com/radist2s) (#474)
1569
+ - Fixed enum bug containing `null` by [@FedeBev](https://github.com/FedeBev) (#492)
1570
+
1571
+ ## 3.0.1
1572
+
1573
+ ### Patch changes
1574
+
1575
+ - Fixed generation bug where responseBodies that contained both a `$ref` and `operationId` generated invalid TypeScript (#464)
1576
+
1577
+ ## 3.0.0
1578
+
1579
+ ### Major changes
1580
+
1581
+ - This is marked as a breaking version for safety. Swagger v2 users should be able to migrate to `3.0.0` with no problems; OpenAPI v3 users will either experience no changes or minor changes that should be an overall improvement.
1582
+
1583
+ ### Minor changes
1584
+
1585
+ - Adds long-requested paths support to Swagger v2 schemas
1586
+ - Adds more compact comments, resulting more readable generated types
1587
+
1588
+ ### Patch changes
1589
+
1590
+ - Fixes bugs in paths generation (missing $refs support in areas, inconsistent generation)
1591
+
1592
+ ## 2.5.0
1593
+
1594
+ ### Minor changes
1595
+
1596
+ - Comments can now be single-line, saving some needed space in the specs (#443)
1597
+
1598
+ ### Patch changes
1599
+
1600
+ - `additionalProperties.oneOf` is now generating as expected (#442)
1601
+
1602
+ ## 2.4.2
1603
+
1604
+ ### Patch changes
1605
+
1606
+ - Fixes `paths.requestBody.content` possibly missing by [@robertmassaioli](https://github.com/robertmassaioli) (#369)
1607
+ - Fix: check if path item is method operation by [@rendall](https://github.com/rendall) (#366)
1608
+
1609
+ ## 2.4.1
1610
+
1611
+ ### Patch changes
1612
+
1613
+ - escape quotes in enum string values by [@gr2m](https://github.com/gr2m) (#365)
1614
+
1615
+ ## 2.4.0
1616
+
1617
+ ### Minor changes
1618
+
1619
+ - Add `operations` interface by [@gr2m](https://github.com/gr2m) (#353)
1620
+
1621
+ ## 2.3.4
1622
+
1623
+ ### Patch changes
1624
+
1625
+ - Allow `$ref: 'foo.yaml#bar'` syntax, but cast to `any` type (TODO: full external schema support) (#354)
1626
+
1627
+ ## 2.3.3
1628
+
1629
+ ### Patch changes
1630
+
1631
+ - `$refs` in paths now respect optional parameters (#352) by [@gr2m](https://github.com/gr2m)
1632
+
1633
+ ## 2.3.2
1634
+
1635
+ ### Patch changes
1636
+
1637
+ - Handle parameters on paths as well as methods by [@samdbmg](https://github.com/samdbmg) (#347)
1638
+
1639
+ ## 2.3.1
1640
+
1641
+ ### Patch changes
1642
+
1643
+ - Set index type to all possible values (#348)
1644
+
1645
+ ## 2.3.0
1646
+
1647
+ ### Minor changes
1648
+
1649
+ - `requestBody` and `$ref`-type parameters added in response types by [@gr2m](https://github.com/gr2m)
1650
+
1651
+ 🐣 Minor Changes
1652
+
1653
+ - responses without content schemas changed from `any` to `never` or `unknown` by [@gr2m](https://github.com/gr2m)
1654
+
1655
+ ## 2.2.0
1656
+
1657
+ ### Minor changes
1658
+
1659
+ - New name! Now published at `openapi-typescript`.
1660
+ - Added paths support (#328)
1661
+
1662
+ ## 2.1.0
1663
+
1664
+ ### Minor changes
1665
+
1666
+ - Support for components.responses (#258)
1667
+ - Adds tuple support (#293)
1668
+
1669
+ ### Patch changes
1670
+
1671
+ - Fix missing port bug (#252)
1672
+ - additionalProperties interpolation, primitive enums (#266)
1673
+ - bubble up the error message / improve error message when failing to parse the schema (#269)
1674
+ - Improve error message when server is unreachable (#288)
1675
+
1676
+ ## 2.0.0
1677
+
1678
+ ### Major changes
1679
+
1680
+ - OpenAPI 3.0 support (#223)
1681
+ - Schema names are no longer transformed (e.g. `UserRole` is now `definitions['user']['role']`). See README for migration instructions. (#223)
1682
+ - Flags with “deprecated” warnings in `1.x` were dropped and no longer work (#223)
1683
+
1684
+ ### Minor changes
1685
+
1686
+ - Adds support for JSDoc comments (#223)
1687
+ - Support for null values (#223)
1688
+ - Improves Prettier config resolution (#224)
1689
+ - Improves array and object handling (#226)
1690
+
1691
+ ## 1.7.1
1692
+
1693
+ ### Patch changes
1694
+
1695
+ - Now handles the `@` character in namespaces thanks to [@sorin-davidoi](https://github.com/sorin-davidoi) 🎉
1696
+ - Updates Prettier to `2.0`
1697
+
1698
+ ## 1.7.0
1699
+
1700
+ ### Minor changes
1701
+
1702
+ - Swagger v3 is no longer unsupported! 🎉 But it’s in beta. Which means errors will probably arise. Please test it out on your existing v3 schema, and file any bugs here.
1703
+ - The `--swagger` flag is now deprecated; this library will automatically parse the version from the schema.
1704
+
1705
+ ### Minor changes
1706
+
1707
+ - Fixes a bug where `additionalProperties` weren’t respected for nested `properties` (#92).
1708
+
1709
+ ## 1.6.2
1710
+
1711
+ - Fixes an issue where `--camelcase` wouldn’t camelCase `$ref`s properly
1712
+
1713
+ ## 1.6.1
1714
+
1715
+ ### Patch changes
1716
+
1717
+ - Fixes a bug where a definition with a missing `type` would be skipped, rather than assume it’s an `object` like Swagger does by default.
1718
+
1719
+ ## 1.6.0
1720
+
1721
+ ### Minor changes
1722
+
1723
+ - Adds Property mapper function (see README) that supports `x-nullable` and other properties by [@atlefren](https://github.com/atlefren) (#118)
1724
+
1725
+ ## 1.5.0
1726
+
1727
+ ### Minor changes
1728
+
1729
+ - Convert names containing spaces to use underscores (#75) thanks to [@svnv](https://github.com/svnv)
1730
+
1731
+ ## 1.4.0
1732
+
1733
+ ### Minor changes
1734
+
1735
+ - Puts out JSDoc thanks to [@lbenie](https://github.com/lbenie)
1736
+
1737
+ ## 1.3.1
1738
+
1739
+ ### Patch changes
1740
+
1741
+ - Fix nested arrays (#54)
1742
+
1743
+ ## 1.3.0
1744
+
1745
+ ### Minor changes
1746
+
1747
+ - The `--nowrapper` flag was added to the CLI, courtesy of [@scvnathan](https://github.com/scvnathan) (#33). Now you don’t have to wrap your interfaces if you don’t want to!
1748
+
1749
+ ## 1.2.2
1750
+
1751
+ ### Patch changes
1752
+
1753
+ - This fixes underscores from accidentally appearing in some TypeScript interface names (#29)
1754
+
1755
+ ## 1.2.1
1756
+
1757
+ ### Patch changes
1758
+
1759
+ - Swagger properties in `kebab-case` would break generation unless they were converted to `--camelcase` (#13). This has been fixed! 🎉 You still have the option of converting to `--camelcase`, but now you can keep `kebab-case` too if needed
1760
+
1761
+ ## 1.2.0
1762
+
1763
+ ### Minor changes
1764
+
1765
+ - Adds `--wrapper` option, letting you specify any namespace or module wrapper for exporting types. See the README for full description
1766
+
1767
+ ### ⚠️ Breaking changes
1768
+
1769
+ - `--namespace` and `--export` options are now deprecated, in favor of the more versatile `--wrapper`
1770
+
1771
+ ## 1.1.3
1772
+
1773
+ ### Patch changes
1774
+
1775
+ - Now supports an `--export` option to export namespaces thanks to [@tpdewolf](https://github.com/tpdewolf)
1776
+
1777
+ ## 1.1.2
1778
+
1779
+ ### Patch changes
1780
+
1781
+ - No longer generates empty interfaces (caused by top-level definitions being array types, referencing other definitions)
1782
+
1783
+ ## 1.1.1
1784
+
1785
+ ### Patch changes
1786
+
1787
+ - Improves enum generation to be simpler-to-use (values are now just hardcoded inline, rather than trying to use TypeScript enums).
1788
+
1789
+ ## 1.1.0
1790
+
1791
+ ### Major changes
1792
+
1793
+ - Changes default behavior to preserve `snake_case` properties (you can still convert with `--camelcase`)
1794
+
1795
+ ### Minor changes
1796
+
1797
+ - Bundles & ships with [@pika/pack](https://github.com/pikapkg/pack)
1798
+
1799
+ ## 0.3.1
1800
+
1801
+ ### Patch changes
1802
+
1803
+ - Falls back to `object` if it can’t grab properties
1804
+
1805
+ ## 0.3.0
1806
+
1807
+ ### Minor changes
1808
+
1809
+ - Different API, now requires `namespace` as 2nd parameter. Because namespacing is good.
1810
+
1811
+ ### Patch changes
1812
+
1813
+ - Maybe a bug; maybe not—if a Swagger spec had a common name like `Error` it would break your build if another type extended from it
1814
+
1815
+ ## 0.2.1
1816
+
1817
+ ### Patch changes
1818
+
1819
+ - Fixes bug where number enums names could be generated.
1820
+
1821
+ ## 0.2.0
1822
+
1823
+ ### Minor changes
1824
+
1825
+ - Supports TypeScript enums
1826
+
1827
+ ## 0.1.0
1828
+
1829
+ ### Minor changes
1830
+
1831
+ - Exists