openapi-typesafe 1.0.0-rc.3 → 1.0.0-rc.5

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 (596) hide show
  1. package/CHANGELOG.md +1972 -0
  2. package/dist/adapters/node-file-system/file-claims.cjs +105 -0
  3. package/dist/adapters/node-file-system/file-claims.cjs.map +1 -0
  4. package/dist/adapters/node-file-system/file-claims.mjs +95 -0
  5. package/dist/adapters/node-file-system/file-claims.mjs.map +1 -0
  6. package/dist/adapters/node-file-system/file-identity.cjs +82 -0
  7. package/dist/adapters/node-file-system/file-identity.cjs.map +1 -0
  8. package/dist/adapters/node-file-system/file-identity.mjs +74 -0
  9. package/dist/adapters/node-file-system/file-identity.mjs.map +1 -0
  10. package/dist/adapters/node-file-system/node-file-system.cjs +97 -14
  11. package/dist/adapters/node-file-system/node-file-system.cjs.map +1 -1
  12. package/dist/adapters/node-file-system/node-file-system.mjs +97 -14
  13. package/dist/adapters/node-file-system/node-file-system.mjs.map +1 -1
  14. package/dist/adapters/pipe-safe-writer/pipe-safe-writer.cjs +19 -0
  15. package/dist/adapters/pipe-safe-writer/pipe-safe-writer.cjs.map +1 -0
  16. package/dist/adapters/pipe-safe-writer/pipe-safe-writer.mjs +17 -0
  17. package/dist/adapters/pipe-safe-writer/pipe-safe-writer.mjs.map +1 -0
  18. package/dist/adapters/redocly-loader/bundled-mapping-copies.cjs +48 -0
  19. package/dist/adapters/redocly-loader/bundled-mapping-copies.cjs.map +1 -0
  20. package/dist/adapters/redocly-loader/bundled-mapping-copies.mjs +45 -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/component-schemas.cjs +17 -0
  27. package/dist/adapters/redocly-loader/component-schemas.cjs.map +1 -0
  28. package/dist/adapters/redocly-loader/component-schemas.mjs +14 -0
  29. package/dist/adapters/redocly-loader/component-schemas.mjs.map +1 -0
  30. package/dist/adapters/redocly-loader/loaded-documents.cjs +28 -0
  31. package/dist/adapters/redocly-loader/loaded-documents.cjs.map +1 -0
  32. package/dist/adapters/redocly-loader/loaded-documents.mjs +21 -0
  33. package/dist/adapters/redocly-loader/loaded-documents.mjs.map +1 -0
  34. package/dist/adapters/redocly-loader/mapping-schema-names.cjs +22 -0
  35. package/dist/adapters/redocly-loader/mapping-schema-names.cjs.map +1 -0
  36. package/dist/adapters/redocly-loader/mapping-schema-names.mjs +20 -0
  37. package/dist/adapters/redocly-loader/mapping-schema-names.mjs.map +1 -0
  38. package/dist/adapters/redocly-loader/query-named-components.cjs +137 -0
  39. package/dist/adapters/redocly-loader/query-named-components.cjs.map +1 -0
  40. package/dist/adapters/redocly-loader/query-named-components.mjs +134 -0
  41. package/dist/adapters/redocly-loader/query-named-components.mjs.map +1 -0
  42. package/dist/adapters/redocly-loader/redocly-schema-loader.cjs +40 -29
  43. package/dist/adapters/redocly-loader/redocly-schema-loader.cjs.map +1 -1
  44. package/dist/adapters/redocly-loader/redocly-schema-loader.mjs +38 -27
  45. package/dist/adapters/redocly-loader/redocly-schema-loader.mjs.map +1 -1
  46. package/dist/adapters/redocly-loader/ref-access.cjs +45 -4
  47. package/dist/adapters/redocly-loader/ref-access.cjs.map +1 -1
  48. package/dist/adapters/redocly-loader/ref-access.mjs +45 -4
  49. package/dist/adapters/redocly-loader/ref-access.mjs.map +1 -1
  50. package/dist/adapters/redocly-loader/ref-holders.cjs +52 -10
  51. package/dist/adapters/redocly-loader/ref-holders.cjs.map +1 -1
  52. package/dist/adapters/redocly-loader/ref-holders.mjs +53 -12
  53. package/dist/adapters/redocly-loader/ref-holders.mjs.map +1 -1
  54. package/dist/adapters/redocly-loader/remote-body-limit.cjs +50 -0
  55. package/dist/adapters/redocly-loader/remote-body-limit.cjs.map +1 -0
  56. package/dist/adapters/redocly-loader/remote-body-limit.mjs +48 -0
  57. package/dist/adapters/redocly-loader/remote-body-limit.mjs.map +1 -0
  58. package/dist/adapters/redocly-loader/remote-fetch.cjs +40 -9
  59. package/dist/adapters/redocly-loader/remote-fetch.cjs.map +1 -1
  60. package/dist/adapters/redocly-loader/remote-fetch.mjs +40 -9
  61. package/dist/adapters/redocly-loader/remote-fetch.mjs.map +1 -1
  62. package/dist/adapters/redocly-loader/remote-node-limit.cjs +61 -0
  63. package/dist/adapters/redocly-loader/remote-node-limit.cjs.map +1 -0
  64. package/dist/adapters/redocly-loader/remote-node-limit.mjs +58 -0
  65. package/dist/adapters/redocly-loader/remote-node-limit.mjs.map +1 -0
  66. package/dist/adapters/redocly-loader/schema-load-errors.cjs +32 -8
  67. package/dist/adapters/redocly-loader/schema-load-errors.cjs.map +1 -1
  68. package/dist/adapters/redocly-loader/schema-load-errors.mjs +32 -9
  69. package/dist/adapters/redocly-loader/schema-load-errors.mjs.map +1 -1
  70. package/dist/adapters/redocly-loader/schema-source.cjs +18 -9
  71. package/dist/adapters/redocly-loader/schema-source.cjs.map +1 -1
  72. package/dist/adapters/redocly-loader/schema-source.mjs +20 -11
  73. package/dist/adapters/redocly-loader/schema-source.mjs.map +1 -1
  74. package/dist/adapters/redocly-loader/unsupported-keys.cjs +3 -5
  75. package/dist/adapters/redocly-loader/unsupported-keys.cjs.map +1 -1
  76. package/dist/adapters/redocly-loader/unsupported-keys.mjs +3 -5
  77. package/dist/adapters/redocly-loader/unsupported-keys.mjs.map +1 -1
  78. package/dist/adapters/terminal-logger/terminal-logger.cjs +10 -4
  79. package/dist/adapters/terminal-logger/terminal-logger.cjs.map +1 -1
  80. package/dist/adapters/terminal-logger/terminal-logger.mjs +10 -4
  81. package/dist/adapters/terminal-logger/terminal-logger.mjs.map +1 -1
  82. package/dist/api/default-ports.cjs +14 -2
  83. package/dist/api/default-ports.cjs.map +1 -1
  84. package/dist/api/default-ports.mjs +14 -2
  85. package/dist/api/default-ports.mjs.map +1 -1
  86. package/dist/api/discriminator-enum-parent.cjs +2 -2
  87. package/dist/api/discriminator-enum-parent.cjs.map +1 -1
  88. package/dist/api/discriminator-enum-parent.mjs +3 -3
  89. package/dist/api/discriminator-enum-parent.mjs.map +1 -1
  90. package/dist/api/discriminator-other-owners.cjs +5 -3
  91. package/dist/api/discriminator-other-owners.cjs.map +1 -1
  92. package/dist/api/discriminator-other-owners.mjs +5 -3
  93. package/dist/api/discriminator-other-owners.mjs.map +1 -1
  94. package/dist/api/discriminator-patch.cjs +5 -1
  95. package/dist/api/discriminator-patch.cjs.map +1 -1
  96. package/dist/api/discriminator-patch.mjs +5 -1
  97. package/dist/api/discriminator-patch.mjs.map +1 -1
  98. package/dist/api/discriminator-scan.cjs +15 -8
  99. package/dist/api/discriminator-scan.cjs.map +1 -1
  100. package/dist/api/discriminator-scan.mjs +15 -8
  101. package/dist/api/discriminator-scan.mjs.map +1 -1
  102. package/dist/api/document-refs.cjs +16 -1
  103. package/dist/api/document-refs.cjs.map +1 -1
  104. package/dist/api/document-refs.mjs +16 -1
  105. package/dist/api/document-refs.mjs.map +1 -1
  106. package/dist/api/document-run.cjs +6 -12
  107. package/dist/api/document-run.cjs.map +1 -1
  108. package/dist/api/document-run.mjs +6 -12
  109. package/dist/api/document-run.mjs.map +1 -1
  110. package/dist/api/legacy-utils.cjs.map +1 -1
  111. package/dist/api/legacy-utils.mjs.map +1 -1
  112. package/dist/api/openapi-ts.cjs +9 -6
  113. package/dist/api/openapi-ts.cjs.map +1 -1
  114. package/dist/api/openapi-ts.mjs +10 -8
  115. package/dist/api/openapi-ts.mjs.map +1 -1
  116. package/dist/api/ref-limit-options.cjs +63 -0
  117. package/dist/api/ref-limit-options.cjs.map +1 -0
  118. package/dist/api/ref-limit-options.mjs +57 -0
  119. package/dist/api/ref-limit-options.mjs.map +1 -0
  120. package/dist/api/schema-callbacks.cjs +36 -12
  121. package/dist/api/schema-callbacks.cjs.map +1 -1
  122. package/dist/api/schema-callbacks.mjs +36 -12
  123. package/dist/api/schema-callbacks.mjs.map +1 -1
  124. package/dist/api/transform-context.cjs +7 -3
  125. package/dist/api/transform-context.cjs.map +1 -1
  126. package/dist/api/transform-context.mjs +7 -3
  127. package/dist/api/transform-context.mjs.map +1 -1
  128. package/dist/api/transform-schema.cjs +47 -10
  129. package/dist/api/transform-schema.cjs.map +1 -1
  130. package/dist/api/transform-schema.mjs +48 -11
  131. package/dist/api/transform-schema.mjs.map +1 -1
  132. package/dist/application/print/text-writer.cjs +10 -3
  133. package/dist/application/print/text-writer.cjs.map +1 -1
  134. package/dist/application/print/text-writer.mjs +10 -3
  135. package/dist/application/print/text-writer.mjs.map +1 -1
  136. package/dist/application/stack-overflow.cjs +2 -1
  137. package/dist/application/stack-overflow.cjs.map +1 -1
  138. package/dist/application/stack-overflow.mjs +2 -1
  139. package/dist/application/stack-overflow.mjs.map +1 -1
  140. package/dist/application/transform/declared-value-types.cjs +36 -0
  141. package/dist/application/transform/declared-value-types.cjs.map +1 -0
  142. package/dist/application/transform/declared-value-types.mjs +34 -0
  143. package/dist/application/transform/declared-value-types.mjs.map +1 -0
  144. package/dist/application/transform/document/components.cjs +1 -1
  145. package/dist/application/transform/document/components.cjs.map +1 -1
  146. package/dist/application/transform/document/components.mjs +2 -2
  147. package/dist/application/transform/document/components.mjs.map +1 -1
  148. package/dist/application/transform/document/declared-type-names.cjs +23 -0
  149. package/dist/application/transform/document/declared-type-names.cjs.map +1 -0
  150. package/dist/application/transform/document/declared-type-names.mjs +20 -0
  151. package/dist/application/transform/document/declared-type-names.mjs.map +1 -0
  152. package/dist/application/transform/document/defs-root.cjs +1 -1
  153. package/dist/application/transform/document/defs-root.cjs.map +1 -1
  154. package/dist/application/transform/document/defs-root.mjs +2 -2
  155. package/dist/application/transform/document/defs-root.mjs.map +1 -1
  156. package/dist/application/transform/document/document.cjs +7 -2
  157. package/dist/application/transform/document/document.cjs.map +1 -1
  158. package/dist/application/transform/document/document.mjs +6 -3
  159. package/dist/application/transform/document/document.mjs.map +1 -1
  160. package/dist/application/transform/document/enum-names-given-back.cjs +62 -0
  161. package/dist/application/transform/document/enum-names-given-back.cjs.map +1 -0
  162. package/dist/application/transform/document/enum-names-given-back.mjs +58 -0
  163. package/dist/application/transform/document/enum-names-given-back.mjs.map +1 -0
  164. package/dist/application/transform/document/exploded-query-values.cjs +63 -0
  165. package/dist/application/transform/document/exploded-query-values.cjs.map +1 -0
  166. package/dist/application/transform/document/exploded-query-values.mjs +59 -0
  167. package/dist/application/transform/document/exploded-query-values.mjs.map +1 -0
  168. package/dist/application/transform/document/global-type-references.cjs +1 -0
  169. package/dist/application/transform/document/global-type-references.cjs.map +1 -1
  170. package/dist/application/transform/document/global-type-references.mjs +1 -1
  171. package/dist/application/transform/document/global-type-references.mjs.map +1 -1
  172. package/dist/application/transform/document/header.cjs +11 -3
  173. package/dist/application/transform/document/header.cjs.map +1 -1
  174. package/dist/application/transform/document/header.mjs +10 -2
  175. package/dist/application/transform/document/header.mjs.map +1 -1
  176. package/dist/application/transform/document/media-type.cjs +2 -2
  177. package/dist/application/transform/document/media-type.cjs.map +1 -1
  178. package/dist/application/transform/document/media-type.mjs +3 -3
  179. package/dist/application/transform/document/media-type.mjs.map +1 -1
  180. package/dist/application/transform/document/operation-keys-written.cjs +26 -0
  181. package/dist/application/transform/document/operation-keys-written.cjs.map +1 -0
  182. package/dist/application/transform/document/operation-keys-written.mjs +24 -0
  183. package/dist/application/transform/document/operation-keys-written.mjs.map +1 -0
  184. package/dist/application/transform/document/operation.cjs +1 -1
  185. package/dist/application/transform/document/operation.cjs.map +1 -1
  186. package/dist/application/transform/document/operation.mjs +2 -2
  187. package/dist/application/transform/document/operation.mjs.map +1 -1
  188. package/dist/application/transform/document/parameter-entries.cjs +34 -0
  189. package/dist/application/transform/document/parameter-entries.cjs.map +1 -0
  190. package/dist/application/transform/document/parameter-entries.mjs +30 -0
  191. package/dist/application/transform/document/parameter-entries.mjs.map +1 -0
  192. package/dist/application/transform/document/parameter.cjs +12 -4
  193. package/dist/application/transform/document/parameter.cjs.map +1 -1
  194. package/dist/application/transform/document/parameter.mjs +13 -5
  195. package/dist/application/transform/document/parameter.mjs.map +1 -1
  196. package/dist/application/transform/document/parameters.cjs +29 -34
  197. package/dist/application/transform/document/parameters.cjs.map +1 -1
  198. package/dist/application/transform/document/parameters.mjs +29 -34
  199. package/dist/application/transform/document/parameters.mjs.map +1 -1
  200. package/dist/application/transform/document/path-item.cjs +15 -17
  201. package/dist/application/transform/document/path-item.cjs.map +1 -1
  202. package/dist/application/transform/document/path-item.mjs +15 -19
  203. package/dist/application/transform/document/path-item.mjs.map +1 -1
  204. package/dist/application/transform/document/path-template-key.cjs +84 -0
  205. package/dist/application/transform/document/path-template-key.cjs.map +1 -0
  206. package/dist/application/transform/document/path-template-key.mjs +79 -0
  207. package/dist/application/transform/document/path-template-key.mjs.map +1 -0
  208. package/dist/application/transform/document/path-template-refs.cjs +70 -0
  209. package/dist/application/transform/document/path-template-refs.cjs.map +1 -0
  210. package/dist/application/transform/document/path-template-refs.mjs +67 -0
  211. package/dist/application/transform/document/path-template-refs.mjs.map +1 -0
  212. package/dist/application/transform/document/paths-enum.cjs +8 -6
  213. package/dist/application/transform/document/paths-enum.cjs.map +1 -1
  214. package/dist/application/transform/document/paths-enum.mjs +8 -7
  215. package/dist/application/transform/document/paths-enum.mjs.map +1 -1
  216. package/dist/application/transform/document/paths.cjs +43 -67
  217. package/dist/application/transform/document/paths.cjs.map +1 -1
  218. package/dist/application/transform/document/paths.mjs +42 -68
  219. package/dist/application/transform/document/paths.mjs.map +1 -1
  220. package/dist/application/transform/document/referenced-parameter.cjs +80 -0
  221. package/dist/application/transform/document/referenced-parameter.cjs.map +1 -0
  222. package/dist/application/transform/document/referenced-parameter.mjs +78 -0
  223. package/dist/application/transform/document/referenced-parameter.mjs.map +1 -0
  224. package/dist/application/transform/document/request-body.cjs +1 -1
  225. package/dist/application/transform/document/request-body.cjs.map +1 -1
  226. package/dist/application/transform/document/request-body.mjs +2 -2
  227. package/dist/application/transform/document/request-body.mjs.map +1 -1
  228. package/dist/application/transform/document/response.cjs +2 -2
  229. package/dist/application/transform/document/response.cjs.map +1 -1
  230. package/dist/application/transform/document/response.mjs +3 -3
  231. package/dist/application/transform/document/response.mjs.map +1 -1
  232. package/dist/application/transform/document/responses.cjs +1 -1
  233. package/dist/application/transform/document/responses.cjs.map +1 -1
  234. package/dist/application/transform/document/responses.mjs +2 -2
  235. package/dist/application/transform/document/responses.mjs.map +1 -1
  236. package/dist/application/transform/document/root-type-aliases.cjs +8 -23
  237. package/dist/application/transform/document/root-type-aliases.cjs.map +1 -1
  238. package/dist/application/transform/document/root-type-aliases.mjs +8 -24
  239. package/dist/application/transform/document/root-type-aliases.mjs.map +1 -1
  240. package/dist/application/transform/document/type-resolution.cjs +3 -1
  241. package/dist/application/transform/document/type-resolution.cjs.map +1 -1
  242. package/dist/application/transform/document/type-resolution.mjs +3 -1
  243. package/dist/application/transform/document/type-resolution.mjs.map +1 -1
  244. package/dist/application/transform/document/webhooks.cjs +10 -3
  245. package/dist/application/transform/document/webhooks.cjs.map +1 -1
  246. package/dist/application/transform/document/webhooks.mjs +10 -3
  247. package/dist/application/transform/document/webhooks.mjs.map +1 -1
  248. package/dist/application/transform/footer/document-footer.cjs +16 -5
  249. package/dist/application/transform/footer/document-footer.cjs.map +1 -1
  250. package/dist/application/transform/footer/document-footer.mjs +16 -5
  251. package/dist/application/transform/footer/document-footer.mjs.map +1 -1
  252. package/dist/application/transform/footer/enum-name-claims.cjs +48 -0
  253. package/dist/application/transform/footer/enum-name-claims.cjs.map +1 -0
  254. package/dist/application/transform/footer/enum-name-claims.mjs +46 -0
  255. package/dist/application/transform/footer/enum-name-claims.mjs.map +1 -0
  256. package/dist/application/transform/footer/operation-keys.cjs +23 -0
  257. package/dist/application/transform/footer/operation-keys.cjs.map +1 -0
  258. package/dist/application/transform/footer/operation-keys.mjs +21 -0
  259. package/dist/application/transform/footer/operation-keys.mjs.map +1 -0
  260. package/dist/application/transform/footer/type-evaluation.cjs +4 -4
  261. package/dist/application/transform/footer/type-evaluation.cjs.map +1 -1
  262. package/dist/application/transform/footer/type-evaluation.mjs +4 -4
  263. package/dist/application/transform/footer/type-evaluation.mjs.map +1 -1
  264. package/dist/application/transform/helper-types.cjs +3 -3
  265. package/dist/application/transform/helper-types.cjs.map +1 -1
  266. package/dist/application/transform/helper-types.mjs +3 -3
  267. package/dist/application/transform/helper-types.mjs.map +1 -1
  268. package/dist/application/transform/numbered-names.cjs +9 -0
  269. package/dist/application/transform/numbered-names.cjs.map +1 -1
  270. package/dist/application/transform/numbered-names.mjs +9 -1
  271. package/dist/application/transform/numbered-names.mjs.map +1 -1
  272. package/dist/application/transform/ref-pointer/generated-location.cjs +5 -5
  273. package/dist/application/transform/ref-pointer/generated-location.cjs.map +1 -1
  274. package/dist/application/transform/ref-pointer/generated-location.mjs +3 -3
  275. package/dist/application/transform/ref-pointer/generated-location.mjs.map +1 -1
  276. package/dist/application/transform/ref-pointer/generated-shape.cjs +47 -66
  277. package/dist/application/transform/ref-pointer/generated-shape.cjs.map +1 -1
  278. package/dist/application/transform/ref-pointer/generated-shape.mjs +36 -50
  279. package/dist/application/transform/ref-pointer/generated-shape.mjs.map +1 -1
  280. package/dist/application/transform/ref-pointer/inline-cycles.cjs +2 -2
  281. package/dist/application/transform/ref-pointer/inline-cycles.cjs.map +1 -1
  282. package/dist/application/transform/ref-pointer/inline-cycles.mjs +1 -1
  283. package/dist/application/transform/ref-pointer/inline-cycles.mjs.map +1 -1
  284. package/dist/application/transform/ref-pointer/located-node.cjs +23 -0
  285. package/dist/application/transform/ref-pointer/located-node.cjs.map +1 -0
  286. package/dist/application/transform/ref-pointer/located-node.mjs +18 -0
  287. package/dist/application/transform/ref-pointer/located-node.mjs.map +1 -0
  288. package/dist/application/transform/ref-pointer/original-index.cjs +68 -13
  289. package/dist/application/transform/ref-pointer/original-index.cjs.map +1 -1
  290. package/dist/application/transform/ref-pointer/original-index.mjs +70 -15
  291. package/dist/application/transform/ref-pointer/original-index.mjs.map +1 -1
  292. package/dist/application/transform/ref-pointer/pointer-type.cjs +2 -2
  293. package/dist/application/transform/ref-pointer/pointer-type.cjs.map +1 -1
  294. package/dist/application/transform/ref-pointer/pointer-type.mjs +1 -1
  295. package/dist/application/transform/ref-pointer/pointer-type.mjs.map +1 -1
  296. package/dist/application/transform/ref-pointer/pointer-walk.cjs +54 -13
  297. package/dist/application/transform/ref-pointer/pointer-walk.cjs.map +1 -1
  298. package/dist/application/transform/ref-pointer/pointer-walk.mjs +46 -7
  299. package/dist/application/transform/ref-pointer/pointer-walk.mjs.map +1 -1
  300. package/dist/application/transform/ref-pointer/property-shape.cjs +52 -0
  301. package/dist/application/transform/ref-pointer/property-shape.cjs.map +1 -0
  302. package/dist/application/transform/ref-pointer/property-shape.mjs +45 -0
  303. package/dist/application/transform/ref-pointer/property-shape.mjs.map +1 -0
  304. package/dist/application/transform/ref-pointer/typed-walk.cjs +79 -21
  305. package/dist/application/transform/ref-pointer/typed-walk.cjs.map +1 -1
  306. package/dist/application/transform/ref-pointer/typed-walk.mjs +76 -18
  307. package/dist/application/transform/ref-pointer/typed-walk.mjs.map +1 -1
  308. package/dist/application/transform/ref-type.cjs +2 -1
  309. package/dist/application/transform/ref-type.cjs.map +1 -1
  310. package/dist/application/transform/ref-type.mjs +2 -1
  311. package/dist/application/transform/ref-type.mjs.map +1 -1
  312. package/dist/application/transform/schema/access-flags.cjs.map +1 -1
  313. package/dist/application/transform/schema/access-flags.mjs.map +1 -1
  314. package/dist/application/transform/schema/composition-type.cjs +1 -1
  315. package/dist/application/transform/schema/composition-type.cjs.map +1 -1
  316. package/dist/application/transform/schema/composition-type.mjs +2 -2
  317. package/dist/application/transform/schema/composition-type.mjs.map +1 -1
  318. package/dist/application/transform/schema/enum-rule.cjs +1 -1
  319. package/dist/application/transform/schema/enum-rule.cjs.map +1 -1
  320. package/dist/application/transform/schema/enum-rule.mjs +2 -2
  321. package/dist/application/transform/schema/enum-rule.mjs.map +1 -1
  322. package/dist/application/transform/schema/index-signature-type.cjs +21 -0
  323. package/dist/application/transform/schema/index-signature-type.cjs.map +1 -0
  324. package/dist/application/transform/schema/index-signature-type.mjs +19 -0
  325. package/dist/application/transform/schema/index-signature-type.mjs.map +1 -0
  326. package/dist/application/transform/schema/input-location.cjs +23 -0
  327. package/dist/application/transform/schema/input-location.cjs.map +1 -0
  328. package/dist/application/transform/schema/input-location.mjs +21 -0
  329. package/dist/application/transform/schema/input-location.mjs.map +1 -0
  330. package/dist/application/transform/schema/object-type.cjs +18 -8
  331. package/dist/application/transform/schema/object-type.cjs.map +1 -1
  332. package/dist/application/transform/schema/object-type.mjs +19 -9
  333. package/dist/application/transform/schema/object-type.mjs.map +1 -1
  334. package/dist/application/transform/schema/ref-siblings.cjs +47 -0
  335. package/dist/application/transform/schema/ref-siblings.cjs.map +1 -0
  336. package/dist/application/transform/schema/ref-siblings.mjs +45 -0
  337. package/dist/application/transform/schema/ref-siblings.mjs.map +1 -0
  338. package/dist/application/transform/schema/schema-transform.cjs +6 -3
  339. package/dist/application/transform/schema/schema-transform.cjs.map +1 -1
  340. package/dist/application/transform/schema/schema-transform.mjs +6 -3
  341. package/dist/application/transform/schema/schema-transform.mjs.map +1 -1
  342. package/dist/application/transform/schema/unevaluated-properties.cjs +2 -30
  343. package/dist/application/transform/schema/unevaluated-properties.cjs.map +1 -1
  344. package/dist/application/transform/schema/unevaluated-properties.mjs +3 -31
  345. package/dist/application/transform/schema/unevaluated-properties.mjs.map +1 -1
  346. package/dist/application/transform/schema-comment.cjs +5 -1
  347. package/dist/application/transform/schema-comment.cjs.map +1 -1
  348. package/dist/application/transform/schema-comment.mjs +5 -1
  349. package/dist/application/transform/schema-comment.mjs.map +1 -1
  350. package/dist/cli/api-logger.cjs +13 -0
  351. package/dist/cli/api-logger.cjs.map +1 -0
  352. package/dist/cli/api-logger.mjs +11 -0
  353. package/dist/cli/api-logger.mjs.map +1 -0
  354. package/dist/cli/api-settings.cjs +57 -9
  355. package/dist/cli/api-settings.cjs.map +1 -1
  356. package/dist/cli/api-settings.mjs +56 -11
  357. package/dist/cli/api-settings.mjs.map +1 -1
  358. package/dist/cli/api-writes.cjs +72 -0
  359. package/dist/cli/api-writes.cjs.map +1 -0
  360. package/dist/cli/api-writes.mjs +69 -0
  361. package/dist/cli/api-writes.mjs.map +1 -0
  362. package/dist/cli/cli-arguments.cjs +51 -11
  363. package/dist/cli/cli-arguments.cjs.map +1 -1
  364. package/dist/cli/cli-arguments.mjs +51 -11
  365. package/dist/cli/cli-arguments.mjs.map +1 -1
  366. package/dist/cli/cli-errors.cjs +29 -1
  367. package/dist/cli/cli-errors.cjs.map +1 -1
  368. package/dist/cli/cli-errors.mjs +29 -2
  369. package/dist/cli/cli-errors.mjs.map +1 -1
  370. package/dist/cli/cli-output.cjs +111 -4
  371. package/dist/cli/cli-output.cjs.map +1 -1
  372. package/dist/cli/cli-output.mjs +104 -5
  373. package/dist/cli/cli-output.mjs.map +1 -1
  374. package/dist/cli/main.cjs +13 -3
  375. package/dist/cli/main.cjs.map +1 -1
  376. package/dist/cli/main.mjs +14 -4
  377. package/dist/cli/main.mjs.map +1 -1
  378. package/dist/cli/redocly-apis.cjs +94 -37
  379. package/dist/cli/redocly-apis.cjs.map +1 -1
  380. package/dist/cli/redocly-apis.mjs +99 -42
  381. package/dist/cli/redocly-apis.mjs.map +1 -1
  382. package/dist/cli/ref-limits.cjs +15 -1
  383. package/dist/cli/ref-limits.cjs.map +1 -1
  384. package/dist/cli/ref-limits.mjs +15 -2
  385. package/dist/cli/ref-limits.mjs.map +1 -1
  386. package/dist/cli/run-cli.cjs +37 -14
  387. package/dist/cli/run-cli.cjs.map +1 -1
  388. package/dist/cli/run-cli.mjs +39 -16
  389. package/dist/cli/run-cli.mjs.map +1 -1
  390. package/dist/domain/append-all.cjs +10 -0
  391. package/dist/domain/append-all.cjs.map +1 -0
  392. package/dist/domain/append-all.mjs +8 -0
  393. package/dist/domain/append-all.mjs.map +1 -0
  394. package/dist/domain/cause-secrets.cjs +52 -0
  395. package/dist/domain/cause-secrets.cjs.map +1 -0
  396. package/dist/domain/cause-secrets.mjs +50 -0
  397. package/dist/domain/cause-secrets.mjs.map +1 -0
  398. package/dist/domain/errors.cjs +11 -3
  399. package/dist/domain/errors.cjs.map +1 -1
  400. package/dist/domain/errors.mjs +11 -3
  401. package/dist/domain/errors.mjs.map +1 -1
  402. package/dist/domain/ir/identifier-text.cjs.map +1 -1
  403. package/dist/domain/ir/identifier-text.mjs +1 -1
  404. package/dist/domain/ir/identifier-text.mjs.map +1 -1
  405. package/dist/domain/ir/ir-shape.cjs +187 -0
  406. package/dist/domain/ir/ir-shape.cjs.map +1 -0
  407. package/dist/domain/ir/ir-shape.mjs +184 -0
  408. package/dist/domain/ir/ir-shape.mjs.map +1 -0
  409. package/dist/domain/ir/newer-identifier-ranges.cjs +182 -29
  410. package/dist/domain/ir/newer-identifier-ranges.cjs.map +1 -1
  411. package/dist/domain/ir/newer-identifier-ranges.mjs +182 -29
  412. package/dist/domain/ir/newer-identifier-ranges.mjs.map +1 -1
  413. package/dist/domain/location-text.cjs +9 -0
  414. package/dist/domain/location-text.cjs.map +1 -0
  415. package/dist/domain/location-text.mjs +7 -0
  416. package/dist/domain/location-text.mjs.map +1 -0
  417. package/dist/domain/openapi/alias-expansion.cjs +3 -1
  418. package/dist/domain/openapi/alias-expansion.cjs.map +1 -1
  419. package/dist/domain/openapi/alias-expansion.mjs +3 -1
  420. package/dist/domain/openapi/alias-expansion.mjs.map +1 -1
  421. package/dist/domain/openapi/discriminated-union.cjs +3 -3
  422. package/dist/domain/openapi/discriminated-union.cjs.map +1 -1
  423. package/dist/domain/openapi/discriminated-union.mjs +4 -4
  424. package/dist/domain/openapi/discriminated-union.mjs.map +1 -1
  425. package/dist/domain/openapi/discriminator-conflicts.cjs +10 -6
  426. package/dist/domain/openapi/discriminator-conflicts.cjs.map +1 -1
  427. package/dist/domain/openapi/discriminator-conflicts.mjs +11 -7
  428. package/dist/domain/openapi/discriminator-conflicts.mjs.map +1 -1
  429. package/dist/domain/openapi/document-places.cjs +55 -0
  430. package/dist/domain/openapi/document-places.cjs.map +1 -0
  431. package/dist/domain/openapi/document-places.mjs +53 -0
  432. package/dist/domain/openapi/document-places.mjs.map +1 -0
  433. package/dist/domain/openapi/json-pointer.cjs +43 -1
  434. package/dist/domain/openapi/json-pointer.cjs.map +1 -1
  435. package/dist/domain/openapi/json-pointer.mjs +40 -2
  436. package/dist/domain/openapi/json-pointer.mjs.map +1 -1
  437. package/dist/domain/openapi/schema-dialect.cjs +15 -0
  438. package/dist/domain/openapi/schema-dialect.cjs.map +1 -0
  439. package/dist/domain/openapi/schema-dialect.mjs +12 -0
  440. package/dist/domain/openapi/schema-dialect.mjs.map +1 -0
  441. package/dist/domain/openapi/unsupported-features.cjs +1 -1
  442. package/dist/domain/openapi/unsupported-features.cjs.map +1 -1
  443. package/dist/domain/openapi/unsupported-features.mjs +2 -2
  444. package/dist/domain/openapi/unsupported-features.mjs.map +1 -1
  445. package/dist/domain/output-fixes.cjs +20 -0
  446. package/dist/domain/output-fixes.cjs.map +1 -1
  447. package/dist/domain/output-fixes.mjs +20 -0
  448. package/dist/domain/output-fixes.mjs.map +1 -1
  449. package/dist/domain/terminal-text.cjs +31 -0
  450. package/dist/domain/terminal-text.cjs.map +1 -0
  451. package/dist/domain/terminal-text.mjs +29 -0
  452. package/dist/domain/terminal-text.mjs.map +1 -0
  453. package/dist/domain/url-secrets.cjs +48 -0
  454. package/dist/domain/url-secrets.cjs.map +1 -0
  455. package/dist/domain/url-secrets.mjs +45 -0
  456. package/dist/domain/url-secrets.mjs.map +1 -0
  457. package/dist/domain/warnings.cjs +1 -0
  458. package/dist/domain/warnings.cjs.map +1 -1
  459. package/dist/domain/warnings.mjs +1 -0
  460. package/dist/domain/warnings.mjs.map +1 -1
  461. package/dist/index.d.cts +46 -20
  462. package/dist/index.d.mts +46 -20
  463. package/dist/index.d.ts +46 -20
  464. package/package.json +4 -5
  465. package/src/adapters/node-file-system/file-claims.ts +138 -0
  466. package/src/adapters/node-file-system/file-identity.ts +137 -0
  467. package/src/adapters/node-file-system/node-file-system.ts +158 -18
  468. package/src/adapters/pipe-safe-writer/pipe-safe-writer.ts +29 -0
  469. package/src/adapters/redocly-loader/bundled-mapping-copies.ts +60 -0
  470. package/src/adapters/redocly-loader/bundled-ref-repair.ts +2 -2
  471. package/src/adapters/redocly-loader/component-schemas.ts +19 -0
  472. package/src/adapters/redocly-loader/loaded-documents.ts +46 -0
  473. package/src/adapters/redocly-loader/mapping-schema-names.ts +25 -0
  474. package/src/adapters/redocly-loader/query-named-components.ts +201 -0
  475. package/src/adapters/redocly-loader/redocly-schema-loader.ts +64 -38
  476. package/src/adapters/redocly-loader/ref-access.ts +51 -4
  477. package/src/adapters/redocly-loader/ref-holders.ts +76 -15
  478. package/src/adapters/redocly-loader/remote-body-limit.ts +66 -0
  479. package/src/adapters/redocly-loader/remote-fetch.ts +85 -13
  480. package/src/adapters/redocly-loader/remote-node-limit.ts +102 -0
  481. package/src/adapters/redocly-loader/schema-load-errors.ts +52 -13
  482. package/src/adapters/redocly-loader/schema-source.ts +35 -11
  483. package/src/adapters/redocly-loader/unsupported-keys.ts +3 -7
  484. package/src/adapters/terminal-logger/terminal-logger.ts +17 -6
  485. package/src/api/default-ports.ts +33 -4
  486. package/src/api/discriminator-enum-parent.ts +3 -3
  487. package/src/api/discriminator-other-owners.ts +5 -3
  488. package/src/api/discriminator-patch.ts +5 -1
  489. package/src/api/discriminator-scan.ts +16 -8
  490. package/src/api/document-refs.ts +29 -1
  491. package/src/api/document-run.ts +10 -19
  492. package/src/api/legacy-utils.ts +5 -1
  493. package/src/api/openapi-ts.ts +26 -8
  494. package/src/api/ref-limit-options.ts +76 -0
  495. package/src/api/run-context.ts +3 -0
  496. package/src/api/schema-callbacks.ts +60 -17
  497. package/src/api/transform-context.ts +7 -3
  498. package/src/api/transform-schema.ts +79 -12
  499. package/src/application/ports/file-system.ts +47 -0
  500. package/src/application/ports/schema-loader.ts +11 -1
  501. package/src/application/print/text-writer.ts +10 -3
  502. package/src/application/stack-overflow.ts +9 -5
  503. package/src/application/transform/declared-value-types.ts +42 -0
  504. package/src/application/transform/document/components.ts +2 -2
  505. package/src/application/transform/document/declared-type-names.ts +36 -0
  506. package/src/application/transform/document/defs-root.ts +2 -2
  507. package/src/application/transform/document/document.ts +8 -5
  508. package/src/application/transform/document/enum-names-given-back.ts +91 -0
  509. package/src/application/transform/document/exploded-query-values.ts +88 -0
  510. package/src/application/transform/document/global-type-references.ts +1 -1
  511. package/src/application/transform/document/header.ts +25 -5
  512. package/src/application/transform/document/media-type.ts +4 -3
  513. package/src/application/transform/document/operation-keys-written.ts +27 -0
  514. package/src/application/transform/document/operation.ts +2 -2
  515. package/src/application/transform/document/parameter-entries.ts +70 -0
  516. package/src/application/transform/document/parameter.ts +21 -9
  517. package/src/application/transform/document/parameters.ts +56 -66
  518. package/src/application/transform/document/path-item.ts +16 -34
  519. package/src/application/transform/document/path-template-key.ts +152 -0
  520. package/src/application/transform/document/path-template-refs.ts +106 -0
  521. package/src/application/transform/document/paths-enum.ts +24 -10
  522. package/src/application/transform/document/paths.ts +59 -125
  523. package/src/application/transform/document/referenced-parameter.ts +146 -0
  524. package/src/application/transform/document/request-body.ts +2 -2
  525. package/src/application/transform/document/response.ts +3 -3
  526. package/src/application/transform/document/responses.ts +2 -2
  527. package/src/application/transform/document/root-type-aliases.ts +17 -38
  528. package/src/application/transform/document/type-resolution.ts +2 -1
  529. package/src/application/transform/document/webhooks.ts +19 -6
  530. package/src/application/transform/footer/document-footer.ts +36 -9
  531. package/src/application/transform/footer/enum-name-claims.ts +62 -0
  532. package/src/application/transform/footer/operation-keys.ts +28 -0
  533. package/src/application/transform/footer/type-evaluation.ts +4 -4
  534. package/src/application/transform/helper-types.ts +8 -7
  535. package/src/application/transform/numbered-names.ts +15 -0
  536. package/src/application/transform/ref-pointer/generated-location.ts +3 -3
  537. package/src/application/transform/ref-pointer/generated-shape.ts +67 -78
  538. package/src/application/transform/ref-pointer/inline-cycles.ts +1 -1
  539. package/src/application/transform/ref-pointer/located-node.ts +38 -0
  540. package/src/application/transform/ref-pointer/original-index.ts +100 -17
  541. package/src/application/transform/ref-pointer/pointer-type.ts +1 -1
  542. package/src/application/transform/ref-pointer/pointer-walk.ts +82 -8
  543. package/src/application/transform/ref-pointer/property-shape.ts +97 -0
  544. package/src/application/transform/ref-pointer/typed-walk.ts +117 -25
  545. package/src/application/transform/ref-type.ts +2 -1
  546. package/src/application/transform/schema/access-flags.ts +5 -2
  547. package/src/application/transform/schema/composition-type.ts +2 -2
  548. package/src/application/transform/schema/enum-rule.ts +6 -2
  549. package/src/application/transform/schema/index-signature-type.ts +31 -0
  550. package/src/application/transform/schema/input-location.ts +35 -0
  551. package/src/application/transform/schema/object-type.ts +22 -12
  552. package/src/application/transform/schema/ref-siblings.ts +76 -0
  553. package/src/application/transform/schema/schema-context.ts +3 -0
  554. package/src/application/transform/schema/schema-transform.ts +6 -3
  555. package/src/application/transform/schema/unevaluated-properties.ts +4 -44
  556. package/src/application/transform/schema-comment.ts +5 -1
  557. package/src/application/transform/transform-context.ts +5 -0
  558. package/src/cli/api-logger.ts +17 -0
  559. package/src/cli/api-settings.ts +80 -13
  560. package/src/cli/api-writes.ts +117 -0
  561. package/src/cli/cli-arguments.ts +90 -14
  562. package/src/cli/cli-dependencies.ts +26 -4
  563. package/src/cli/cli-errors.ts +42 -1
  564. package/src/cli/cli-output.ts +195 -15
  565. package/src/cli/main.ts +14 -5
  566. package/src/cli/redocly-apis.ts +177 -52
  567. package/src/cli/ref-limits.ts +21 -2
  568. package/src/cli/run-cli.ts +76 -15
  569. package/src/domain/append-all.ts +10 -0
  570. package/src/domain/cause-secrets.ts +86 -0
  571. package/src/domain/errors.ts +16 -5
  572. package/src/domain/ir/identifier-text.ts +6 -5
  573. package/src/domain/ir/ir-shape.ts +299 -0
  574. package/src/domain/ir/newer-identifier-ranges.ts +183 -30
  575. package/src/domain/location-text.ts +12 -0
  576. package/src/domain/openapi/alias-expansion.ts +4 -1
  577. package/src/domain/openapi/discriminated-union.ts +6 -4
  578. package/src/domain/openapi/discriminator-conflicts.ts +21 -7
  579. package/src/domain/openapi/document-object.ts +2 -0
  580. package/src/domain/openapi/document-places.ts +78 -0
  581. package/src/domain/openapi/json-pointer.ts +96 -7
  582. package/src/domain/openapi/schema-dialect.ts +22 -0
  583. package/src/domain/openapi/unsupported-features.ts +2 -2
  584. package/src/domain/output-fixes.ts +28 -2
  585. package/src/domain/terminal-text.ts +44 -0
  586. package/src/domain/url-secrets.ts +72 -0
  587. package/src/domain/warnings.ts +1 -0
  588. package/src/types/generator-options.ts +1 -1
  589. package/dist/cli/main.d.cts +0 -2
  590. package/dist/cli/main.d.mts +0 -2
  591. package/dist/cli/main.d.ts +0 -2
  592. package/dist/domain/url-credentials.cjs +0 -10
  593. package/dist/domain/url-credentials.cjs.map +0 -1
  594. package/dist/domain/url-credentials.mjs +0 -8
  595. package/dist/domain/url-credentials.mjs.map +0 -1
  596. package/src/domain/url-credentials.ts +0 -18
package/CHANGELOG.md ADDED
@@ -0,0 +1,1972 @@
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.5
6
+
7
+ ### Patch Changes
8
+
9
+ - [#70](https://github.com/openapi-typesafe/openapi-typesafe/pull/70) [`d732870`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d732870a9e1d207761c88614a95b778c4f0ebe9d) Thanks [@fedorello](https://github.com/fedorello)! - With several APIs in `redocly.yaml`, an error while an API is loaded or generated starts with
10
+ `API <name>:`, as its config errors do, so it tells which API failed. The code and the exit code
11
+ stay the same. Every warning, problem and debug line of an API's generation (a `$ref` it cannot
12
+ resolve, a lint problem) starts with `API <name>:` too. A notice that a root-types flag has no
13
+ effect follows the CLI flags together with each API's settings and names the API, and an invalid
14
+ `--local-ref-root` fails the run once instead of once for each API.
15
+
16
+ - [#70](https://github.com/openapi-typesafe/openapi-typesafe/pull/70) [`d732870`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d732870a9e1d207761c88614a95b778c4f0ebe9d) Thanks [@fedorello](https://github.com/fedorello)! - Types piped to a reader that stops early (`openapi-typesafe api.yaml | head`) no longer crash the
17
+ CLI with `EPIPE` and exit code `1`; the rest is dropped and the exit code stays `0`.
18
+
19
+ - [#70](https://github.com/openapi-typesafe/openapi-typesafe/pull/70) [`d732870`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d732870a9e1d207761c88614a95b778c4f0ebe9d) Thanks [@fedorello](https://github.com/fedorello)! - CLI flags are read by their names:
20
+ - A removed flag fails with `CLI_FLAG_REMOVED` written with a value too (`--redoc=redocly.yaml`),
21
+ in camelCase (`--immutableTypes`) and with `--no-` (`--no-immutable-types`).
22
+ - The boolean alias `-t` (`--export-type`) takes `=true` and `=false` as the flag does; another
23
+ value fails with `CLI_FLAG_INVALID`.
24
+ - A boolean flag takes no value, or `=true` or `=false`. Another value (`--enum=1`,
25
+ `--no-enum=true`) fails with `CLI_FLAG_INVALID` (exit code `2`) instead of turning the flag off.
26
+ - A flag given more than once takes the last value; `--output` and `--redocly` no longer fail with
27
+ a list.
28
+ - The notice that a root-types flag has no effect without `--root-types` follows the parsed flags:
29
+ `--rootTypes` and `--root-types=true` count, `--root-types=false` does not.
30
+
31
+ - [#76](https://github.com/openapi-typesafe/openapi-typesafe/pull/76) [`e464bc3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e464bc3c9dcb243a4259307d6b667bde134d8468) Thanks [@fedorello](https://github.com/fedorello)! - A schema argument is a glob pattern, which fails with `CLI_GLOB_UNSUPPORTED`, only when it is a
32
+ path with a `*` that names no file. A URL with a `*` in its query (`…/openapi?fields=*`) and an
33
+ existing file whose name has a `*` are read as any other schema.
34
+
35
+ - [#70](https://github.com/openapi-typesafe/openapi-typesafe/pull/70) [`d732870`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d732870a9e1d207761c88614a95b778c4f0ebe9d) Thanks [@fedorello](https://github.com/fedorello)! - `--output` together with the APIs of `redocly.yaml` warns with `CLI_OUTPUT_IGNORED`: each API is
36
+ written to its `x-openapi-ts.output`, and the `--output` path was ignored without a word.
37
+
38
+ - [#76](https://github.com/openapi-typesafe/openapi-typesafe/pull/76) [`e464bc3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e464bc3c9dcb243a4259307d6b667bde134d8468) Thanks [@fedorello](https://github.com/fedorello)! - The line for a written file and the notices about flags show a line break or an escape sequence in
39
+ a file name, a flag or an API name as an escape (`\n`, `\u001b`), as warnings and errors already
40
+ do, so a name cannot start a forged line in a CI log.
41
+
42
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - `const: null` is typed `null`; it was `unknown`, as if the schema had no `const`.
43
+
44
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - `--enum --dedupe-enums` no longer merges enums with other values. Their key joined the member
45
+ names and descriptions as text, and a member name stood in for its value, so `Flag` (`1`, `0`)
46
+ became the `Status` enum (`"A"`, `"I"`) when both named their members `Active` and `Inactive`, and
47
+ `["1", "2"]` and `[1, 2]`, or `["a", "b"]` and `["a:,b"]`, shared one enum. The key also paired
48
+ the values in sorted order with the names in document order, so `[desc, asc]` and `[asc, desc]`,
49
+ both named `[Desc, Asc]`, shared one enum and one of them typed `asc` as `Desc = "desc"`. Enums
50
+ with the same values and member names are still merged.
51
+
52
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - The new fix `default-input-locations` finds parameters and request bodies by the document's
53
+ structure for `--default-non-nullable` (on by default). Without it, as in openapi-typescript, a
54
+ defaulted property stays optional wherever its location holds the word `parameters` or
55
+ `requestBody`, such as a response of `/system-parameters` or a property named `hyperparameters`.
56
+ It changes nothing with `--default-non-nullable=false`, so naming it then prints the warning
57
+ `FIX_NEEDS_OPTION`, as other fixes that need a flag do (`--fix all` does not).
58
+
59
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - With `--exclude-deprecated`, a `$ref` to a property it leaves out
60
+ (`#/components/schemas/A/properties/old`) is typed as that property's schema, instead of naming a
61
+ key the type no longer has. The same holds for a `$ref` into a deprecated operation or response
62
+ header, and a `$ref` through another `$ref` (`Wrap/properties/o/properties/v`, where `o` is a
63
+ `$ref`) no longer warns `REF_NOT_FOUND`. With `--make-paths-enum`, `ApiPaths` lists only the
64
+ operations that `paths` keeps.
65
+
66
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - `--fix exploded-query-objects`: an exploded object with `additionalProperties` next to other query
67
+ parameters no longer makes the whole `query` type unusable. Its index signature also takes the
68
+ value types of the other query keys (`{ page?: number } & Partial<{ [key: string]: string | number
69
+ | undefined }>`), since TypeScript checks it against `page` too. A `$ref` to such an object is
70
+ written out in place when other query keys are next to it.
71
+
72
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - An index signature from `additionalProperties` or `patternProperties` also takes the types of the
73
+ properties next to it that it does not admit (`{ total: number } & { [key: string]: string |
74
+ number }`). TypeScript checks the signature against the declared keys too, so the old type took no
75
+ value with those properties.
76
+
77
+ - [#76](https://github.com/openapi-typesafe/openapi-typesafe/pull/76) [`e464bc3`](https://github.com/openapi-typesafe/openapi-typesafe/commit/e464bc3c9dcb243a4259307d6b667bde134d8468) Thanks [@fedorello](https://github.com/fedorello)! - A YAML parse error of a string source or a stream (stdin in the CLI) names it `the schema string`
78
+ or `the schema stream`. It named `<cwd>/inline-source`, a file that does not exist.
79
+
80
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - A discriminator `mapping` value that names a schema (`cat: Cat`), as OpenAPI allows, is read as
81
+ `#/components/schemas/Cat`, also in a document a `$ref` loads, where it names that document's
82
+ schemas. It failed with "Can't resolve $ref"; any other value is still a URI reference. A `mapping`
83
+ inside `example`, `examples`, `default`, `const`, `enum` or an `x-` value is data and stays as
84
+ written. A problem in a document other than the root now names that document: its path, or its URL
85
+ without the query.
86
+
87
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - The `parameter-content` fix is now `parameter-header-content` and types a response header with
88
+ `content` by the schema of its media type too (`"X-Rate": { limit: number }`), not as a map of
89
+ media types. Configs that name `parameter-content` fail with `OPTION_FIX_UNKNOWN` until renamed.
90
+
91
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types` with only `boolean` path parameters in a path compiles:
92
+ ``[path: `/flags/${boolean}`]`` is no valid index signature (TS1337), so such a path is written as
93
+ the keys `"/flags/true"` and `"/flags/false"`, with the same path item type (2ⁿ keys for n boolean
94
+ parameters). A key that the document already has as a path is left out. Next to another parameter
95
+ (`` `/a/${number}/${boolean}` ``) the signature is valid and stays as it was.
96
+
97
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - `--path-params-as-types`: a `$ref` into a path with a `number` or `boolean` path parameter
98
+ compiles. It was typed as `paths["/pets/{id}"]`, which names no key of
99
+ ``[path: `/pets/${number}`]`` (TS2339); it is now ``paths[`/pets/${number}`]``. A boolean path
100
+ is indexed by the keys it is written with (`paths["/flags/true" | "/flags/false"]`), without the
101
+ one a path of the document takes, so the `$ref` no longer gets that path's type too. With only
102
+ string parameters the URL matches the template, so that output stays as it was.
103
+
104
+ - [#75](https://github.com/openapi-typesafe/openapi-typesafe/pull/75) [`a74608e`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a74608ec36b0a938594e0d0fac10c9fb222c1742) Thanks [@fedorello](https://github.com/fedorello)! - `Readable` and `Writable` find the `$Read` and `$Write` properties of an object with an index
105
+ signature (`additionalProperties`). The keys were read through the index signature, so no
106
+ property was marked: a request body required the `readOnly` `id`, and a response kept the
107
+ `writeOnly` password. The helper types that `--read-write-markers` writes are fixed the same way.
108
+
109
+ - [#70](https://github.com/openapi-typesafe/openapi-typesafe/pull/70) [`d732870`](https://github.com/openapi-typesafe/openapi-typesafe/commit/d732870a9e1d207761c88614a95b778c4f0ebe9d) Thanks [@fedorello](https://github.com/fedorello)! - The `$ref` limits are checked before anything loads:
110
+ - In the Node API, a `remoteRefHosts` that is no list of strings, or a `localRefRoot` that is no
111
+ path or `file:` URL, fails with `OPTION_INVALID` and `details.option`. It failed later as an error
112
+ of the document, such as `hosts.map is not a function`.
113
+ - `--local-ref-root https://…` fails with `CLI_FLAG_INVALID` (exit code `2`) instead of exit code
114
+ `3`, and a `local-ref-root` URL of another protocol in `redocly.yaml` with `CLI_CONFIG_INVALID`.
115
+ - In the Node API, a `localRefRoot` string with a scheme is a URL, as for `--local-ref-root`:
116
+ `"file:///specs/"` is that directory, not a path below `cwd`, and `"https://…"` fails with
117
+ `OPTION_INVALID`.
118
+
119
+ - [#75](https://github.com/openapi-typesafe/openapi-typesafe/pull/75) [`a74608e`](https://github.com/openapi-typesafe/openapi-typesafe/commit/a74608ec36b0a938594e0d0fac10c9fb222c1742) Thanks [@fedorello](https://github.com/fedorello)! - More `$ref`s into a schema compile and get the type they point at:
120
+ - A `$ref` into the `content` of a header or parameter follows the generated type: the media type
121
+ member of a header (`components["headers"]["H"]["text/plain"]`), or with the
122
+ `parameter-header-content` fix the media type's type itself. A parameter typed `string` and
123
+ `content` next to a `schema` are typed in place. Before, `["content"]["text/plain"]["schema"]`
124
+ did not compile (TS2339).
125
+ - With `--read-write-markers`, a `$ref` through an optional property gets `NonNullable` as
126
+ without the flag; one through a `$Read` or `$Write` property is typed in place.
127
+ - A `$ref` through a property with a `default` that the output makes optional (in a request body,
128
+ or under a property named `hyperparameters`) gets `NonNullable`: the property is read as
129
+ optional or required by where it is, not where the `$ref` is.
130
+
131
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - `--fix ref-siblings` also reads the keywords next to the `$ref` of an object property
132
+ (`owner: { $ref: Base, required: [id] }` is `WithRequired<Base, "id">`); it read them only for
133
+ components, array items, bodies and parameters.
134
+
135
+ - [#66](https://github.com/openapi-typesafe/openapi-typesafe/pull/66) [`15344bf`](https://github.com/openapi-typesafe/openapi-typesafe/commit/15344bfb803ff9872a6d3f79b8279fbbbbfd14ea) Thanks [@fedorello](https://github.com/fedorello)! - A remote `$ref` to a document served as `text/plain` loads when its URL has a query after the
136
+ extension (`pet.yaml?token=…`), no extension at all (`/schemas/pet`) or a dot that names no text
137
+ format (`/schemas/v1.0`, `/schemas/pet.v2`); before, it was kept as text and failed with
138
+ `Expected SchemaObject, received string`. A URL whose extension or type names a text format
139
+ (`.md`, `.markdown`, `.txt`, `.html`, `.htm`, `text/markdown`, `text/html`) stays text, as a
140
+ Markdown `description` does.
141
+
142
+ - [#71](https://github.com/openapi-typesafe/openapi-typesafe/pull/71) [`2a03b07`](https://github.com/openapi-typesafe/openapi-typesafe/commit/2a03b072bf201e5e6eeec9ad9744a3f9d513b78a) Thanks [@fedorello](https://github.com/fedorello)! - A webhook that is a `$ref` (often to `components/pathItems`) is typed as the path item it points
143
+ at, as a `$ref` in `paths` is: `petAdded: components["pathItems"]["PetEvent"]`. Every method of
144
+ such a webhook was `never`.
145
+
146
+ ## 1.0.0-rc.4
147
+
148
+ ### Minor Changes
149
+
150
+ - [#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
151
+ `CLI_OUTPUT_INVALID` (exit code `2`) before anything is generated: a URL of another scheme
152
+ (`-o https://…`), a path that ends with a separator (`-o gen/`) or with `.` or `..`
153
+ (`-o gen/.`), or an existing directory. openapi-typescript failed on them with `EISDIR` or a
154
+ stack trace, or wrote a file named like the directory. An output that cannot be written (a file name too long
155
+ for the file system) leaves no new directories behind; openapi-typescript left them.
156
+
157
+ - [#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,
158
+ and the letter case of a file system that ignores case (asked of the file system, not assumed from
159
+ the OS), also for outputs that do not exist yet. They run before anything is written and fail with
160
+ exit code `2`. openapi-typescript checked neither:
161
+ - An `--output`, or an `x-openapi-ts.output` in `redocly.yaml`, that names a file the CLI
162
+ reads fails with the new error code `CLI_OUTPUT_IS_INPUT`: the schema, a local file one of
163
+ its `$ref`s loads, or `redocly.yaml`. With several APIs, every API is read before any output
164
+ is written, and no output may be a file that any API reads. openapi-typescript replaced the
165
+ file with the types.
166
+ - APIs in `redocly.yaml` whose outputs are the same file all fail with the new error code
167
+ `CLI_OUTPUT_DUPLICATE`; the other APIs are still generated. openapi-typescript let the API
168
+ that finished last win. Before writing, the CLI creates every missing output, empty, and asks
169
+ the file system whether two of them are one file, so names that differ only in Unicode
170
+ normalization or case folding (`café.ts` in NFC and NFD, `straße.ts` and `STRASSE.ts`) or a
171
+ path through a link to a missing directory are caught too. A run that fails this way leaves no
172
+ new file or directory.
173
+
174
+ - [#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
175
+ after `gzip`, `deflate` or `br` is decoded, so a compressed "zip bomb" behind a remote `$ref` no
176
+ longer fills the memory: 1.6 MB on the wire became 1.6 GB before. A body larger than 128 MiB, or
177
+ remote documents larger than 256 MiB together for one schema, fail with `SCHEMA_REF_FORBIDDEN` and
178
+ the new reasons `remote-document-too-large` and `remote-documents-too-large`. The parser also
179
+ counts the nodes it builds: remote documents that parse into more than 8,000,000 nodes together
180
+ fail with the new reason `remote-documents-too-many-nodes`, so a dense body such as
181
+ `[{},{},…]` within the byte limits no longer ends the process with an out-of-memory crash.
182
+ The largest real document we know is 71 MiB and 2.65 million nodes. A `customFetch` in the
183
+ Redocly config is limited too.
184
+
185
+ ### Patch Changes
186
+
187
+ - [#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,
188
+ no longer makes the generator throw `URIError: URI malformed`. openapi-typescript read such a key
189
+ as a `$ref`; now it is one segment of the pointers the generator builds, so an `--enum-values`
190
+ array of such a key points at its own node. The exported `createRef` keeps the old behaviour. The
191
+ new enum names of such keys are listed under Major Changes.
192
+
193
+ These pointers, and the ones in the generator's errors, escape `#` as `%23` and `%` as `%25`
194
+ (RFC 6901), so a key like `a#` no longer cuts a pointer short. A discriminator `mapping` to a
195
+ schema whose name has a `%`, such as `50%`, no longer throws `URIError` either.
196
+
197
+ - [#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,
198
+ such as `Can't resolve $ref`; the rejected `SCHEMA_INVALID` error lists them in
199
+ `details.problems`. openapi-typescript printed them to stderr even with `silent`.
200
+
201
+ ## 1.0.0-rc.3
202
+
203
+ ### Patch Changes
204
+
205
+ - [#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
206
+ `OPENAPI_TYPESAFE_DEP_*` code, shown once per process. The TypeScript-node forms of `transform`,
207
+ `postTransform` and `transformProperty` used to print a warning line with the code
208
+ `LEGACY_CALLBACK_DEPRECATED` through the generator's logger; they now emit
209
+ `OPENAPI_TYPESAFE_DEP_TS_TRANSFORM`, `OPENAPI_TYPESAFE_DEP_TS_POST_TRANSFORM` and
210
+ `OPENAPI_TYPESAFE_DEP_TS_TRANSFORM_PROPERTY`, as `stringToAST()` emits
211
+ `OPENAPI_TYPESAFE_DEP_STRING_TO_AST`. `node --no-deprecation` hides them, `--throw-deprecation`
212
+ makes them errors, and `silent` no longer hides them. The new `DEPRECATION_CODES` export lists the
213
+ codes; `STRING_TO_AST_DEPRECATION_CODE` and the `LEGACY_CALLBACK_DEPRECATED` warning code, which
214
+ only rc versions had, are removed.
215
+
216
+ - [#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`,
217
+ `itemSchema`, `in: querystring`, `components.mediaTypes`) are experimental in 1.x: a minor release
218
+ may change their shape, for example to match openapi-typescript once it supports 3.2, and its
219
+ changelog says so. The output of documents without these keys, `client.QUERY()` and the `"query"`
220
+ member of `HttpMethod` keep the full semver promise.
221
+
222
+ - [#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`
223
+ (a fix name or `"all"`), as ADR-021 describes. The `OutputFix` object (`OutputFix.ALLOF_REQUIRED`)
224
+ and the `ALL_OUTPUT_FIXES` constant, which only rc versions had, are removed: write the fix names
225
+ as strings, for example `fix: ["allof-required"]` or `fix: ["all"]`.
226
+
227
+ - [#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
228
+ package manager with a minimum release age (for example bun's `minimum-release-age` of 7 days)
229
+ refused while that version was new.
230
+
231
+ ## 1.0.0-rc.2
232
+
233
+ ### Minor Changes
234
+
235
+ - [#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
236
+ Redocly rule. New warnings, which change neither output nor exit code: a repeated `operationId`,
237
+ paths that differ only in parameter names, a discriminator value its member does not allow, an
238
+ unknown `x-openapi-ts` key, and an unknown CLI flag.
239
+
240
+ ### Patch Changes
241
+
242
+ - [#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.
243
+
244
+ - [#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`.
245
+
246
+ - [#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
247
+ accepted. It now returns the node when a `$ref` that is not a string is found, instead of failing.
248
+
249
+ ## 1.0.0-rc.1
250
+
251
+ ### Patch Changes
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 output fix `allof-discriminated-union` (`--fix allof-discriminated-union`, ADR-021): a schema
254
+ that `allOf`s a discriminated `oneOf` or `anyOf` it is not a member of is typed as that union.
255
+ Before, it got `Omit<Union, "pet_type">`, which keeps only the keys every member has, and a value
256
+ of its own schema name (`{ pet_type: "B" } & …`) that no member allows, so
257
+ `B: { pet_type: "B" } & Omit<components["schemas"]["A"], "pet_type">` is now
258
+ `B: components["schemas"]["A"]` (openapi-typescript
259
+ [#1464](https://github.com/openapi-ts/openapi-typescript/issues/1464),
260
+ [#1690](https://github.com/openapi-ts/openapi-typescript/issues/1690)). A schema that the union's
261
+ `mapping` names is a member and stays as it was. A schema that only reuses the union gets no
262
+ `DISCRIMINATOR_VALUE_NOT_ALLOWED` warning for a value it does not get. Without the fix the output
263
+ does not change; `--fix all` now includes it.
264
+
265
+ - [#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
266
+ "Unexpected error" with a stack trace and exited with 70, the code for a bug. It now prints one
267
+ line that names the file and the reason, with the new error code `CLI_CONFIG_INVALID`, and exits
268
+ with 2, the code for a wrong Redocly config.
269
+
270
+ - [#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
271
+ stdin (stdin is a terminal) now fails at once with exit code `2` and `CLI_INPUT_MISSING`. Before,
272
+ it waited for a schema typed into the terminal with no prompt, which looked like a hang
273
+ (openapi-typescript [#1905](https://github.com/openapi-ts/openapi-typescript/issues/1905)). A
274
+ schema piped into stdin is read as before.
275
+
276
+ - [#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`,
277
+ `--local-ref-root` or in a `redocly.yaml` `root` or `output` is part of the file name. Before, the
278
+ path was parsed as a URL, so `specs/#v2/api.yaml` read `specs/` and `a%20b.yaml` read `a b.yaml`.
279
+ A one-letter scheme is a Windows drive, so `C:\specs\api.yaml` is a path. URLs (`https:`, `file:`)
280
+ work as before.
281
+
282
+ - [#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
283
+ [#1665](https://github.com/openapi-ts/openapi-typescript/issues/1665)). Each member was typed as
284
+ `Omit<Union, "type"> & …`, and the union contains the member, so TypeScript failed with "is
285
+ referenced directly or indirectly in its own type annotation" (TS2502). A member now gets the
286
+ union's own properties instead (`{ id?: string } & { age?: number } & { type: "CAT" }`), or none
287
+ when the union has only the discriminator property. A union that inherits its discriminator
288
+ through `allOf` gets no value of its own (`kind: "Pet"`), which made every member `never`. On by
289
+ default: only output that did not
290
+ compile changes.
291
+
292
+ - [#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
293
+ its own `properties` got the property twice in one object type (`class: "Child"; class?:
294
+ "Child";`), and the output did not compile (TS2300). The schema's own declaration is now kept,
295
+ required as a discriminator property must be. Output that compiled stays the same.
296
+
297
+ - [#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):
298
+ `required` next to an `allOf` `$ref` keeps `WithRequired` when the target is also a member of a
299
+ discriminated `oneOf`. Before, a discriminator elsewhere in the document dropped it, so
300
+ `Cat: WithRequired<components["schemas"]["CatProps"], "kittens">` became
301
+ `Cat: components["schemas"]["CatProps"]` and `kittens` stayed optional (openapi-typescript
302
+ [#2162](https://github.com/openapi-ts/openapi-typescript/issues/2162)). The discriminator property
303
+ itself is required in the target already and is not repeated. Without the fix the output does not
304
+ change; `--fix all` now includes it.
305
+
306
+ - [#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
307
+ property `enum` or `const` does not allow now gets a warning that names the Discriminator Object
308
+ rule and the mapping entry to add (`DISCRIMINATOR_VALUE_NOT_ALLOWED`). No value of such a schema matches the discriminator. A member that inherits
309
+ the discriminator through an `allOf` chain (`Lion` of `Cat` of `Pet`) is checked too.
310
+
311
+ - [#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
312
+ corrects every case of the value a discriminator member gets. Projects that list it in rc.0 get
313
+ new output:
314
+ - A schema that defines a discriminator with a `mapping` and also `allOf`s another discriminator
315
+ owner keeps its own discriminator. Before, the inherited one replaced it, so the schemas listed
316
+ after the owner got their schema name instead of the mapped value (`contentType:
317
+ "JDocumentContentModel"` instead of `"jDocument"`), and the output depended on the order of the
318
+ schemas (openapi-typescript [#2200](https://github.com/openapi-ts/openapi-typescript/issues/2200)).
319
+ A discriminator of another property that the owner inherits still gives its members a value:
320
+ `Video` of `Content` (which owns `subtype`) of `Element` (which owns `contentType`) gets both.
321
+ Its value of the other property is its own (`contentType: "Video"` when no mapping names it),
322
+ also when `Element`'s mapping names `Content`: `Content`'s `"content"` is left out of `Video`.
323
+ - A member that already requires the property with exactly its values (`enum: [agent]` or
324
+ `const: agent`) gets no second, added property: `{ type: "agent" }`, not
325
+ `{ type: "agent" } & { type: "agent" }`
326
+ ([#2124](https://github.com/openapi-ts/openapi-typescript/issues/2124)).
327
+ - With `--enum`, when the owner's property is an enum (`petType: { $ref: PetType }`), a member's
328
+ value is a member of that enum, `petType: PetType.Cat`, with or without a mapping. Before, each
329
+ member declared an enum of its own (`CatPetType`) or got the string `"Cat"`, and neither is
330
+ assignable to `PetType`, so a `Cat` was not a `Pet`
331
+ ([#1700](https://github.com/openapi-ts/openapi-typescript/issues/1700)). A value from a
332
+ discriminator that declares no such property (a `oneOf` with a `mapping`) is a member of the
333
+ enum the member inherits. With `--dedupe-enums`, a shared enum keeps the name it has without
334
+ the fix (`OtherK`, not the owner's `PetPetType`).
335
+
336
+ Without the fix the output does not change; `--fix all` includes it.
337
+
338
+ - [#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
339
+ one schema, were declared twice with the same member names, and the output did not compile
340
+ (TS2300). TypeScript merges the declarations, so a later one now leaves out the members an earlier
341
+ one has, a member whose name an earlier one gives another value gets a number (`a_b_2`), and a
342
+ declaration with nothing new is left out. Output that compiled stays the same.
343
+
344
+ - [#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
345
+ two `prefixItems` entries with the same enum, declared the same `export const …Values` twice, and
346
+ the file failed with "Cannot redeclare block-scoped variable" (TS2451). Output that compiled
347
+ before does not change.
348
+
349
+ - [#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
350
+ hold their values are typed by their own values (`ReadonlyArray<"a" | "b">`), so the output
351
+ compiles: a schema under `definitions` or an `allOf` member, a property of a schema whose type is
352
+ `unknown`, an `anyOf` array member next to a non-array one, an empty enum (`readonly never[]`), a
353
+ property `--read-write-markers` wraps in `$Read<T>` or `$Write<T>`, or a schema that contradicts
354
+ itself (an `allOf` of different enums, a discriminator value its enum does not list). The last
355
+ case also prints a warning (`ENUM_VALUES_EXCLUDED`). Arrays whose type compiled stay the same
356
+ (ADR-027).
357
+
358
+ - [#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
359
+ the union with `Extract<T, { name: unknown }>`. A property name that is not an identifier, such as
360
+ `content-type`, was written without quotes there, and the output had a syntax error. It is now
361
+ quoted. Output that compiled stays the same.
362
+
363
+ - [#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
364
+ `discount/type`, or of a property and an inline `allOf` item of one schema, declared one `const`
365
+ twice, and the output did not compile (TS2451). The later array now gets a number,
366
+ `discountTypeValues_2`. Output that compiled stays the same.
367
+
368
+ - [#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`,
369
+ `components.pathItems`) was typed as `paths["/a"]["parameters"]["parameters"]["path"]["id"]`, which
370
+ does not exist, and the output did not compile (TS2339). It now indexes `parameters` once. The
371
+ array names and output that compiled stay the same.
372
+
373
+ - [#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
374
+ property or schema lists the `description` of each `anyOf` and `oneOf` member, which was dropped
375
+ (openapi-typescript [#2142](https://github.com/openapi-typesafe/openapi-typesafe/issues/2142)).
376
+
377
+ - [#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
378
+ variants have only `required` keys of the sibling `properties` gives the parent with each variant's
379
+ keys required (`WithRequired<Props, "a"> | WithRequired<Props, "b">`) instead of `Props | unknown`,
380
+ which is `unknown`. A key whose property `--exclude-deprecated` leaves out keeps the old output.
381
+ With a `type` list (`[object, "null"]`) only the `object` member gets the keys.
382
+
383
+ - [#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
384
+ enum is named by a rule that does not depend on the document order (its component schema, else the
385
+ shortest name, else code-unit order), so adding a schema no longer renames it
386
+ (openapi-typescript [#1683](https://github.com/openapi-typesafe/openapi-typesafe/issues/1683)).
387
+
388
+ - [#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:
389
+ ["exploded-query-objects"]`): a query parameter with an object schema and the default `style: form`,
390
+ `explode: true` is sent as its own keys (`?page=1&size=10`), so its properties become keys of
391
+ `query` instead of one key named after the parameter (openapi-typescript [#2361](https://github.com/openapi-typesafe/openapi-typesafe/issues/2361)). The default
392
+ `querySerializer` of `openapi-typesafe-fetch` already sends this format.
393
+
394
+ - [#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
395
+ TypeScript enum of its other values, typed `E | null` where the schema allows `null`, instead of
396
+ staying a union (openapi-typescript [#1872](https://github.com/openapi-typesafe/openapi-typesafe/issues/1872)).
397
+
398
+ - [#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
399
+ 2020-12. It is open unless `items` or `unevaluatedItems` is `false`, further items get the `items`
400
+ type, and elements after `minItems` are optional (openapi-typescript [#1892](https://github.com/openapi-typesafe/openapi-typesafe/issues/1892)).
401
+
402
+ - [#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
403
+ that a property references with `$ref` or `allOf` make the property `readonly` and count for
404
+ `--read-write-markers`, as in OpenAPI 3.0 and 3.1 (openapi-typescript [#1938](https://github.com/openapi-typesafe/openapi-typesafe/issues/1938)).
405
+
406
+ - [#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
407
+ get a warning, `PATH_TEMPLATES_IDENTICAL`: the OpenAPI Paths Object forbids them. With
408
+ `--path-params-as-types` they share one key type, and when their path items had the same type the
409
+ output repeated the index signature and did not compile (TS2374); each of them is now in an object
410
+ of its own in the `paths` intersection, as paths with different types already were. Warnings about
411
+ the document now end with a code, as errors do: the `in: querystring` warning ends with
412
+ `(QUERYSTRING_NEXT_TO_QUERY)`.
413
+
414
+ - [#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
415
+ resolve in `cwd`. openapi-typescript 7.13 and 1.0.0-rc.0 read them from the parent of `cwd`. A
416
+ `cwd` path with `#` or `%` works, and a `cwd` URL without a trailing slash is a directory. A setup
417
+ that kept the shared files one level up must now pass that directory as `cwd` (ADR-023).
418
+
419
+ - [#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
420
+ `redocly lint` skips them (openapi-typescript
421
+ [#2189](https://github.com/openapi-ts/openapi-typescript/issues/2189)). Before, an ignored error
422
+ still stopped the generation with `SCHEMA_INVALID`.
423
+
424
+ - [#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
425
+ (`$ref: "#/paths/~1a/get/responses/200/content/application~1json/schema/items"`, written as
426
+ `...["application/json"][number]`) stayed in the `paths` interface under a template that covers
427
+ it, and the output did not compile (TS2413). The overlap check now reads `T[number]` of an array
428
+ as its element, so it sees that an item is no array and moves the template, as rc.0 did.
429
+
430
+ - [#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
431
+ `true | false` response also matches (`enum: [true, false]`) moved the template into a `paths`
432
+ intersection, although TypeScript accepts `boolean` there. The overlap check now reads `boolean`
433
+ as `true | false` against a union, and the output is the same as openapi-typescript 7.13 gives.
434
+
435
+ - [#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
436
+ a union, an array item, a tuple or a property type other than an object compiles. It gave TS2413
437
+ 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)):
438
+ the overlap check read only methods, parameter locations and required properties. It now compares
439
+ the types the way TypeScript does and writes such a template in an object of its own. Output that
440
+ compiled is unchanged.
441
+
442
+ - [#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
443
+ moved into a `paths` intersection, although that output compiles. The overlap check matched the
444
+ keys by trying every split of the text; TypeScript matches each text of the template at its first
445
+ occurrence and never checks `` `/a/b/${number}` `` against that template. The check now follows
446
+ TypeScript's matching only, so the output is the same as openapi-typescript 7.13 gives.
447
+ A template of only `${boolean}` placeholders, which is no index signature (TS1337), no longer
448
+ moves another template either.
449
+
450
+ - [#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
451
+ paths, which took over four minutes for Microsoft Graph beta (about 10 000 paths); it now compares
452
+ a template only with the paths that start with its first text, and takes seconds.
453
+
454
+ - [#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
455
+ `` `/a/${string}` `` that also matches `/a/{id}/b` was moved into a `paths` intersection whenever
456
+ the overlap check could not read a type of the covered path, such as `Record<string, never>` for
457
+ an empty object schema, although TypeScript accepts it. The check now moves a template only where
458
+ the covered type surely does not fit; where it cannot tell, the output is the same as
459
+ openapi-typescript 7.13 gives, `export interface paths` included.
460
+
461
+ - [#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
462
+ `/invoices/{id}/lines/{number}`, now gives the same key as openapi-typescript 7.13,
463
+ `` `/invoices/$${number}/lines/{number}` ``: the original replaces the first `{number}` in the
464
+ key, which is in the placeholder of `{id}`. The rc gave every parameter its own placeholder; that
465
+ key is now the new opt-in fix `path-param-type-names` (`--fix=path-param-type-names`), since both
466
+ outputs compile.
467
+
468
+ - [#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
469
+ operations differ only in a referenced response schema, gave output that did not compile (TS2413,
470
+ openapi-typescript [#1752](https://github.com/openapi-typesafe/openapi-typesafe/issues/1752)). The overlap check now reads the `operations` and `components` types the
471
+ paths reference, so such a template gets its own object in the `paths` intersection. Output that
472
+ compiled stays byte-identical. This fix is on by default.
473
+
474
+ - [#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
475
+ response is an open `prefixItems` tuple, such as `[string?, ...string[]]`, under a `string[]`
476
+ response gave output that did not compile (TS2413). The overlap check took the optional element
477
+ for a `string`; it may be `undefined`, so the template now gets an object of its own.
478
+
479
+ - [#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
480
+ the alias `Blob`, which hid the global type, so every binary body and response silently had the
481
+ type of that schema. Its alias is now `Blob_2`, as a schema named `Record` already gets
482
+ `Record_2`.
483
+
484
+ - [#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
485
+ the output uses, such as `Record`, got an alias of that name (`export type Record = …`). It shadowed
486
+ the global, and every `Record<string, never>` of the output failed to compile (TS2315). The alias is
487
+ now numbered like other root type conflicts (`Record_2`). An alias of a global name that the output
488
+ does not use, and output that compiled, stay the same.
489
+
490
+ - [#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
491
+ `record` and `Record` gave `Record_2` to `record`, although without the fix `Record_2` is the alias
492
+ of `Record` (the name `Record` itself shadows the global type the output uses). The earlier schemas
493
+ are now numbered after the shared name got its own, so `Record_2` keeps its schema and the fix
494
+ only adds `Record_3`, as the docs promise.
495
+
496
+ - [#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
497
+ `#/paths/~1a/get/responses/200/content/application~1json/schema/items/properties/time`,
498
+ `#/components/schemas/Base/allOf/0/properties/id` or `#/components/schemas/A/definitions/B`, was
499
+ indexed by the keyword names (`["schema"]["items"]`), which the generated types do not have, and did
500
+ not look through optional or nullable values; the output did not compile (TS2339, TS2532, TS2344).
501
+ Where it does not compile, the `schema` of a media type, header or component parameter is now left
502
+ out, `items` is indexed by `number`, `additionalProperties` by `string`, an optional value (also a
503
+ response header without `required: true`) is wrapped in `NonNullable`, and a target behind
504
+ `allOf/N`, `definitions` or operation and path item `parameters/N` is written inline. Output that
505
+ compiled stays the same (ADR-026): a key of `type: object` without properties
506
+ (`Record<string, never>`) is `never` and compiles, so it is kept, and `items` next to
507
+ `type: string` or `type: object` has no type of its own, so its target is written inline. With
508
+ `--enum` an inline target uses the enum the generator declares for that schema, so no second,
509
+ incompatible TypeScript enum (and no second `--enum-values` array) is named after the pointer.
510
+ A pointer that indexes a value typed `unknown` is corrected too: one into a schema with no `type`
511
+ and no object keywords, or, with `--additional-properties`, one past `allOf` of a schema whose parts
512
+ all read `allOf` through `[key: string]: unknown` (`B["allOf"]["0"]`, TS2339).
513
+
514
+ New opt-in fix `ref-pointers` (`--fix ref-pointers`): the same type also where the original compiled
515
+ through an index signature (`--additional-properties`) as `unknown`.
516
+
517
+ - [#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
518
+ `--no-alphabetise`, not `--alphabetise`.
519
+
520
+ ## 1.0.0-rc.0
521
+
522
+ ### Major Changes
523
+
524
+ - [#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
525
+ openapi-react-query. The CLI flags, the Node API and the output of valid schemas match
526
+ openapi-typescript 7.13; the changes below are fixes and opt-in features. Version 1.0 makes these
527
+ contracts semver-stable. `npx openapi-typesafe-migrate --write` moves a project over.
528
+
529
+ ### Minor Changes
530
+
531
+ - [`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
532
+ valid schemas (ADR-021). Give fix names, comma-separated, or `all` for every fix of the installed
533
+ version; an unknown name fails with `OPTION_FIX_UNKNOWN`. Without it the output does not change.
534
+ The fixes become the default in 2.0.
535
+
536
+ The first fix, `allof-required`: an `allOf` member with only `required` (and `type: object` or
537
+ annotations), inline or behind a `$ref`, no longer adds `& Record<string, never>` or `& unknown`;
538
+ its keys become required in the other members, so `Info & Record<string, never>` is now
539
+ `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`
540
+ member is left out too.
541
+
542
+ - [`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
543
+ `properties`, `additionalProperties` or `allOf` is intersected with them, so
544
+ `{ name?: string } | Email | Phone` is now `{ name?: string } & (Email | Phone)` and a value must
545
+ match a variant (openapi-typescript [#2380](https://github.com/openapi-typesafe/openapi-typesafe/issues/2380)); `type: string` with `anyOf` enums becomes
546
+ `string & ("a" | "b")`. With a `type` list, each listed type is intersected
547
+ and `null` is kept. Without the fix the output does not change; `--fix all` now includes it.
548
+
549
+ - [`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`:
550
+ `minItems: 1, maxItems: 2` gives `[string] | [string, string]` instead of `[] | [string]`; a nested
551
+ array is no longer wrapped twice (`[string[]]`, not `[string[][]]`); with `--immutable` the length
552
+ tuples are `readonly`; and a `prefixItems` tuple is not wrapped in length tuples
553
+ (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
554
+ naming it prints a notice. Without the fix the output does not change.
555
+
556
+ - [`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`
557
+ instead of `string`, so file uploads and downloads type check without a `transform` callback.
558
+ Raw binary is `format: binary` (OpenAPI 3.0), or a `contentMediaType` that is not text and has no
559
+ `contentEncoding` (3.1, also without `type`). `format: byte`, encoded strings and text media types
560
+ (`text/*`, JSON, XML, YAML) stay `string`. Off by default, so the output does not change. The
561
+ names follow openapi-typescript PR [#2878](https://github.com/openapi-typesafe/openapi-typesafe/issues/2878) by @joaodibba; closes openapi-typescript#1214.
562
+
563
+ The `SchemaObject` type of the Node API gains the OpenAPI 3.1 keywords `contentMediaType` and
564
+ `contentEncoding`.
565
+
566
+ - [`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
567
+ for the call stack fails with `SCHEMA_TOO_DEEP`. A `$ref` cycle with no schema in between fails
568
+ with `SCHEMA_REF_INVALID`. Keys such as `valueOf` that the schema loader cannot read fail with
569
+ `SCHEMA_KEY_UNSUPPORTED` and are all listed. A remote `$ref` that does not answer stops after 60
570
+ seconds. See the new Limits section in the advanced guide.
571
+
572
+ - [`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).
573
+
574
+ - [`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
575
+ schema that a `mapping` names and that a discriminated `oneOf` without a mapping also lists gets
576
+ two discriminator properties, the mapped value and the schema name (`kind: "cat"` and
577
+ `kind: "Cat"`), which intersect to `never`. With it the values of a property merge into one enum,
578
+ and the schema name is used only where no mapping gives the schema a value. Without the fix the
579
+ output is unchanged.
580
+
581
+ - [`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).
582
+
583
+ - [`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).
584
+
585
+ - [`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.
586
+
587
+ - [`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)).
588
+
589
+ - [`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).
590
+
591
+ - [`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
592
+ "Unsupported OpenAPI version: 3.2.0" error that `openapi-typescript` 7.13.0 reports (see ADR-005).
593
+
594
+ - [`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
595
+ `query` member after `trace` (only where declared), `additionalOperations` a member keyed by the
596
+ exact method name, `itemSchema` an `itemContent` map next to `content` (which keeps the `schema`
597
+ type), an `in: querystring` parameter the `query` member of `parameters`, and
598
+ `components.mediaTypes` a `components` member that `content` entries can reference. Documents that
599
+ use none of these keep their output. The warnings for these features are gone; a `querystring`
600
+ parameter next to `in: query` parameters (not allowed in 3.2) still warns and is not typed.
601
+ `--make-paths-enum` and `--path-params-as-types` include the new operations. A discriminator
602
+ without `propertyName` (allowed in 3.2) no longer omits a property named `undefined`.
603
+
604
+ The Node API types gain `query`, `additionalOperations`, `itemSchema`, `in: "querystring"`,
605
+ `components.mediaTypes` and `discriminator.defaultMapping`. Upstream: openapi-typescript#2577,
606
+ 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).
607
+
608
+ - [`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>`
609
+ (`localRefRoot`) loads local `$ref` files only from that directory, and `--remote-ref-hosts
610
+ <hosts>` (`remoteRefHosts`) loads remote `$ref` documents only from the listed hosts, including
611
+ each redirect. A refused `$ref` fails with the new error code `SCHEMA_REF_FORBIDDEN`. Without the
612
+ options nothing changes. See "Untrusted documents" in the advanced guide.
613
+
614
+ - [`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
615
+ --root-types-no-schema-prefix`, schemas of one PascalCase name (`PetStore`, `pet_store`) each get
616
+ a root alias: the later keeps the name, as before, and the earlier get the next free number
617
+ (`PetStore_2`), instead of no alias. It needs both flags and prints a notice without them. Without
618
+ the fix the output is unchanged.
619
+
620
+ - [`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).
621
+
622
+ - [`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.
623
+
624
+ **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).
625
+
626
+ - [`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
627
+ `unevaluatedProperties` is ignored, so an object with only that keyword is `Record<string, never>`.
628
+ With it the keys that no other keyword declares get its type through an index signature, which
629
+ also holds the declared property types of the schema and its `allOf`, `anyOf` and `oneOf` members
630
+ (`PropertyValues<T>` for a `$ref`), so valid values stay assignable (openapi-typescript [#2839](https://github.com/openapi-typesafe/openapi-typesafe/issues/2839),
631
+ [#2880](https://github.com/openapi-typesafe/openapi-typesafe/issues/2880)). Without the fix the output is unchanged.
632
+
633
+ - [`323e9a5`](https://github.com/openapi-typesafe/openapi-typesafe/commit/323e9a567c7ff3ddad7bc7a1bfa39b859e94b296) Thanks [@drwpow](https://github.com/drwpow)! - Add ability to set flags in redocly.yaml
634
+
635
+ ### Patch Changes
636
+
637
+ - [`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`).
638
+ The bundled ref named a different key, so the types did not compile, or crashed the generator.
639
+ A local `$ref` with a malformed `%` escape now fails with `SCHEMA_REF_INVALID` and names the ref,
640
+ instead of an unexpected error.
641
+
642
+ - [`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
643
+ TypeScript node (a plain object, or text from `postTransform`) now fails with
644
+ `CALLBACK_RESULT_UNREADABLE` and names the callback and the schema path, instead of
645
+ `Debug Failure. Unhandled SyntaxKind` or a `TypeError`. `transform` returning text still keeps the
646
+ default type, as in openapi-typescript.
647
+
648
+ - [`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
649
+ `CLI_CHECK_OUTPUT_MISSING`. Before, it printed the types and exited with 0 without checking
650
+ anything, so a CI check could pass by mistake.
651
+
652
+ - [`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).
653
+
654
+ - [`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.
655
+
656
+ - [`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
657
+ operation twice in `operations` and does not compile without `skipLibCheck`. The warning does not
658
+ change the output or the exit code; the Node API already rejects such a schema.
659
+
660
+ - [`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).
661
+
662
+ - [`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
663
+ for multiple schemas instead of the openapi-typescript site.
664
+
665
+ - [`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
666
+ network reason and the URL (`fetch failed: connect ECONNREFUSED … (http://…)`), not only
667
+ `fetch failed`; the Node API error keeps its message and now has the network error in `cause`.
668
+ YAML nested deeper than the parser limit now says to move nested schemas to `components` and
669
+ use `$ref`.
670
+
671
+ - [`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
672
+ run still goes on, as before, but a typo such as `--alphabetise` no longer changes the output
673
+ without a word.
674
+
675
+ - [`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
676
+ and 24 too. Before, parsing it threw a raw `RangeError` there.
677
+
678
+ - [`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
679
+ longer need a `$defs` key, and refs into it use `NonNullable<…>` (upstream [#2664](https://github.com/openapi-typesafe/openapi-typesafe/issues/2664)). The root
680
+ `$defs` now has one member per subschema instead of `Record<string, never>`, so `#/$defs/<name>`
681
+ refs resolve to the subschema type instead of `never`.
682
+
683
+ - [`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.
684
+
685
+ - [`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
686
+ `discriminator.mapping` names and that a discriminated `oneOf` lists got its `…Kind` enum twice,
687
+ and the file failed with "Duplicate identifier". Inherited from openapi-typescript.
688
+
689
+ - [`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
690
+ `SCHEMA_VERSION_UNSUPPORTED` ("Unsupported schema format, expected `openapi: 3.x`") instead of a
691
+ `TypeError` and exit code 70. Inherited from openapi-typescript.
692
+
693
+ - [`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).
694
+
695
+ - [`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
696
+ characters are replaced (`reactions-+1` and `reactions--1` are both `reactions_1`) gave a
697
+ "Duplicate identifier" error. A repeated name now gets a number (`reactions_1_2`); names that did
698
+ not collide stay the same.
699
+
700
+ - [`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).
701
+
702
+ - [`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.
703
+
704
+ - [`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
705
+ `items` of a kept array or a kept operation's response, is kept, so the output no longer names a
706
+ missing `components["schemas"]` key (TS2339). A deprecated component that only dropped parts
707
+ reference (deprecated operations, parameters or properties) is still left out.
708
+
709
+ - [`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,
710
+ the promise never settled.
711
+
712
+ - [`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
713
+ fails with `SCHEMA_PARSE_FAILED`, as text input does, instead of `SCHEMA_LOAD_FAILED`, and the
714
+ message names the file. The exit code stays `3`.
715
+
716
+ - [#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
717
+ drive letter on Windows) fails with `SCHEMA_LOAD_FAILED` and the URL in `details.source`, as a
718
+ missing file does. Before, it failed with Node's untyped `TypeError`.
719
+
720
+ - [`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.
721
+
722
+ - [`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.
723
+
724
+ - [`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
725
+ does not (Unicode 16 and 17 letters such as `꟒`): they become `_`, so the generated file parses.
726
+ Before, such a schema name gave "Invalid character" errors. See ADR-019.
727
+
728
+ - [`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.
729
+
730
+ - [`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
731
+ missing file inside the root was refused with `SCHEMA_REF_FORBIDDEN` as if it were outside.
732
+ It is now reported as an unresolved `$ref`, like any missing file.
733
+
734
+ - [`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.
735
+
736
+ - [`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).
737
+
738
+ - [`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
739
+ path (`/apps/regions`, `` `/apps/${string}/restart` ``) whose type does not fit the template's (a
740
+ method or a parameter location one has and the other has not), the output did not compile
741
+ (TS2411, TS2413). `paths` is then an intersection type alias with each such template in an object
742
+ of its own, which removes those errors, and every path keeps the type it had. Output that
743
+ compiled stays the same, `export interface paths` included.
744
+
745
+ - [`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
746
+ `pathToFileURL(path)`. A string source is document text, so a file path was parsed as YAML and
747
+ failed with the unclear "Unsupported schema format, expected `openapi: 3.x`".
748
+
749
+ - [`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
750
+ the URL that collided (`GetUser` for both `/user` and `/user/{user_id}`) now name the path
751
+ parameters (`GetUserByUserId`), and a name that still repeats, such as a repeated `operationId`,
752
+ gets a number (`listItems2`). Names that did not collide are unchanged.
753
+
754
+ - [`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).
755
+
756
+ - [`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`
757
+ in response data into an object whose methods could not be called, so `data.file.arrayBuffer()`
758
+ did not type check. The helper types that `--read-write-markers` writes into the output change the
759
+ same way. See ADR-014, decision 6.
760
+
761
+ - [`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).
762
+
763
+ - [`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
764
+ OpenAPI 3.2 documents, so an install that resolved one of them failed on 3.2 input.
765
+
766
+ - [`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
767
+ the body slowly kept the run waiting, and a root URL then failed with "Cannot set property message
768
+ of ... which has only a getter" instead of "Timed out after 60000 ms loading <url>".
769
+
770
+ - [`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
771
+ port (`api.example.com:443`), a bare IPv6 address (`::1`), a trailing dot, a Unicode host name or
772
+ another IPv4 form now match the URLs they name; before, such `$ref`s were refused. Entries that
773
+ are not a host (with `/`, `@` or `#`) never match.
774
+
775
+ - [`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
776
+ `WithRequired` with `--root-types-no-schema-prefix`) is renamed to `WithRequired_2`, as aliases that
777
+ an enum takes already are. Before, both were declared under one name, which does not compile.
778
+
779
+ - [`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,
780
+ both were exported under one name and the output did not compile. The alias now gets the next free
781
+ 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).
782
+
783
+ - [`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
784
+ TypeScript reserves (`void`, `class`, `string`, …) keeps the prefix (`Schemavoid`), as a name that
785
+ starts with a digit already does. Before, `export type void` did not compile.
786
+
787
+ - [`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
788
+ same output as openapi-typescript again: the last schema gets `Void` and the earlier ones have no
789
+ root alias. `1.0.0-beta.2` also added numbered aliases (`Void_2`), which changed valid output;
790
+ that is now a backlog item for an opt-in flag.
791
+
792
+ - [`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
793
+ schema.` With several APIs in `redocly.yaml`, this tells which output to regenerate.
794
+
795
+ - [`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
796
+ them after narrowing a Schema Object to `type: "string"`.
797
+
798
+ - [`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
799
+ after invalid characters are removed now gets the `Value` prefix (`0 a-b` gave `value0 a-b`).
800
+ With `--root-types-keep-casing`, characters that cannot be in an identifier become `_`
801
+ (`Schemamy pet` is now `Schemamy_pet`). With `--root-types-no-schema-prefix`, a name that would
802
+ start with a digit keeps its prefix (`Schema1`). Names that were valid before do not change.
803
+
804
+ - [`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,
805
+ `additionalOperations`, `in: querystring` parameters and `itemSchema`. Each use prints its JSON
806
+ Pointer. Before, they were dropped without a word. See "OpenAPI 3.2 features" in the docs.
807
+
808
+ - [`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"
809
+ document) now fails at once with `SCHEMA_PARSE_FAILED`. Before, the run took minutes and ended
810
+ with "RangeError: Set maximum size exceeded". Real documents that reuse anchors are not affected:
811
+ the limit starts at 1,000,000 expanded nodes and 100 times the written size.
812
+
813
+ ## 7.13.0
814
+
815
+ ### Minor Changes
816
+
817
+ - [#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.
818
+
819
+ ## 7.12.0
820
+
821
+ ### Minor Changes
822
+
823
+ - [#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
824
+
825
+ ### Patch Changes
826
+
827
+ - [#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.
828
+
829
+ ## 7.11.0
830
+
831
+ ### Minor Changes
832
+
833
+ - [#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
834
+
835
+ ## 7.10.2
836
+
837
+ ### Patch Changes
838
+
839
+ - [#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...)
840
+
841
+ - [#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
842
+
843
+ ## 7.10.1
844
+
845
+ ### Patch Changes
846
+
847
+ - [#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
848
+
849
+ ## 7.10.0
850
+
851
+ ### Minor Changes
852
+
853
+ - [#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
854
+
855
+ - [#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
856
+
857
+ ## 7.9.1
858
+
859
+ ### Patch Changes
860
+
861
+ - [#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
862
+
863
+ - [#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
864
+
865
+ ## 7.9.0
866
+
867
+ ### Minor Changes
868
+
869
+ - [#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.
870
+
871
+ ## 7.8.0
872
+
873
+ ### Minor Changes
874
+
875
+ - [#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
876
+
877
+ ## 7.7.3
878
+
879
+ ### Patch Changes
880
+
881
+ - [#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
882
+
883
+ ## 7.7.2
884
+
885
+ ### Patch Changes
886
+
887
+ - [#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.
888
+
889
+ ## 7.7.1
890
+
891
+ ### Patch Changes
892
+
893
+ - [#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`
894
+
895
+ ## 7.7.0
896
+
897
+ ### Minor Changes
898
+
899
+ - [#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
900
+
901
+ ### Patch Changes
902
+
903
+ - [#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
904
+
905
+ - [#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}`)
906
+
907
+ - [#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.
908
+
909
+ ## 7.6.1
910
+
911
+ ### Patch Changes
912
+
913
+ - [#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
914
+
915
+ ## 7.6.0
916
+
917
+ ### Minor Changes
918
+
919
+ - [#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
920
+
921
+ ## 7.5.2
922
+
923
+ ### Patch Changes
924
+
925
+ - [#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
926
+
927
+ ## 7.5.1
928
+
929
+ ### Patch Changes
930
+
931
+ - [#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
932
+
933
+ ## 7.5.0
934
+
935
+ ### Minor Changes
936
+
937
+ - [#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
938
+
939
+ - [#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
940
+
941
+ ## 7.4.4
942
+
943
+ ### Patch Changes
944
+
945
+ - [#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.
946
+
947
+ ## 7.4.3
948
+
949
+ ### Patch Changes
950
+
951
+ - [#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
952
+
953
+ ## 7.4.2
954
+
955
+ ### Patch Changes
956
+
957
+ - [#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
958
+
959
+ ## 7.4.1
960
+
961
+ ### Patch Changes
962
+
963
+ - [#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
964
+
965
+ ## 7.4.0
966
+
967
+ ### Minor Changes
968
+
969
+ - [#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
970
+
971
+ ## 7.3.3
972
+
973
+ ### Patch Changes
974
+
975
+ - [#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
976
+
977
+ ## 7.3.2
978
+
979
+ ### Patch Changes
980
+
981
+ - [#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`
982
+
983
+ ## 7.3.1
984
+
985
+ ### Patch Changes
986
+
987
+ - [#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
988
+
989
+ ## 7.3.0
990
+
991
+ ### Minor Changes
992
+
993
+ - [#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
994
+
995
+ ## 7.2.0
996
+
997
+ ### Minor Changes
998
+
999
+ - [#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
1000
+
1001
+ ## 7.1.2
1002
+
1003
+ ### Patch Changes
1004
+
1005
+ - [#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
1006
+
1007
+ ## 7.1.1
1008
+
1009
+ ### Patch Changes
1010
+
1011
+ - [#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
1012
+
1013
+ ## 7.1.0
1014
+
1015
+ ### Minor Changes
1016
+
1017
+ - [#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
1018
+
1019
+ - [#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
1020
+
1021
+ ### Patch Changes
1022
+
1023
+ - [#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
1024
+
1025
+ - [#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
1026
+
1027
+ - [#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
1028
+
1029
+ ## 7.0.4
1030
+
1031
+ ### Patch Changes
1032
+
1033
+ - [#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
1034
+
1035
+ ## 7.0.3
1036
+
1037
+ ### Patch Changes
1038
+
1039
+ - [#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
1040
+
1041
+ ## 7.0.2
1042
+
1043
+ ### Patch Changes
1044
+
1045
+ - [#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
1046
+
1047
+ ## 7.0.1
1048
+
1049
+ ### Patch Changes
1050
+
1051
+ - [#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.
1052
+
1053
+ ## 7.0.0
1054
+
1055
+ ### Major Changes
1056
+
1057
+ - [`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:
1058
+
1059
+ ```diff
1060
+ + import ts from "typescript";
1061
+
1062
+ + const DATE = ts.factory.createIdentifier("Date");
1063
+ + const NULL = ts.factory.createLiteralTypeNode(ts.factory.createNull());
1064
+
1065
+ const ast = await openapiTS(mySchema, {
1066
+ transform(schemaObject, metadata) {
1067
+ if (schemaObject.format === "date-time") {
1068
+ - return schemaObject.nullable ? "Date | null" : "Date";
1069
+ + return schemaObject.nullable
1070
+ + ? ts.factory.createUnionTypeNode([DATE, NULL])
1071
+ + : DATE;
1072
+ }
1073
+ },
1074
+ };
1075
+ ```
1076
+
1077
+ 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).
1078
+
1079
+ For example syntax, search this codebae to see how the TypeScript AST is used.
1080
+
1081
+ Also see [AST Explorer](https://astexplorer.net/)’s `typescript` parser to inspect how TypeScript is interpreted as an AST.
1082
+
1083
+ - [`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
1084
+ - The `--auth`, `--httpHeaders`, `--httpMethod`, and `fetch` (Node.js-only) options were all removed from the CLI and Node.js API
1085
+ - 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)
1086
+ - You can also set your fetch client in redocly.yaml as well.
1087
+ - `--immutable-types` has been renamed to `--immutable`
1088
+ - `--support-array-length` has been renamed to `--array-length`
1089
+
1090
+ - [`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.
1091
+
1092
+ - [`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.
1093
+
1094
+ - [`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).
1095
+
1096
+ - [`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.
1097
+
1098
+ - [`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`
1099
+
1100
+ ### Minor Changes
1101
+
1102
+ - [`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! 🎉
1103
+ - By default, it will only throw on actual schema errors (uses Redocly’s default settings)
1104
+ - For stricter linting or custom rules, you can create a [redocly.yaml config](https://redocly.com/docs/cli/configuration/)
1105
+
1106
+ - [`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.
1107
+ - Any options passed into your [redocly.yaml config](https://redocly.com/docs/cli/configuration/) are respected
1108
+
1109
+ - [`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
1110
+
1111
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: add `formatOptions` to allow formatting TS output
1112
+
1113
+ - [`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
1114
+
1115
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - ✨ **Feature**: bundle schemas with Redocly CLI
1116
+
1117
+ - [`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
1118
+
1119
+ - [#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
1120
+
1121
+ - [#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
1122
+
1123
+ ### Patch Changes
1124
+
1125
+ - [`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
1126
+
1127
+ - [`6d1eb32`](https://github.com/openapi-ts/openapi-typescript/commit/6d1eb32e610cb62effbd1a817ae8fc93337126a6) Thanks [@drwpow](https://github.com/drwpow)! - 🧹 Cleaned up and reorganized all tests
1128
+
1129
+ - [#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.
1130
+
1131
+ ## 6.7.0
1132
+
1133
+ ### Minor Changes
1134
+
1135
+ - [#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)
1136
+
1137
+ ## 6.6.2
1138
+
1139
+ ### Patch Changes
1140
+
1141
+ - [#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
1142
+
1143
+ - [#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
1144
+
1145
+ - [#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.
1146
+
1147
+ ## 6.6.1
1148
+
1149
+ ### Patch Changes
1150
+
1151
+ - [#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
1152
+
1153
+ ## 6.6.0
1154
+
1155
+ ### Minor Changes
1156
+
1157
+ - [#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.
1158
+
1159
+ ## 6.5.5
1160
+
1161
+ ### Patch Changes
1162
+
1163
+ - [#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
1164
+
1165
+ ## 6.5.4
1166
+
1167
+ ### Patch Changes
1168
+
1169
+ - [#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
1170
+
1171
+ ## 6.5.3
1172
+
1173
+ ### Patch Changes
1174
+
1175
+ - [#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
1176
+
1177
+ ## 6.5.2
1178
+
1179
+ ### Patch Changes
1180
+
1181
+ - [#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
1182
+
1183
+ - [#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
1184
+
1185
+ ## 6.5.1
1186
+
1187
+ ### Patch Changes
1188
+
1189
+ - [#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
1190
+
1191
+ ## 6.5.0
1192
+
1193
+ ### Minor Changes
1194
+
1195
+ - [#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
1196
+
1197
+ ## 6.4.5
1198
+
1199
+ ### Patch Changes
1200
+
1201
+ - [#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
1202
+
1203
+ - [#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
1204
+
1205
+ ## 6.4.4
1206
+
1207
+ ### Patch Changes
1208
+
1209
+ - [#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
1210
+
1211
+ ## 6.4.3
1212
+
1213
+ ### Patch Changes
1214
+
1215
+ - [#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
1216
+
1217
+ ## 6.4.2
1218
+
1219
+ ### Patch Changes
1220
+
1221
+ - [#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
1222
+
1223
+ ## 6.4.1
1224
+
1225
+ ### Patch Changes
1226
+
1227
+ - [#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
1228
+
1229
+ ## 6.4.0
1230
+
1231
+ ### Minor Changes
1232
+
1233
+ - [#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
1234
+
1235
+ ## 6.3.9
1236
+
1237
+ ### Patch Changes
1238
+
1239
+ - [#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
1240
+
1241
+ - [#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
1242
+
1243
+ ## 6.3.8
1244
+
1245
+ ### Patch Changes
1246
+
1247
+ - [#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
1248
+
1249
+ ## 6.3.7
1250
+
1251
+ ### Patch Changes
1252
+
1253
+ - [#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
1254
+
1255
+ ## 6.3.6
1256
+
1257
+ ### Patch Changes
1258
+
1259
+ - [#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
1260
+
1261
+ - [#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
1262
+
1263
+ ## 6.3.5
1264
+
1265
+ ### Patch Changes
1266
+
1267
+ - [#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
1268
+
1269
+ ## 6.3.4
1270
+
1271
+ ### Patch Changes
1272
+
1273
+ - [#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
1274
+
1275
+ - [#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
1276
+
1277
+ ## 6.3.3
1278
+
1279
+ ### Patch Changes
1280
+
1281
+ - [#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"])
1282
+
1283
+ ## 6.3.2
1284
+
1285
+ ### Patch Changes
1286
+
1287
+ - [#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
1288
+
1289
+ ## 6.3.1
1290
+
1291
+ ### Patch Changes
1292
+
1293
+ - [#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
1294
+
1295
+ ## 6.3.0
1296
+
1297
+ ### Minor Changes
1298
+
1299
+ - [#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
1300
+
1301
+ ### Patch Changes
1302
+
1303
+ - [#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
1304
+
1305
+ ## 6.2.9
1306
+
1307
+ ### Patch Changes
1308
+
1309
+ - [#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
1310
+
1311
+ ## 6.2.8
1312
+
1313
+ ### Patch Changes
1314
+
1315
+ - [#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
1316
+
1317
+ ## 6.2.7
1318
+
1319
+ ### Patch Changes
1320
+
1321
+ - [#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
1322
+
1323
+ - [#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
1324
+
1325
+ ## 6.2.6
1326
+
1327
+ ### Patch Changes
1328
+
1329
+ - [#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
1330
+
1331
+ ## 6.2.5
1332
+
1333
+ ### Patch Changes
1334
+
1335
+ - 7d09c3b: Support nested path parameters in `--path-params-as-types` (#1130). Thanks, [barakalon](https://github.com/barakalon)!
1336
+
1337
+ ## 6.2.4
1338
+
1339
+ ### Patch changes
1340
+
1341
+ - Fix remote `$ref`s to complete schemas (#1087)
1342
+ - Fix incorrect check for protocol by [@happycollision](https://github.com/happycollision) (#1088)
1343
+ - Fix missing parameters in operation object (#1090)
1344
+
1345
+ ## 6.2.3
1346
+
1347
+ ### Patch changes
1348
+
1349
+ - Fix tuples type generation by [@liangskyli](https://github.com/liangskyli) (#1085)
1350
+
1351
+ ## 6.2.2
1352
+
1353
+ ### Patch changes
1354
+
1355
+ - Fix path generation by [@HiiiiD](https://github.com/HiiiiD) (#991)
1356
+ - If no type is specified, type as `unknown` by [@mitchell-merry](https://github.com/mitchell-merry) (#1049)
1357
+ - Ensure not required parameters are created as optional properties by [@AplusKminus](https://github.com/AplusKminus) (#1053)
1358
+ - Fix missing type defs (#1072)
1359
+ - Deduplicate unions by [@mitchell-merry](https://github.com/mitchell-merry) (#1069)
1360
+ - Fix tuples type generation support by [@liangskyli](https://github.com/liangskyli) (#1011)
1361
+
1362
+ ## 6.2.1
1363
+
1364
+ ### Patch changes
1365
+
1366
+ - Fix `$ref`’d parameters missing (#1061)
1367
+ - Fix `oneOf` number const (#1056) by [@qnp](https://github.com/qnp)
1368
+
1369
+ ## 6.2.0
1370
+
1371
+ ### Minor changes
1372
+
1373
+ - New `--empty-objects-unknown` flag for better control over unspecified object types’ default shape by [@duncanbeevers](https://github.com/duncanbeevers) (#1032)
1374
+
1375
+ ### Patch changes
1376
+
1377
+ - JSDoc improvements by [@mitchell-merry](https://github.com/mitchell-merry) (#1029)
1378
+ - Fix readonly nullable properties by [@mtth](https://github.com/mtth) (#1036)
1379
+ - Tiny QoL improvements to invalid schema errors (#1043)
1380
+
1381
+ ## 6.1.1
1382
+
1383
+ ### Patch changes
1384
+
1385
+ - Fix response key for HTTP ranges (#1010) [@stefanmaric](https://github.com/stefanmaric)
1386
+ - Escape constant string in generated schema (#1014) [@mvdbeek](https://github.com/mvdbeek)
1387
+ - Support fully-qualified refs as discriminator mapping values (#1017) [@sgrimm](https://github.com/sgrimm)
1388
+ - Improve behavior of allOf + required properties (#1027) [@Swiftwork](https://github.com/Swiftwork)
1389
+ - Make params non-nullable even if all params are optional (#1022) [@sgrimm](https://github.com/sgrimm)
1390
+
1391
+ ## 6.1.0
1392
+
1393
+ ### Minor changes
1394
+
1395
+ - Adds `webhook` typings by [@yacinehmito](https://github.com/yacinehmito) (#1001)
1396
+ - Use undici’s `fetch()` instead of `request()` which can be overridden locally by [@yacinehmito](https://github.com/yacinehmito) (#1002)
1397
+ - Adds type helpers only when used by [@imagoiq](https://github.com/imagoiq) (#992)
1398
+
1399
+ ### Patch changes
1400
+
1401
+ - Fixes bug in glob output by [@BTMPL](https://github.com/BTMPL) (#999)
1402
+ - Fixes header casing by [@HiiiiD](https://github.com/HiiiiD) (#990)
1403
+ - 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)
1404
+
1405
+ ## 6.0.3
1406
+
1407
+ ### Patch changes
1408
+
1409
+ - Fixed `nullable: true` (#983)
1410
+ - Fixed `additionalProperties` bug (#983)
1411
+
1412
+ ## 6.0.2
1413
+
1414
+ ### Patch changes
1415
+
1416
+ - Fixes #975 where `#/components/examples` were being parsed as schema objects
1417
+
1418
+ ## 6.0.1
1419
+
1420
+ ### Patch changes
1421
+
1422
+ - Remove `postinstall` hook only meant for dev
1423
+
1424
+ ## 6.0.0
1425
+
1426
+ ## ⚠️ Breaking changes
1427
+
1428
+ - Dropped Prettier formatting and all formatting options. Now, simply format at your discretion (or not at all!)
1429
+ - Dropped support for Swagger 2.0
1430
+ - Dropped Node 14 support (it still works for now, but Node 14 bugs won’t be fixed if any arise)
1431
+ - `--version` was changed to return the version of this library (also by dropping Swagger 2.0 support the old usage was no longer needed)
1432
+ - Dropped `--raw-schema`. Your entry schema MUST be valid and complete (however, your $refs to subschemas may be partials).
1433
+ - Dropped `--make-paths-enum` because it was incompatible with `--path-params-as-types`
1434
+ - Dropped the CLI aliases `-it` and `-ap` (specify the full -`-immutable-types` or `--additional-properties` flag)
1435
+ - Empty content: `{}` now returns `never`. Dropped the `--content-never` flag as this is now the default behavior.
1436
+ - 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.
1437
+
1438
+ ### Major changes
1439
+
1440
+ - Sped up type generation by **3×** by dropping Prettier & optimizing deep-object crawl speed
1441
+ - OpenAPI 3.1 support for `discriminator` and polymorphic types
1442
+ - Complete codebase rewrite and cleanup
1443
+ - Now ships modern ESNext code rather than ES2018
1444
+ - Improved internal types & documentation
1445
+ - Test cleanup, now powered by Vitest
1446
+ - New `transform()` and `postTransform()` hooks give you more control in overriding/extending generated types
1447
+
1448
+ ### Minor changes
1449
+
1450
+ - More accurate types for `oneOf` / `anyOf` / `allOf` (#894)
1451
+ - `--immutable-types` has a new `-t` alias
1452
+ - Addition of path.default types
1453
+ - Support `nullable` as type arrays for OpenAPI 3.1 (#898)
1454
+
1455
+ ### Patch changes
1456
+
1457
+ - Fixed multiple bugs with deep-linked remote schemas and complex `$ref`s
1458
+ - Fixed `anyOf` intersections resulting in unexpected type signatures
1459
+ - Fixed `[string, null]` generating as `unknown`
1460
+ - Fixed `{ property: unknown; }` with `allOf` union
1461
+ - Fixed `requestBody` missing `content` property
1462
+ - Fixed headers missing remote `$ref`s
1463
+
1464
+ ## 5.4.0
1465
+
1466
+ ### Minor changes
1467
+
1468
+ - New `--content-never` flag forces never response body by [@duncanbeevers](https://github.com/duncanbeevers) (#905)
1469
+
1470
+ ### Patch changes
1471
+
1472
+ - Empty strings are now allowed for properties like `@default` by [@duncanbeevers](https://github.com/duncanbeevers) (#906)
1473
+ - Throws friendlier error on bad `--prettier-config` path by [@duncanbeevers](https://github.com/duncanbeevers) (#909)
1474
+ - Objects are now allowed for properties like `@default` by [@duncanbeevers](https://github.com/duncanbeevers) (#910)
1475
+ - Fixes `enum` export of operation paths by [@duncanbeevers](https://github.com/duncanbeevers) (#912)
1476
+
1477
+ ## 5.3.0
1478
+
1479
+ ### Minor changes
1480
+
1481
+ - New `--make-paths-enum` CLI flag by [@berzi](https://github.com/berzi) (#883)
1482
+ - New `--path-params-as-types` CLI flag by [@Powell-v2](https://github.com/Powell-v) (#891)
1483
+ - Supports `/** @constant */` JSDoc comments by [@PhilipTrauner](https://github.com/PhilipTrauner) (#896)
1484
+ - You can now add your own custom comment header at the top of every generated doc (#904)
1485
+
1486
+ ### Patch changes
1487
+
1488
+ - Fixes inconsistent comment title (#904)
1489
+
1490
+ ## 5.2.0
1491
+
1492
+ ### Minor changes
1493
+
1494
+ - The `--export-type` flag was added to generate type instead of interface by [@dominikdosoudil](https://github.com/dominikdosoudil) (#868)
1495
+ - Updated schemas & examples
1496
+
1497
+ ### Patch changes
1498
+
1499
+ - Tiny optimizations for a little speed boost (#881)
1500
+ - Fixes CommonJS error for undici on older versions of Node (#879)
1501
+
1502
+ ## 5.1.1
1503
+
1504
+ ### Patch changes
1505
+
1506
+ - 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)
1507
+ - Fixes type error when using TypeScript nightly (#847)
1508
+ - Patches [security vulnerability with node-fetch](https://security.snyk.io/vuln/SNYK-JS-NODEFETCH-2342118) (by replacing with [undici](https://undici.nodejs.org/#/))
1509
+
1510
+ ## 5.1.0
1511
+
1512
+ ### Minor changes
1513
+
1514
+ - Adds constants support by [@sadfsdfdsa](https://github.com/sadfsdfdsa) (#831)
1515
+
1516
+ ### Patch changes
1517
+
1518
+ - Fixes a syntax error caused by an empty `oneOf` by [@sadfsdfdsa](https://github.com/sadfsdfdsa) (#830)
1519
+
1520
+ ## 5.0.1
1521
+
1522
+ ### Patch changes
1523
+
1524
+ - Adds missing types for CJS build (#861)
1525
+
1526
+ ## 5.0.0
1527
+
1528
+ ### ⚠️ Breaking changes
1529
+
1530
+ - 5.x drops support for Node 12. If you’re still on Node 12, be sure to lock your version to 4.x.
1531
+
1532
+ ### Major changes
1533
+
1534
+ - Updates this library to full ESM! ✨ This is the future of JavaScript, and is now natively supported in Node 14+.
1535
+
1536
+ ### Minor changes
1537
+
1538
+ - Now supports a `URL()` as input to make ESM usage easier ([see example](https://github.com/openapi-ts/openapi-typescript/tree/5.x#-node))
1539
+
1540
+ ## 4.5.0
1541
+
1542
+ ### Minor changes
1543
+
1544
+ - Significantly-enhanced JSDoc output by [@sadfsdfdsa](https://github.com/sadfsdfdsa) (#797)
1545
+
1546
+ ## 4.4.0
1547
+
1548
+ ### Minor changes
1549
+
1550
+ - Adds TypeScript `@deprecated` comment to deprecated schema objects by [@bunkscene](https://github.com/bunkscene)
1551
+
1552
+ ## 4.3.0
1553
+
1554
+ ### Minor changes
1555
+
1556
+ - In many areas, changed out `any` with `unknown` (#769). See #554 for more explanation / context
1557
+
1558
+ ### Patch changes
1559
+
1560
+ - 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.
1561
+
1562
+ ## 4.2.0
1563
+
1564
+ ### Minor changes
1565
+
1566
+ - Reference arbitrary data on generated types via the `properties` key by [@Peteck](https://github.com/Peteck) (#626)
1567
+
1568
+ ## 4.1.1
1569
+
1570
+ ### Patch changes
1571
+
1572
+ - Fixes the remote schema URL cache being too long-lived by [@mbelsky](https://github.com/mbelsky) (#708)
1573
+
1574
+ ## 4.1.0
1575
+
1576
+ ### Minor changes
1577
+
1578
+ - New `--headersObject` and `--headers` CLI flags by [@ericzorn93](https://github.com/ericzorn93) (#764)
1579
+
1580
+ ### Patch changes
1581
+
1582
+ - `"type": "file"` no longer generates unexpected results (#766)
1583
+
1584
+ ## 4.0.2
1585
+
1586
+ ### Patch changes
1587
+
1588
+ - Loading in-memory schemas through the JS API resulted in broken `$ref`s (#689)
1589
+
1590
+ ## 4.0.1
1591
+
1592
+ ### Patch changes
1593
+
1594
+ - Fixes `properties` + `anyOf` with only `required` properties by [@gr2m](https://github.com/gr2m) (#643)
1595
+
1596
+ ## 4.0.0
1597
+
1598
+ ### ⚠️ Breaking changes
1599
+
1600
+ - 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.
1601
+
1602
+ ### Major changes
1603
+
1604
+ - Now supports remote references (`$ref: "remote.yaml#/components/schemas/User`) 🎉 (#602)!
1605
+
1606
+ ## 3.4.1
1607
+
1608
+ ### Patch changes
1609
+
1610
+ - Fix glob accidentally generating empty folders alongside single-file schemas (#633)
1611
+
1612
+ ## 3.4.0
1613
+
1614
+ ### Minor changes
1615
+
1616
+ - Adds glob support thanks to [@sharmarajdaksh](https://github.com/sharmarajdaksh) (#615)
1617
+ - Reverts #613 and adds a `--default-non-nullable` flag (#631)
1618
+
1619
+ ## 3.3.1
1620
+
1621
+ ### Patch changes
1622
+
1623
+ - Schema objects that have a `default:` property shouldn’t be marked as nullable (#613)
1624
+
1625
+ ## 3.3.0
1626
+
1627
+ ### Minor changes
1628
+
1629
+ - Changes default behavior of #585 to require an opt-in `--additional-properties` flag (#607)
1630
+ - Adds `-c` shortcut alias for `--prettier-config` (#607)
1631
+ - Adds `-it` shortcut alias for `--immutable-types` (#607)
1632
+
1633
+ ## 3.2.4
1634
+
1635
+ ### Patch changes
1636
+
1637
+ - `additionalProperties` now default to `true` per the OpenAPI 3.0 spec by [@mehalter](https://github.com/mehalter) (#583)
1638
+
1639
+ ## 3.2.3
1640
+
1641
+ ### Patch changes
1642
+
1643
+ - Fixed a parse error on `enum: []` (#563)
1644
+ - Fixed another parse error on responses missing schemas (#565)
1645
+ - Fixed a bug with the latest version of Prettier and `options.prettierConfig` (#566)
1646
+
1647
+ ## 3.2.2
1648
+
1649
+ ### Patch changes
1650
+
1651
+ - RequestBodies that had hyphens in their name would generate an error (#550). Thanks (again), [@ashsmith](https://github.com/ashsmith)!
1652
+
1653
+ ## 3.2.1
1654
+
1655
+ ### Patch changes
1656
+
1657
+ - Fixed an issue where a comment within a schema definition would break type gen (#548). Thanks, [@ashsmith](https://github.com/ashsmith)!
1658
+
1659
+ ## 3.2.0
1660
+
1661
+ ### Minor changes
1662
+
1663
+ - Added a new `--immutable-types` flag by [@dnalborczyk](https://github.com/dnalborczyk) (#522)
1664
+
1665
+ ### Patch changes
1666
+
1667
+ - The `operations` interface inherits parameters properly by [@henhal](https://github.com/henhal) (#530)
1668
+
1669
+ ## 3.1.2
1670
+
1671
+ ### Patch changes
1672
+
1673
+ - Fixes package types for TypeScript projects (#520)
1674
+
1675
+ ## 3.1.1
1676
+
1677
+ ### Patch changes
1678
+
1679
+ - Better handles remote schema content types (#516)
1680
+
1681
+ ## 3.1.0
1682
+
1683
+ ### Minor changes
1684
+
1685
+ - Remote schema loading now follows redirects (#510)
1686
+ - New `--auth` flag to access private schemas (#508)
1687
+ - 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)
1688
+
1689
+ ### Patch changes
1690
+
1691
+ - Fixes an OpenAPI V2 parameter bug by [@yamacent](https://github.com/yamacent) (#489)
1692
+
1693
+ ## 3.0.4
1694
+
1695
+ ### Patch changes
1696
+
1697
+ - If using OpenAPI 2.0, and you didn’t have `definitions`, an unexpected error was encountered. This is now fixed.
1698
+
1699
+ ## 3.0.3
1700
+
1701
+ ### Patch changes
1702
+
1703
+ - Improves handling of complex `oneOf` by [@gr2m](https://github.com/gr2m) (#491)
1704
+
1705
+ ## 3.0.2
1706
+
1707
+ ### Patch changes
1708
+
1709
+ - Fixed `requestBodies` transform by [@radist2s](https://github.com/radist2s) (#474)
1710
+ - Fixed enum bug containing `null` by [@FedeBev](https://github.com/FedeBev) (#492)
1711
+
1712
+ ## 3.0.1
1713
+
1714
+ ### Patch changes
1715
+
1716
+ - Fixed generation bug where responseBodies that contained both a `$ref` and `operationId` generated invalid TypeScript (#464)
1717
+
1718
+ ## 3.0.0
1719
+
1720
+ ### Major changes
1721
+
1722
+ - 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.
1723
+
1724
+ ### Minor changes
1725
+
1726
+ - Adds long-requested paths support to Swagger v2 schemas
1727
+ - Adds more compact comments, resulting more readable generated types
1728
+
1729
+ ### Patch changes
1730
+
1731
+ - Fixes bugs in paths generation (missing $refs support in areas, inconsistent generation)
1732
+
1733
+ ## 2.5.0
1734
+
1735
+ ### Minor changes
1736
+
1737
+ - Comments can now be single-line, saving some needed space in the specs (#443)
1738
+
1739
+ ### Patch changes
1740
+
1741
+ - `additionalProperties.oneOf` is now generating as expected (#442)
1742
+
1743
+ ## 2.4.2
1744
+
1745
+ ### Patch changes
1746
+
1747
+ - Fixes `paths.requestBody.content` possibly missing by [@robertmassaioli](https://github.com/robertmassaioli) (#369)
1748
+ - Fix: check if path item is method operation by [@rendall](https://github.com/rendall) (#366)
1749
+
1750
+ ## 2.4.1
1751
+
1752
+ ### Patch changes
1753
+
1754
+ - escape quotes in enum string values by [@gr2m](https://github.com/gr2m) (#365)
1755
+
1756
+ ## 2.4.0
1757
+
1758
+ ### Minor changes
1759
+
1760
+ - Add `operations` interface by [@gr2m](https://github.com/gr2m) (#353)
1761
+
1762
+ ## 2.3.4
1763
+
1764
+ ### Patch changes
1765
+
1766
+ - Allow `$ref: 'foo.yaml#bar'` syntax, but cast to `any` type (TODO: full external schema support) (#354)
1767
+
1768
+ ## 2.3.3
1769
+
1770
+ ### Patch changes
1771
+
1772
+ - `$refs` in paths now respect optional parameters (#352) by [@gr2m](https://github.com/gr2m)
1773
+
1774
+ ## 2.3.2
1775
+
1776
+ ### Patch changes
1777
+
1778
+ - Handle parameters on paths as well as methods by [@samdbmg](https://github.com/samdbmg) (#347)
1779
+
1780
+ ## 2.3.1
1781
+
1782
+ ### Patch changes
1783
+
1784
+ - Set index type to all possible values (#348)
1785
+
1786
+ ## 2.3.0
1787
+
1788
+ ### Minor changes
1789
+
1790
+ - `requestBody` and `$ref`-type parameters added in response types by [@gr2m](https://github.com/gr2m)
1791
+
1792
+ 🐣 Minor Changes
1793
+
1794
+ - responses without content schemas changed from `any` to `never` or `unknown` by [@gr2m](https://github.com/gr2m)
1795
+
1796
+ ## 2.2.0
1797
+
1798
+ ### Minor changes
1799
+
1800
+ - New name! Now published at `openapi-typescript`.
1801
+ - Added paths support (#328)
1802
+
1803
+ ## 2.1.0
1804
+
1805
+ ### Minor changes
1806
+
1807
+ - Support for components.responses (#258)
1808
+ - Adds tuple support (#293)
1809
+
1810
+ ### Patch changes
1811
+
1812
+ - Fix missing port bug (#252)
1813
+ - additionalProperties interpolation, primitive enums (#266)
1814
+ - bubble up the error message / improve error message when failing to parse the schema (#269)
1815
+ - Improve error message when server is unreachable (#288)
1816
+
1817
+ ## 2.0.0
1818
+
1819
+ ### Major changes
1820
+
1821
+ - OpenAPI 3.0 support (#223)
1822
+ - Schema names are no longer transformed (e.g. `UserRole` is now `definitions['user']['role']`). See README for migration instructions. (#223)
1823
+ - Flags with “deprecated” warnings in `1.x` were dropped and no longer work (#223)
1824
+
1825
+ ### Minor changes
1826
+
1827
+ - Adds support for JSDoc comments (#223)
1828
+ - Support for null values (#223)
1829
+ - Improves Prettier config resolution (#224)
1830
+ - Improves array and object handling (#226)
1831
+
1832
+ ## 1.7.1
1833
+
1834
+ ### Patch changes
1835
+
1836
+ - Now handles the `@` character in namespaces thanks to [@sorin-davidoi](https://github.com/sorin-davidoi) 🎉
1837
+ - Updates Prettier to `2.0`
1838
+
1839
+ ## 1.7.0
1840
+
1841
+ ### Minor changes
1842
+
1843
+ - 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.
1844
+ - The `--swagger` flag is now deprecated; this library will automatically parse the version from the schema.
1845
+
1846
+ ### Minor changes
1847
+
1848
+ - Fixes a bug where `additionalProperties` weren’t respected for nested `properties` (#92).
1849
+
1850
+ ## 1.6.2
1851
+
1852
+ - Fixes an issue where `--camelcase` wouldn’t camelCase `$ref`s properly
1853
+
1854
+ ## 1.6.1
1855
+
1856
+ ### Patch changes
1857
+
1858
+ - 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.
1859
+
1860
+ ## 1.6.0
1861
+
1862
+ ### Minor changes
1863
+
1864
+ - Adds Property mapper function (see README) that supports `x-nullable` and other properties by [@atlefren](https://github.com/atlefren) (#118)
1865
+
1866
+ ## 1.5.0
1867
+
1868
+ ### Minor changes
1869
+
1870
+ - Convert names containing spaces to use underscores (#75) thanks to [@svnv](https://github.com/svnv)
1871
+
1872
+ ## 1.4.0
1873
+
1874
+ ### Minor changes
1875
+
1876
+ - Puts out JSDoc thanks to [@lbenie](https://github.com/lbenie)
1877
+
1878
+ ## 1.3.1
1879
+
1880
+ ### Patch changes
1881
+
1882
+ - Fix nested arrays (#54)
1883
+
1884
+ ## 1.3.0
1885
+
1886
+ ### Minor changes
1887
+
1888
+ - 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!
1889
+
1890
+ ## 1.2.2
1891
+
1892
+ ### Patch changes
1893
+
1894
+ - This fixes underscores from accidentally appearing in some TypeScript interface names (#29)
1895
+
1896
+ ## 1.2.1
1897
+
1898
+ ### Patch changes
1899
+
1900
+ - 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
1901
+
1902
+ ## 1.2.0
1903
+
1904
+ ### Minor changes
1905
+
1906
+ - Adds `--wrapper` option, letting you specify any namespace or module wrapper for exporting types. See the README for full description
1907
+
1908
+ ### ⚠️ Breaking changes
1909
+
1910
+ - `--namespace` and `--export` options are now deprecated, in favor of the more versatile `--wrapper`
1911
+
1912
+ ## 1.1.3
1913
+
1914
+ ### Patch changes
1915
+
1916
+ - Now supports an `--export` option to export namespaces thanks to [@tpdewolf](https://github.com/tpdewolf)
1917
+
1918
+ ## 1.1.2
1919
+
1920
+ ### Patch changes
1921
+
1922
+ - No longer generates empty interfaces (caused by top-level definitions being array types, referencing other definitions)
1923
+
1924
+ ## 1.1.1
1925
+
1926
+ ### Patch changes
1927
+
1928
+ - Improves enum generation to be simpler-to-use (values are now just hardcoded inline, rather than trying to use TypeScript enums).
1929
+
1930
+ ## 1.1.0
1931
+
1932
+ ### Major changes
1933
+
1934
+ - Changes default behavior to preserve `snake_case` properties (you can still convert with `--camelcase`)
1935
+
1936
+ ### Minor changes
1937
+
1938
+ - Bundles & ships with [@pika/pack](https://github.com/pikapkg/pack)
1939
+
1940
+ ## 0.3.1
1941
+
1942
+ ### Patch changes
1943
+
1944
+ - Falls back to `object` if it can’t grab properties
1945
+
1946
+ ## 0.3.0
1947
+
1948
+ ### Minor changes
1949
+
1950
+ - Different API, now requires `namespace` as 2nd parameter. Because namespacing is good.
1951
+
1952
+ ### Patch changes
1953
+
1954
+ - 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
1955
+
1956
+ ## 0.2.1
1957
+
1958
+ ### Patch changes
1959
+
1960
+ - Fixes bug where number enums names could be generated.
1961
+
1962
+ ## 0.2.0
1963
+
1964
+ ### Minor changes
1965
+
1966
+ - Supports TypeScript enums
1967
+
1968
+ ## 0.1.0
1969
+
1970
+ ### Minor changes
1971
+
1972
+ - Exists