@skmtc/core 0.0.939 → 0.0.941

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 (255) hide show
  1. package/esm/context/CoreContext.d.ts +6 -32
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/CoreContext.js +15 -60
  4. package/esm/context/GenerateContext.d.ts +4 -15
  5. package/esm/context/GenerateContext.d.ts.map +1 -1
  6. package/esm/context/GenerateContext.js +16 -35
  7. package/esm/context/ParseContext.d.ts +5 -9
  8. package/esm/context/ParseContext.d.ts.map +1 -1
  9. package/esm/context/ParseContext.js +11 -18
  10. package/esm/context/RenderContext.d.ts +6 -209
  11. package/esm/context/RenderContext.d.ts.map +1 -1
  12. package/esm/context/RenderContext.js +8 -215
  13. package/esm/context/ResultsHandler.d.ts +0 -67
  14. package/esm/context/ResultsHandler.d.ts.map +1 -1
  15. package/esm/context/ResultsHandler.js +2 -68
  16. package/esm/context/StackTrail.d.ts +2 -0
  17. package/esm/context/StackTrail.d.ts.map +1 -1
  18. package/esm/context/StackTrail.js +26 -0
  19. package/esm/context/generateTypes.d.ts +2 -2
  20. package/esm/context/generateTypes.d.ts.map +1 -1
  21. package/esm/context/parseTypes.d.ts +7 -2
  22. package/esm/context/parseTypes.d.ts.map +1 -1
  23. package/esm/oas/_helpers/parseEnum.d.ts +3 -1
  24. package/esm/oas/_helpers/parseEnum.d.ts.map +1 -1
  25. package/esm/oas/_helpers/parseEnum.js +2 -1
  26. package/esm/oas/_helpers/parseNullable.d.ts +4 -1
  27. package/esm/oas/_helpers/parseNullable.d.ts.map +1 -1
  28. package/esm/oas/_helpers/parseNullable.js +2 -1
  29. package/esm/oas/array/toArray.d.ts +5 -2
  30. package/esm/oas/array/toArray.d.ts.map +1 -1
  31. package/esm/oas/array/toArray.js +16 -9
  32. package/esm/oas/boolean/toBoolean.d.ts +5 -2
  33. package/esm/oas/boolean/toBoolean.d.ts.map +1 -1
  34. package/esm/oas/boolean/toBoolean.js +16 -8
  35. package/esm/oas/components/toComponentsV3.d.ts +3 -1
  36. package/esm/oas/components/toComponentsV3.d.ts.map +1 -1
  37. package/esm/oas/components/toComponentsV3.js +9 -8
  38. package/esm/oas/contact/toContactV3.d.ts +2 -1
  39. package/esm/oas/contact/toContactV3.d.ts.map +1 -1
  40. package/esm/oas/contact/toContactV3.js +2 -1
  41. package/esm/oas/discriminator/toDiscriminatorV3.d.ts +3 -1
  42. package/esm/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
  43. package/esm/oas/discriminator/toDiscriminatorV3.js +7 -2
  44. package/esm/oas/document/toDocumentFieldsV3.d.ts +3 -1
  45. package/esm/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  46. package/esm/oas/document/toDocumentFieldsV3.js +10 -9
  47. package/esm/oas/example/toExamplesV3.d.ts +10 -2
  48. package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
  49. package/esm/oas/example/toExamplesV3.js +8 -7
  50. package/esm/oas/externalDocs/toExternalDocs.d.ts +3 -1
  51. package/esm/oas/externalDocs/toExternalDocs.d.ts.map +1 -1
  52. package/esm/oas/externalDocs/toExternalDocs.js +1 -1
  53. package/esm/oas/header/toHeadersV3.d.ts +3 -1
  54. package/esm/oas/header/toHeadersV3.d.ts.map +1 -1
  55. package/esm/oas/header/toHeadersV3.js +8 -7
  56. package/esm/oas/info/toInfoV3.d.ts +3 -1
  57. package/esm/oas/info/toInfoV3.d.ts.map +1 -1
  58. package/esm/oas/info/toInfoV3.js +4 -3
  59. package/esm/oas/integer/toInteger.d.ts +5 -2
  60. package/esm/oas/integer/toInteger.d.ts.map +1 -1
  61. package/esm/oas/integer/toInteger.js +17 -9
  62. package/esm/oas/license/toLicenseV3.d.ts +2 -1
  63. package/esm/oas/license/toLicenseV3.d.ts.map +1 -1
  64. package/esm/oas/license/toLicenseV3.js +2 -1
  65. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts +10 -3
  66. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  67. package/esm/oas/mediaType/toMediaTypeItemV3.js +9 -8
  68. package/esm/oas/number/toNumber.d.ts +3 -1
  69. package/esm/oas/number/toNumber.d.ts.map +1 -1
  70. package/esm/oas/number/toNumber.js +15 -7
  71. package/esm/oas/object/toAdditionalPropertiesV3.d.ts +3 -1
  72. package/esm/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
  73. package/esm/oas/object/toAdditionalPropertiesV3.js +2 -2
  74. package/esm/oas/object/toObject.d.ts +3 -1
  75. package/esm/oas/object/toObject.d.ts.map +1 -1
  76. package/esm/oas/object/toObject.js +15 -9
  77. package/esm/oas/operation/toOperationsV3.d.ts +5 -2
  78. package/esm/oas/operation/toOperationsV3.d.ts.map +1 -1
  79. package/esm/oas/operation/toOperationsV3.js +14 -12
  80. package/esm/oas/parameter/toParameterV3.d.ts +7 -3
  81. package/esm/oas/parameter/toParameterV3.d.ts.map +1 -1
  82. package/esm/oas/parameter/toParameterV3.js +18 -16
  83. package/esm/oas/pathItem/toPathItemV3.d.ts +3 -1
  84. package/esm/oas/pathItem/toPathItemV3.d.ts.map +1 -1
  85. package/esm/oas/pathItem/toPathItemV3.js +3 -3
  86. package/esm/oas/ref/toRefV31.d.ts +3 -1
  87. package/esm/oas/ref/toRefV31.d.ts.map +1 -1
  88. package/esm/oas/ref/toRefV31.js +3 -3
  89. package/esm/oas/requestBody/toRequestBodiesV3.d.ts +5 -2
  90. package/esm/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  91. package/esm/oas/requestBody/toRequestBodiesV3.js +7 -7
  92. package/esm/oas/response/toResponseV3.d.ts +7 -3
  93. package/esm/oas/response/toResponseV3.d.ts.map +1 -1
  94. package/esm/oas/response/toResponseV3.js +10 -9
  95. package/esm/oas/schema/toSchemasV3.d.ts +9 -4
  96. package/esm/oas/schema/toSchemasV3.d.ts.map +1 -1
  97. package/esm/oas/schema/toSchemasV3.js +33 -25
  98. package/esm/oas/securityRequirement/toSecurityRequirement.d.ts +3 -1
  99. package/esm/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -1
  100. package/esm/oas/securityRequirement/toSecurityRequirement.js +1 -1
  101. package/esm/oas/securitySchemes/toSecuritySchemes.d.ts +3 -1
  102. package/esm/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
  103. package/esm/oas/securitySchemes/toSecuritySchemes.js +23 -8
  104. package/esm/oas/server/toServerV3.d.ts +7 -3
  105. package/esm/oas/server/toServerV3.d.ts.map +1 -1
  106. package/esm/oas/server/toServerV3.js +7 -7
  107. package/esm/oas/serverVariable/toServerVariableV3.d.ts +7 -3
  108. package/esm/oas/serverVariable/toServerVariableV3.d.ts.map +1 -1
  109. package/esm/oas/serverVariable/toServerVariableV3.js +6 -5
  110. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
  111. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  112. package/esm/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
  113. package/esm/oas/string/toString.d.ts +6 -2
  114. package/esm/oas/string/toString.d.ts.map +1 -1
  115. package/esm/oas/string/toString.js +18 -9
  116. package/esm/oas/tag/toTagsV3.d.ts +5 -2
  117. package/esm/oas/tag/toTagsV3.d.ts.map +1 -1
  118. package/esm/oas/tag/toTagsV3.js +4 -3
  119. package/esm/oas/union/toUnion.d.ts +3 -1
  120. package/esm/oas/union/toUnion.d.ts.map +1 -1
  121. package/esm/oas/union/toUnion.js +4 -4
  122. package/esm/oas/unknown/toUnknown.d.ts +3 -1
  123. package/esm/oas/unknown/toUnknown.d.ts.map +1 -1
  124. package/esm/oas/unknown/toUnknown.js +2 -1
  125. package/esm/run/toArtifacts.d.ts +4 -1
  126. package/esm/run/toArtifacts.d.ts.map +1 -1
  127. package/esm/run/toArtifacts.js +2 -1
  128. package/package.json +1 -1
  129. package/script/context/CoreContext.d.ts +6 -32
  130. package/script/context/CoreContext.d.ts.map +1 -1
  131. package/script/context/CoreContext.js +15 -60
  132. package/script/context/GenerateContext.d.ts +4 -15
  133. package/script/context/GenerateContext.d.ts.map +1 -1
  134. package/script/context/GenerateContext.js +16 -35
  135. package/script/context/ParseContext.d.ts +5 -9
  136. package/script/context/ParseContext.d.ts.map +1 -1
  137. package/script/context/ParseContext.js +11 -18
  138. package/script/context/RenderContext.d.ts +6 -209
  139. package/script/context/RenderContext.d.ts.map +1 -1
  140. package/script/context/RenderContext.js +8 -215
  141. package/script/context/ResultsHandler.d.ts +0 -67
  142. package/script/context/ResultsHandler.d.ts.map +1 -1
  143. package/script/context/ResultsHandler.js +2 -68
  144. package/script/context/StackTrail.d.ts +2 -0
  145. package/script/context/StackTrail.d.ts.map +1 -1
  146. package/script/context/StackTrail.js +26 -0
  147. package/script/context/generateTypes.d.ts +2 -2
  148. package/script/context/generateTypes.d.ts.map +1 -1
  149. package/script/context/parseTypes.d.ts +7 -2
  150. package/script/context/parseTypes.d.ts.map +1 -1
  151. package/script/oas/_helpers/parseEnum.d.ts +3 -1
  152. package/script/oas/_helpers/parseEnum.d.ts.map +1 -1
  153. package/script/oas/_helpers/parseEnum.js +2 -1
  154. package/script/oas/_helpers/parseNullable.d.ts +4 -1
  155. package/script/oas/_helpers/parseNullable.d.ts.map +1 -1
  156. package/script/oas/_helpers/parseNullable.js +2 -1
  157. package/script/oas/array/toArray.d.ts +5 -2
  158. package/script/oas/array/toArray.d.ts.map +1 -1
  159. package/script/oas/array/toArray.js +16 -9
  160. package/script/oas/boolean/toBoolean.d.ts +5 -2
  161. package/script/oas/boolean/toBoolean.d.ts.map +1 -1
  162. package/script/oas/boolean/toBoolean.js +16 -8
  163. package/script/oas/components/toComponentsV3.d.ts +3 -1
  164. package/script/oas/components/toComponentsV3.d.ts.map +1 -1
  165. package/script/oas/components/toComponentsV3.js +9 -8
  166. package/script/oas/contact/toContactV3.d.ts +2 -1
  167. package/script/oas/contact/toContactV3.d.ts.map +1 -1
  168. package/script/oas/contact/toContactV3.js +2 -1
  169. package/script/oas/discriminator/toDiscriminatorV3.d.ts +3 -1
  170. package/script/oas/discriminator/toDiscriminatorV3.d.ts.map +1 -1
  171. package/script/oas/discriminator/toDiscriminatorV3.js +7 -2
  172. package/script/oas/document/toDocumentFieldsV3.d.ts +3 -1
  173. package/script/oas/document/toDocumentFieldsV3.d.ts.map +1 -1
  174. package/script/oas/document/toDocumentFieldsV3.js +10 -9
  175. package/script/oas/example/toExamplesV3.d.ts +10 -2
  176. package/script/oas/example/toExamplesV3.d.ts.map +1 -1
  177. package/script/oas/example/toExamplesV3.js +8 -7
  178. package/script/oas/externalDocs/toExternalDocs.d.ts +3 -1
  179. package/script/oas/externalDocs/toExternalDocs.d.ts.map +1 -1
  180. package/script/oas/externalDocs/toExternalDocs.js +1 -1
  181. package/script/oas/header/toHeadersV3.d.ts +3 -1
  182. package/script/oas/header/toHeadersV3.d.ts.map +1 -1
  183. package/script/oas/header/toHeadersV3.js +8 -7
  184. package/script/oas/info/toInfoV3.d.ts +3 -1
  185. package/script/oas/info/toInfoV3.d.ts.map +1 -1
  186. package/script/oas/info/toInfoV3.js +4 -3
  187. package/script/oas/integer/toInteger.d.ts +5 -2
  188. package/script/oas/integer/toInteger.d.ts.map +1 -1
  189. package/script/oas/integer/toInteger.js +17 -9
  190. package/script/oas/license/toLicenseV3.d.ts +2 -1
  191. package/script/oas/license/toLicenseV3.d.ts.map +1 -1
  192. package/script/oas/license/toLicenseV3.js +2 -1
  193. package/script/oas/mediaType/toMediaTypeItemV3.d.ts +10 -3
  194. package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  195. package/script/oas/mediaType/toMediaTypeItemV3.js +9 -8
  196. package/script/oas/number/toNumber.d.ts +3 -1
  197. package/script/oas/number/toNumber.d.ts.map +1 -1
  198. package/script/oas/number/toNumber.js +15 -7
  199. package/script/oas/object/toAdditionalPropertiesV3.d.ts +3 -1
  200. package/script/oas/object/toAdditionalPropertiesV3.d.ts.map +1 -1
  201. package/script/oas/object/toAdditionalPropertiesV3.js +2 -2
  202. package/script/oas/object/toObject.d.ts +3 -1
  203. package/script/oas/object/toObject.d.ts.map +1 -1
  204. package/script/oas/object/toObject.js +15 -9
  205. package/script/oas/operation/toOperationsV3.d.ts +5 -2
  206. package/script/oas/operation/toOperationsV3.d.ts.map +1 -1
  207. package/script/oas/operation/toOperationsV3.js +14 -12
  208. package/script/oas/parameter/toParameterV3.d.ts +7 -3
  209. package/script/oas/parameter/toParameterV3.d.ts.map +1 -1
  210. package/script/oas/parameter/toParameterV3.js +18 -16
  211. package/script/oas/pathItem/toPathItemV3.d.ts +3 -1
  212. package/script/oas/pathItem/toPathItemV3.d.ts.map +1 -1
  213. package/script/oas/pathItem/toPathItemV3.js +3 -3
  214. package/script/oas/ref/toRefV31.d.ts +3 -1
  215. package/script/oas/ref/toRefV31.d.ts.map +1 -1
  216. package/script/oas/ref/toRefV31.js +3 -3
  217. package/script/oas/requestBody/toRequestBodiesV3.d.ts +5 -2
  218. package/script/oas/requestBody/toRequestBodiesV3.d.ts.map +1 -1
  219. package/script/oas/requestBody/toRequestBodiesV3.js +7 -7
  220. package/script/oas/response/toResponseV3.d.ts +7 -3
  221. package/script/oas/response/toResponseV3.d.ts.map +1 -1
  222. package/script/oas/response/toResponseV3.js +10 -9
  223. package/script/oas/schema/toSchemasV3.d.ts +9 -4
  224. package/script/oas/schema/toSchemasV3.d.ts.map +1 -1
  225. package/script/oas/schema/toSchemasV3.js +33 -25
  226. package/script/oas/securityRequirement/toSecurityRequirement.d.ts +3 -1
  227. package/script/oas/securityRequirement/toSecurityRequirement.d.ts.map +1 -1
  228. package/script/oas/securityRequirement/toSecurityRequirement.js +1 -1
  229. package/script/oas/securitySchemes/toSecuritySchemes.d.ts +3 -1
  230. package/script/oas/securitySchemes/toSecuritySchemes.d.ts.map +1 -1
  231. package/script/oas/securitySchemes/toSecuritySchemes.js +23 -8
  232. package/script/oas/server/toServerV3.d.ts +7 -3
  233. package/script/oas/server/toServerV3.d.ts.map +1 -1
  234. package/script/oas/server/toServerV3.js +7 -7
  235. package/script/oas/serverVariable/toServerVariableV3.d.ts +7 -3
  236. package/script/oas/serverVariable/toServerVariableV3.d.ts.map +1 -1
  237. package/script/oas/serverVariable/toServerVariableV3.js +6 -5
  238. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts +3 -1
  239. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.d.ts.map +1 -1
  240. package/script/oas/specificationExtensions/toSpecificationExtensionsV3.js +2 -2
  241. package/script/oas/string/toString.d.ts +6 -2
  242. package/script/oas/string/toString.d.ts.map +1 -1
  243. package/script/oas/string/toString.js +18 -9
  244. package/script/oas/tag/toTagsV3.d.ts +5 -2
  245. package/script/oas/tag/toTagsV3.d.ts.map +1 -1
  246. package/script/oas/tag/toTagsV3.js +4 -3
  247. package/script/oas/union/toUnion.d.ts +3 -1
  248. package/script/oas/union/toUnion.d.ts.map +1 -1
  249. package/script/oas/union/toUnion.js +4 -4
  250. package/script/oas/unknown/toUnknown.d.ts +3 -1
  251. package/script/oas/unknown/toUnknown.d.ts.map +1 -1
  252. package/script/oas/unknown/toUnknown.js +2 -1
  253. package/script/run/toArtifacts.d.ts +4 -1
  254. package/script/run/toArtifacts.d.ts.map +1 -1
  255. package/script/run/toArtifacts.js +2 -1
@@ -1,10 +1,12 @@
1
1
  import type { OpenAPIV3 } from 'openapi-types';
2
2
  import type { ParseContextType } from '../../context/parseTypes.js';
3
3
  import { OasPathItem } from './PathItem.js';
4
+ import type { StackTrail } from '../../context/StackTrail.js';
4
5
  type ToPathItemV3Args = {
5
6
  pathItem: OpenAPIV3.PathItemObject;
7
+ stackTrail: StackTrail;
6
8
  context: ParseContextType;
7
9
  };
8
- export declare const toPathItemV3: ({ pathItem, context }: ToPathItemV3Args) => OasPathItem;
10
+ export declare const toPathItemV3: ({ pathItem, stackTrail, context }: ToPathItemV3Args) => OasPathItem;
9
11
  export {};
10
12
  //# sourceMappingURL=toPathItemV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toPathItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/pathItem/toPathItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,cAAc,CAAA;IAClC,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,uBAAuB,gBAAgB,KAAG,WAgBtE,CAAA"}
1
+ {"version":3,"file":"toPathItemV3.d.ts","sourceRoot":"","sources":["../../../src/oas/pathItem/toPathItemV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,cAAc,CAAA;IAClC,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,mCAAmC,gBAAgB,KAAG,WAiBlF,CAAA"}
@@ -4,17 +4,17 @@ exports.toPathItemV3 = void 0;
4
4
  const toParameterV3_js_1 = require("../parameter/toParameterV3.js");
5
5
  const PathItem_js_1 = require("./PathItem.js");
6
6
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
7
- const tracer_js_1 = require("../../helpers/tracer.js");
8
- const toPathItemV3 = ({ pathItem, context }) => {
7
+ const toPathItemV3 = ({ pathItem, stackTrail, context }) => {
9
8
  const { summary, description, parameters, ...skipped } = pathItem;
10
9
  return new PathItem_js_1.OasPathItem({
11
10
  summary,
12
11
  description,
13
- parameters: (0, tracer_js_1.tracer)(context.stackTrail, 'parameters', () => (0, toParameterV3_js_1.toParameterListV3)({ parameters, context })),
12
+ parameters: stackTrail.trace('parameters', st => (0, toParameterV3_js_1.toParameterListV3)({ parameters, stackTrail: st, context })),
14
13
  extensionFields: (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
15
14
  skipped,
16
15
  parent: pathItem,
17
16
  context,
17
+ stackTrail,
18
18
  parentType: 'pathItem'
19
19
  })
20
20
  });
@@ -2,11 +2,13 @@ import type { OpenAPIV3_1 } from 'openapi-types';
2
2
  import type { OasRefData } from './ref-types.js';
3
3
  import type { ParseContextType } from '../../context/parseTypes.js';
4
4
  import { OasRef } from './Ref.js';
5
+ import type { StackTrail } from '../../context/StackTrail.js';
5
6
  type ToRefV31Args<T extends OasRefData['refType']> = {
6
7
  ref: OpenAPIV3_1.ReferenceObject;
7
8
  refType: T;
9
+ stackTrail: StackTrail;
8
10
  context: ParseContextType;
9
11
  };
10
- export declare const toRefV31: <T extends OasRefData["refType"]>({ ref, refType, context }: ToRefV31Args<T>) => OasRef<T>;
12
+ export declare const toRefV31: <T extends OasRefData["refType"]>({ ref, refType, stackTrail, context }: ToRefV31Args<T>) => OasRef<T>;
11
13
  export {};
12
14
  //# sourceMappingURL=toRefV31.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toRefV31.d.ts","sourceRoot":"","sources":["../../../src/oas/ref/toRefV31.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,IAAI;IACnD,GAAG,EAAE,WAAW,CAAC,eAAe,CAAA;IAChC,OAAO,EAAE,CAAC,CAAA;IACV,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,2BAIvD,YAAY,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,CAAC,CAgB5B,CAAA"}
1
+ {"version":3,"file":"toRefV31.d.ts","sourceRoot":"","sources":["../../../src/oas/ref/toRefV31.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,YAAY,CAAC,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,IAAI;IACnD,GAAG,EAAE,WAAW,CAAC,eAAe,CAAA;IAChC,OAAO,EAAE,CAAC,CAAA;IACV,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,UAAU,CAAC,SAAS,CAAC,EAAE,uCAKvD,YAAY,CAAC,CAAC,CAAC,KAAG,MAAM,CAAC,CAAC,CAgB5B,CAAA"}
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toRefV31 = void 0;
4
4
  const Ref_js_1 = require("./Ref.js");
5
5
  const isEmpty_js_1 = require("../../helpers/isEmpty.js");
6
- const toRefV31 = ({ ref, refType, context }) => {
6
+ const toRefV31 = ({ ref, refType, stackTrail, context }) => {
7
7
  const { $ref, ...skipped } = ref;
8
8
  if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
9
- context.logSkippedFields({ skipped, parent: ref, parentType: 'ref' });
9
+ context.logSkippedFields({ skipped, parent: ref, parentType: 'ref', stackTrail });
10
10
  }
11
- context.registerRef(context.stackTrail.clone(), $ref);
11
+ context.registerRef(stackTrail.clone(), $ref);
12
12
  return new Ref_js_1.OasRef({
13
13
  refType,
14
14
  $ref
@@ -2,16 +2,19 @@ import type { OpenAPIV3 } from 'openapi-types';
2
2
  import type { ParseContextType } from '../../context/parseTypes.js';
3
3
  import { OasRequestBody } from './RequestBody.js';
4
4
  import type { OasRef } from '../ref/Ref.js';
5
+ import type { StackTrail } from '../../context/StackTrail.js';
5
6
  type ToRequestBodyV3Args = {
6
7
  requestBody: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject | undefined;
7
8
  forceRef?: boolean;
9
+ stackTrail: StackTrail;
8
10
  context: ParseContextType;
9
11
  };
10
- export declare const toRequestBodyV3: ({ requestBody, context }: ToRequestBodyV3Args) => OasRequestBody | OasRef<"requestBody"> | undefined;
12
+ export declare const toRequestBodyV3: ({ requestBody, stackTrail, context }: ToRequestBodyV3Args) => OasRequestBody | OasRef<"requestBody"> | undefined;
11
13
  type ToRequestBodiesV3Args = {
12
14
  requestBodies: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject> | undefined;
15
+ stackTrail: StackTrail;
13
16
  context: ParseContextType;
14
17
  };
15
- export declare const toRequestBodiesV3: ({ requestBodies, context }: ToRequestBodiesV3Args) => Record<string, OasRequestBody | OasRef<"requestBody">> | undefined;
18
+ export declare const toRequestBodiesV3: ({ requestBodies, stackTrail, context }: ToRequestBodiesV3Args) => Record<string, OasRequestBody | OasRef<"requestBody">> | undefined;
16
19
  export {};
17
20
  //# sourceMappingURL=toRequestBodiesV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAInE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,0BAG7B,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA4BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,4BAG/B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAenF,CAAA"}
1
+ {"version":3,"file":"toRequestBodiesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/requestBody/toRequestBodiesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAInE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAA;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,sCAI7B,mBAAmB,KAAG,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,SA6BjE,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IAClG,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,wCAI/B,qBAAqB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,SAiBnF,CAAA"}
@@ -6,25 +6,25 @@ const toRefV31_js_1 = require("../ref/toRefV31.js");
6
6
  const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
7
7
  const RequestBody_js_1 = require("./RequestBody.js");
8
8
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
9
- const tracer_js_1 = require("../../helpers/tracer.js");
10
- const toRequestBodyV3 = ({ requestBody, context }) => {
9
+ const toRequestBodyV3 = ({ requestBody, stackTrail, context }) => {
11
10
  if (!requestBody) {
12
11
  return undefined;
13
12
  }
14
13
  if ((0, refFns_js_1.isRef)(requestBody)) {
15
- return (0, toRefV31_js_1.toRefV31)({ ref: requestBody, refType: 'requestBody', context });
14
+ return (0, toRefV31_js_1.toRefV31)({ ref: requestBody, refType: 'requestBody', stackTrail, context });
16
15
  }
17
16
  const { description, content, required, ...skipped } = requestBody;
18
17
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
19
18
  skipped,
20
19
  parent: requestBody,
21
20
  context,
21
+ stackTrail,
22
22
  parentType: 'requestBody'
23
23
  });
24
24
  const fields = {
25
25
  description,
26
- content: (0, tracer_js_1.tracer)(context.stackTrail, 'content', () => {
27
- return (0, toMediaTypeItemV3_js_1.toMediaTypeItemsV3)({ content, context });
26
+ content: stackTrail.trace('content', st => {
27
+ return (0, toMediaTypeItemV3_js_1.toMediaTypeItemsV3)({ content, stackTrail: st, context });
28
28
  }),
29
29
  required,
30
30
  extensionFields
@@ -32,7 +32,7 @@ const toRequestBodyV3 = ({ requestBody, context }) => {
32
32
  return new RequestBody_js_1.OasRequestBody(fields);
33
33
  };
34
34
  exports.toRequestBodyV3 = toRequestBodyV3;
35
- const toRequestBodiesV3 = ({ requestBodies, context }) => {
35
+ const toRequestBodiesV3 = ({ requestBodies, stackTrail, context }) => {
36
36
  if (!requestBodies) {
37
37
  return undefined;
38
38
  }
@@ -40,7 +40,7 @@ const toRequestBodiesV3 = ({ requestBodies, context }) => {
40
40
  .map(([key, value]) => {
41
41
  return [
42
42
  key,
43
- (0, tracer_js_1.tracer)(context.stackTrail, key, () => (0, exports.toRequestBodyV3)({ requestBody: value, context }))
43
+ stackTrail.trace(key, st => (0, exports.toRequestBodyV3)({ requestBody: value, stackTrail: st, context }))
44
44
  ];
45
45
  })
46
46
  .filter(([, value]) => Boolean(value));
@@ -2,20 +2,24 @@ import type { ParseContextType } from '../../context/parseTypes.js';
2
2
  import type { OpenAPIV3 } from 'openapi-types';
3
3
  import { OasResponse } from './Response.js';
4
4
  import type { OasRef } from '../ref/Ref.js';
5
+ import type { StackTrail } from '../../context/StackTrail.js';
5
6
  type ToResponsesV3Args = {
6
7
  responses: OpenAPIV3.ResponsesObject;
8
+ stackTrail: StackTrail;
7
9
  context: ParseContextType;
8
10
  };
9
- export declare const toResponsesV3: ({ responses, context }: ToResponsesV3Args) => Record<string, OasResponse | OasRef<"response">>;
11
+ export declare const toResponsesV3: ({ responses, stackTrail, context }: ToResponsesV3Args) => Record<string, OasResponse | OasRef<"response">>;
10
12
  type ToOptionalResponsesV3Args = {
11
13
  responses: OpenAPIV3.ResponsesObject | undefined;
14
+ stackTrail: StackTrail;
12
15
  context: ParseContextType;
13
16
  };
14
- export declare const toOptionalResponsesV3: ({ responses, context }: ToOptionalResponsesV3Args) => Record<string, OasResponse | OasRef<"response">> | undefined;
17
+ export declare const toOptionalResponsesV3: ({ responses, stackTrail, context }: ToOptionalResponsesV3Args) => Record<string, OasResponse | OasRef<"response">> | undefined;
15
18
  type ToResponseV3Args = {
16
19
  response: OpenAPIV3.ReferenceObject | OpenAPIV3.ResponseObject;
20
+ stackTrail: StackTrail;
17
21
  context: ParseContextType;
18
22
  };
19
- export declare const toResponseV3: ({ response, context }: ToResponseV3Args) => OasResponse | OasRef<"response">;
23
+ export declare const toResponseV3: ({ response, stackTrail, context }: ToResponseV3Args) => OasResponse | OasRef<"response">;
20
24
  export {};
21
25
  //# sourceMappingURL=toResponseV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAI3C,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,wBAG3B,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAsBrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,wBAGnC,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,uBAG1B,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAsBpD,CAAA"}
1
+ {"version":3,"file":"toResponseV3.d.ts","sourceRoot":"","sources":["../../../src/oas/response/toResponseV3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,SAAS,CAAC,eAAe,CAAA;IACpC,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,oCAI3B,iBAAiB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAuBrE,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,SAAS,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAA;IAChD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,oCAInC,yBAAyB,KAAG,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,SAMjF,CAAA;AAED,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,cAAc,CAAA;IAC9D,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,mCAI1B,gBAAgB,KAAG,WAAW,GAAG,MAAM,CAAC,UAAU,CAuBpD,CAAA"}
@@ -11,13 +11,12 @@ const toMediaTypeItemV3_js_1 = require("../mediaType/toMediaTypeItemV3.js");
11
11
  const Response_js_1 = require("./Response.js");
12
12
  const toSpecificationExtensionsV3_js_1 = require("../specificationExtensions/toSpecificationExtensionsV3.js");
13
13
  const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
14
- const tracer_js_1 = require("../../helpers/tracer.js");
15
- const toResponsesV3 = ({ responses, context }) => {
14
+ const toResponsesV3 = ({ responses, stackTrail, context }) => {
16
15
  const output = {};
17
16
  const entries = Object.entries(responses);
18
17
  for (const [key, value] of entries) {
19
18
  try {
20
- output[key] = (0, tracer_js_1.tracer)(context.stackTrail, key, () => (0, exports.toResponseV3)({ response: value, context }));
19
+ output[key] = stackTrail.trace(key, st => (0, exports.toResponseV3)({ response: value, stackTrail: st, context }));
21
20
  }
22
21
  catch (error) {
23
22
  (0, tiny_invariant_1.default)(error instanceof Error, 'Invalid error');
@@ -26,6 +25,7 @@ const toResponsesV3 = ({ responses, context }) => {
26
25
  level: 'error',
27
26
  error,
28
27
  parent: value,
28
+ stackTrail,
29
29
  type: 'INVALID_RESPONSE'
30
30
  });
31
31
  }
@@ -33,28 +33,29 @@ const toResponsesV3 = ({ responses, context }) => {
33
33
  return output;
34
34
  };
35
35
  exports.toResponsesV3 = toResponsesV3;
36
- const toOptionalResponsesV3 = ({ responses, context }) => {
36
+ const toOptionalResponsesV3 = ({ responses, stackTrail, context }) => {
37
37
  if (!responses) {
38
38
  return undefined;
39
39
  }
40
- return (0, exports.toResponsesV3)({ responses, context });
40
+ return (0, exports.toResponsesV3)({ responses, stackTrail, context });
41
41
  };
42
42
  exports.toOptionalResponsesV3 = toOptionalResponsesV3;
43
- const toResponseV3 = ({ response, context }) => {
43
+ const toResponseV3 = ({ response, stackTrail, context }) => {
44
44
  if ((0, refFns_js_1.isRef)(response)) {
45
- return (0, toRefV31_js_1.toRefV31)({ ref: response, refType: 'response', context });
45
+ return (0, toRefV31_js_1.toRefV31)({ ref: response, refType: 'response', stackTrail, context });
46
46
  }
47
47
  const { description, headers, content, ...skipped } = response;
48
48
  const extensionFields = (0, toSpecificationExtensionsV3_js_1.toSpecificationExtensionsV3)({
49
49
  skipped,
50
50
  parent: response,
51
51
  context,
52
+ stackTrail,
52
53
  parentType: 'response'
53
54
  });
54
55
  return new Response_js_1.OasResponse({
55
56
  description,
56
- headers: (0, tracer_js_1.tracer)(context.stackTrail, 'headers', () => (0, toHeadersV3_js_1.toHeadersV3)({ headers, context })),
57
- content: (0, tracer_js_1.tracer)(context.stackTrail, 'content', () => (0, toMediaTypeItemV3_js_1.toOptionalMediaTypeItemsV3)({ content, context })),
57
+ headers: stackTrail.trace('headers', st => (0, toHeadersV3_js_1.toHeadersV3)({ headers, stackTrail: st, context })),
58
+ content: stackTrail.trace('content', st => (0, toMediaTypeItemV3_js_1.toOptionalMediaTypeItemsV3)({ content, stackTrail: st, context })),
58
59
  extensionFields
59
60
  });
60
61
  };
@@ -2,25 +2,30 @@ import type { ParseContextType } from '../../context/parseTypes.js';
2
2
  import type { OpenAPIV3 } from 'openapi-types';
3
3
  import type { OasSchema } from './Schema.js';
4
4
  import type { OasRef } from '../ref/Ref.js';
5
+ import type { StackTrail } from '../../context/StackTrail.js';
5
6
  type ToSchemasV3Args = {
6
7
  schemas: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject>;
8
+ stackTrail: StackTrail;
7
9
  context: ParseContextType;
8
10
  };
9
- export declare const toSchemasV3: ({ schemas, context }: ToSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">>;
11
+ export declare const toSchemasV3: ({ schemas, stackTrail, context }: ToSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">>;
10
12
  type ToOptionalSchemasV3Args = {
11
13
  schemas: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject> | undefined;
14
+ stackTrail: StackTrail;
12
15
  context: ParseContextType;
13
16
  };
14
- export declare const toOptionalSchemasV3: ({ schemas, context }: ToOptionalSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">> | undefined;
17
+ export declare const toOptionalSchemasV3: ({ schemas, stackTrail, context }: ToOptionalSchemasV3Args) => Record<string, OasSchema | OasRef<"schema">> | undefined;
15
18
  type ToSchemaV3Args = {
16
19
  schema: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject;
20
+ stackTrail: StackTrail;
17
21
  context: ParseContextType;
18
22
  };
19
- export declare const toSchemaV3: ({ schema, context }: ToSchemaV3Args) => OasSchema | OasRef<"schema">;
23
+ export declare const toSchemaV3: ({ schema, stackTrail, context }: ToSchemaV3Args) => OasSchema | OasRef<"schema">;
20
24
  type ToOptionalSchemaV3Args = {
21
25
  schema: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | undefined;
26
+ stackTrail: StackTrail;
22
27
  context: ParseContextType;
23
28
  };
24
- export declare const toOptionalSchemaV3: ({ schema, context }: ToOptionalSchemaV3Args) => OasSchema | OasRef<"schema"> | undefined;
29
+ export declare const toOptionalSchemaV3: ({ schema, stackTrail, context }: ToOptionalSchemaV3Args) => OasSchema | OasRef<"schema"> | undefined;
25
30
  export {};
26
31
  //# sourceMappingURL=toSchemasV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAc3C,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;IAC3E,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,sBAGzB,eAAe,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAqB/D,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAA;IACvF,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,sBAGjC,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAM3E,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAA;IAC1D,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,qBAAqB,cAAc,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAyJ3F,CAAA;AA+CD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,qBAGhC,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
1
+ {"version":3,"file":"toSchemasV3.d.ts","sourceRoot":"","sources":["../../../src/oas/schema/toSchemasV3.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAa3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;IAC3E,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,kCAIzB,eAAe,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAsB/D,CAAA;AAED,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAA;IACvF,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,kCAIjC,uBAAuB,KAAG,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,SAM3E,CAAA;AAED,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,CAAA;IAC1D,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,iCAIxB,cAAc,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAiK9C,CAAA;AA+CD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,YAAY,GAAG,SAAS,CAAA;IACtE,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,iCAIhC,sBAAsB,KAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAM1D,CAAA"}
@@ -19,13 +19,12 @@ const refFns_js_2 = require("../../helpers/refFns.js");
19
19
  const merge_intersection_js_1 = require("../_merge-all-of/merge-intersection.js");
20
20
  const merge_union_js_1 = require("../_merge-all-of/merge-union.js");
21
21
  const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
22
- const tracer_js_1 = require("../../helpers/tracer.js");
23
- const toSchemasV3 = ({ schemas, context }) => {
22
+ const toSchemasV3 = ({ schemas, stackTrail, context }) => {
24
23
  const output = {};
25
24
  const entries = Object.entries(schemas);
26
25
  for (const [key, schema] of entries) {
27
26
  try {
28
- output[key] = (0, tracer_js_1.tracer)(context.stackTrail, key, () => (0, exports.toSchemaV3)({ schema, context }));
27
+ output[key] = stackTrail.trace(key, st => (0, exports.toSchemaV3)({ schema, stackTrail: st, context }));
29
28
  }
30
29
  catch (error) {
31
30
  (0, tiny_invariant_1.default)(error instanceof Error, 'Invalid error');
@@ -34,6 +33,7 @@ const toSchemasV3 = ({ schemas, context }) => {
34
33
  level: 'error',
35
34
  error,
36
35
  parent: schema,
36
+ stackTrail,
37
37
  type: 'INVALID_SCHEMA'
38
38
  });
39
39
  }
@@ -41,29 +41,29 @@ const toSchemasV3 = ({ schemas, context }) => {
41
41
  return output;
42
42
  };
43
43
  exports.toSchemasV3 = toSchemasV3;
44
- const toOptionalSchemasV3 = ({ schemas, context }) => {
44
+ const toOptionalSchemasV3 = ({ schemas, stackTrail, context }) => {
45
45
  if (!schemas) {
46
46
  return undefined;
47
47
  }
48
- return (0, exports.toSchemasV3)({ schemas, context });
48
+ return (0, exports.toSchemasV3)({ schemas, stackTrail, context });
49
49
  };
50
50
  exports.toOptionalSchemasV3 = toOptionalSchemasV3;
51
- const toSchemaV3 = ({ schema, context }) => {
51
+ const toSchemaV3 = ({ schema, stackTrail, context }) => {
52
52
  if ((0, refFns_js_1.isRef)(schema)) {
53
- return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', context });
53
+ return (0, toRefV31_js_1.toRefV31)({ ref: schema, refType: 'schema', stackTrail, context });
54
54
  }
55
55
  return (0, ts_pattern_1.match)(schema)
56
56
  .with({ allOf: ts_pattern_1.P.array() }, schema => {
57
- return (0, tracer_js_1.tracer)(context.stackTrail, 'allOf', () => {
57
+ return stackTrail.trace('allOf', st => {
58
58
  const merged = (0, merge_intersection_js_1.mergeIntersection)({
59
59
  schema,
60
60
  getRef: (0, refFns_js_2.toGetRef)(context.documentObject)
61
61
  });
62
- return (0, exports.toSchemaV3)({ schema: merged, context });
62
+ return (0, exports.toSchemaV3)({ schema: merged, stackTrail: st, context });
63
63
  });
64
64
  })
65
65
  .with({ oneOf: ts_pattern_1.P.array() }, oneOf => {
66
- return (0, tracer_js_1.tracer)(context.stackTrail, 'oneOf', () => {
66
+ return stackTrail.trace('oneOf', st => {
67
67
  const merged = (0, merge_union_js_1.mergeUnion)({
68
68
  schema: oneOf,
69
69
  getRef: (0, refFns_js_2.toGetRef)(context.documentObject),
@@ -77,18 +77,18 @@ const toSchemaV3 = ({ schema, context }) => {
77
77
  throw new Error('"oneOf" array is empty');
78
78
  }
79
79
  if (members.length === 1) {
80
- return (0, exports.toSchemaV3)({ schema: members[0], context });
80
+ return (0, exports.toSchemaV3)({ schema: members[0], stackTrail: st, context });
81
81
  }
82
- return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'oneOf', context });
82
+ return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'oneOf', stackTrail: st, context });
83
83
  });
84
84
  })
85
85
  .with({ anyOf: ts_pattern_1.P.array() }, matched => {
86
- return (0, tracer_js_1.tracer)(context.stackTrail, 'anyOf', () => {
86
+ return stackTrail.trace('anyOf', st => {
87
87
  // deno-lint-ignore ban-ts-comment
88
88
  // @ts-expect-error
89
89
  if (matched['x-expansionResources']) {
90
90
  const { anyOf, ...value } = matched;
91
- return (0, toUnion_js_1.toUnion)({ value, members: anyOf, parentType: 'anyOf', context });
91
+ return (0, toUnion_js_1.toUnion)({ value, members: anyOf, parentType: 'anyOf', stackTrail: st, context });
92
92
  }
93
93
  const merged = (0, merge_union_js_1.mergeUnion)({
94
94
  schema: matched,
@@ -103,23 +103,24 @@ const toSchemaV3 = ({ schema, context }) => {
103
103
  throw new Error('"anyOf" array is empty');
104
104
  }
105
105
  if (members.length === 1) {
106
- return (0, exports.toSchemaV3)({ schema: members[0], context });
106
+ return (0, exports.toSchemaV3)({ schema: members[0], stackTrail: st, context });
107
107
  }
108
- return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'anyOf', context });
108
+ return (0, toUnion_js_1.toUnion)({ value, members, parentType: 'anyOf', stackTrail: st, context });
109
109
  });
110
110
  })
111
- .with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, context }))
112
- .with({ type: 'array' }, value => (0, toArray_js_1.toArray)({ value, context }))
113
- .with({ type: 'integer' }, value => (0, toInteger_js_1.toInteger)({ value, context }))
114
- .with({ type: 'number' }, value => (0, toNumber_js_1.toNumber)({ value, context }))
115
- .with({ type: 'boolean' }, value => (0, toBoolean_js_1.toBoolean)({ value, context }))
116
- .with({ type: 'string' }, value => (0, toString_js_1.toString)({ value, context }))
111
+ .with({ type: 'object' }, value => (0, toObject_js_1.toObject)({ value, stackTrail, context }))
112
+ .with({ type: 'array' }, value => (0, toArray_js_1.toArray)({ value, stackTrail, context }))
113
+ .with({ type: 'integer' }, value => (0, toInteger_js_1.toInteger)({ value, stackTrail, context }))
114
+ .with({ type: 'number' }, value => (0, toNumber_js_1.toNumber)({ value, stackTrail, context }))
115
+ .with({ type: 'boolean' }, value => (0, toBoolean_js_1.toBoolean)({ value, stackTrail, context }))
116
+ .with({ type: 'string' }, value => (0, toString_js_1.toString)({ value, stackTrail, context }))
117
117
  .otherwise(value => {
118
118
  if (possibleObject(value)) {
119
119
  context.logIssueNoKey({
120
120
  level: 'warning',
121
121
  message: 'Object has "properties" property, but is missing type="object" property',
122
122
  parent: value,
123
+ stackTrail,
123
124
  type: 'MISSING_OBJECT_TYPE'
124
125
  });
125
126
  return (0, toObject_js_1.toObject)({
@@ -127,6 +128,7 @@ const toSchemaV3 = ({ schema, context }) => {
127
128
  ...value,
128
129
  type: 'object'
129
130
  },
131
+ stackTrail,
130
132
  context
131
133
  });
132
134
  }
@@ -135,6 +137,7 @@ const toSchemaV3 = ({ schema, context }) => {
135
137
  level: 'warning',
136
138
  message: 'Object has "items" property, but is missing type="array" property',
137
139
  parent: value,
140
+ stackTrail,
138
141
  type: 'MISSING_ARRAY_TYPE'
139
142
  });
140
143
  return (0, toArray_js_1.toArray)({
@@ -143,6 +146,7 @@ const toSchemaV3 = ({ schema, context }) => {
143
146
  type: 'array'
144
147
  // Adding cast here since {} is a valid value for items
145
148
  },
149
+ stackTrail,
146
150
  context
147
151
  });
148
152
  }
@@ -151,6 +155,7 @@ const toSchemaV3 = ({ schema, context }) => {
151
155
  level: 'warning',
152
156
  message: 'Object has a boolean "default" or "example" property, but is missing type="boolean" property',
153
157
  parent: value,
158
+ stackTrail,
154
159
  type: 'MISSING_BOOLEAN_TYPE'
155
160
  });
156
161
  return (0, toBoolean_js_1.toBoolean)({
@@ -158,6 +163,7 @@ const toSchemaV3 = ({ schema, context }) => {
158
163
  ...value,
159
164
  type: 'boolean'
160
165
  },
166
+ stackTrail,
161
167
  context
162
168
  });
163
169
  }
@@ -166,6 +172,7 @@ const toSchemaV3 = ({ schema, context }) => {
166
172
  level: 'warning',
167
173
  message: 'Object has a string "default" or "example" property, but is missing type="string" property',
168
174
  parent: value,
175
+ stackTrail,
169
176
  type: 'MISSING_STRING_TYPE'
170
177
  });
171
178
  return (0, toString_js_1.toString)({
@@ -173,10 +180,11 @@ const toSchemaV3 = ({ schema, context }) => {
173
180
  ...value,
174
181
  type: 'string'
175
182
  },
183
+ stackTrail,
176
184
  context
177
185
  });
178
186
  }
179
- return (0, toUnknown_js_1.toUnknown)({ value, context });
187
+ return (0, toUnknown_js_1.toUnknown)({ value, stackTrail, context });
180
188
  });
181
189
  };
182
190
  exports.toSchemaV3 = toSchemaV3;
@@ -213,10 +221,10 @@ const possibleObject = (value) => {
213
221
  typeof value.properties === 'object' &&
214
222
  value.properties);
215
223
  };
216
- const toOptionalSchemaV3 = ({ schema, context }) => {
224
+ const toOptionalSchemaV3 = ({ schema, stackTrail, context }) => {
217
225
  if (!schema) {
218
226
  return undefined;
219
227
  }
220
- return (0, exports.toSchemaV3)({ schema, context });
228
+ return (0, exports.toSchemaV3)({ schema, stackTrail, context });
221
229
  };
222
230
  exports.toOptionalSchemaV3 = toOptionalSchemaV3;
@@ -1,9 +1,11 @@
1
1
  import type { ParseContextType } from '../../context/parseTypes.js';
2
2
  import { OasSecurityRequirement } from './SecurityRequirement.js';
3
+ import type { StackTrail } from '../../context/StackTrail.js';
3
4
  type ToSecurityRequirementsV3Args = {
4
5
  security: Record<string, string[]>[] | undefined;
6
+ stackTrail: StackTrail;
5
7
  context: ParseContextType;
6
8
  };
7
- export declare const toSecurityRequirementsV3: ({ security, context }: ToSecurityRequirementsV3Args) => OasSecurityRequirement[] | undefined;
9
+ export declare const toSecurityRequirementsV3: ({ security, stackTrail, context }: ToSecurityRequirementsV3Args) => OasSecurityRequirement[] | undefined;
8
10
  export {};
9
11
  //# sourceMappingURL=toSecurityRequirement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toSecurityRequirement.d.ts","sourceRoot":"","sources":["../../../src/oas/securityRequirement/toSecurityRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;IAChD,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,uBAGtC,4BAA4B,KAAG,sBAAsB,EAAE,GAAG,SAQ5D,CAAA"}
1
+ {"version":3,"file":"toSecurityRequirement.d.ts","sourceRoot":"","sources":["../../../src/oas/securityRequirement/toSecurityRequirement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;IAChD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,mCAItC,4BAA4B,KAAG,sBAAsB,EAAE,GAAG,SAQ5D,CAAA"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toSecurityRequirementsV3 = void 0;
4
4
  const SecurityRequirement_js_1 = require("./SecurityRequirement.js");
5
- const toSecurityRequirementsV3 = ({ security, context }) => {
5
+ const toSecurityRequirementsV3 = ({ security, stackTrail, context }) => {
6
6
  if (!security) {
7
7
  return undefined;
8
8
  }
@@ -1,11 +1,13 @@
1
1
  import type { OpenAPIV3 } from 'openapi-types';
2
2
  import type { ParseContextType } from '../../context/parseTypes.js';
3
3
  import type { OasSecurityScheme } from './SecurityScheme.js';
4
+ import type { StackTrail } from '../../context/StackTrail.js';
4
5
  type ToSecuritySchemesArgs = {
5
6
  securitySchemes: Record<string, OpenAPIV3.ReferenceObject | OpenAPIV3.SecuritySchemeObject> | undefined;
7
+ stackTrail: StackTrail;
6
8
  context: ParseContextType;
7
9
  };
8
- export declare const toSecuritySchemesV3: ({ securitySchemes, context }: ToSecuritySchemesArgs) => // 'http' | 'apiKey' | 'oauth2' | 'openIdConnect'
10
+ export declare const toSecuritySchemesV3: ({ securitySchemes, stackTrail, context }: ToSecuritySchemesArgs) => // 'http' | 'apiKey' | 'oauth2' | 'openIdConnect'
9
11
  Record<string, OasSecurityScheme> | undefined;
10
12
  export {};
11
13
  //# sourceMappingURL=toSecuritySchemes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toSecuritySchemes.d.ts","sourceRoot":"","sources":["../../../src/oas/securitySchemes/toSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAgBnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAM5D,KAAK,qBAAqB,GAAG;IAC3B,eAAe,EACX,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,oBAAoB,CAAC,GAC1E,SAAS,CAAA;IACb,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,8BAGjC,qBAAqB,KACxB,AAD2B,iDAAiD;AAC5E,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,SAenC,CAAA"}
1
+ {"version":3,"file":"toSecuritySchemes.d.ts","sourceRoot":"","sources":["../../../src/oas/securitySchemes/toSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAgBnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAK5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC7D,KAAK,qBAAqB,GAAG;IAC3B,eAAe,EACX,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,eAAe,GAAG,SAAS,CAAC,oBAAoB,CAAC,GAC1E,SAAS,CAAA;IACb,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,0CAIjC,qBAAqB,KACxB,AAD2B,iDAAiD;AAC5E,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,SAenC,CAAA"}
@@ -40,29 +40,33 @@ const v = __importStar(require("valibot"));
40
40
  const security_scheme_types_js_1 = require("./security-scheme-types.js");
41
41
  const toRefV31_js_1 = require("../ref/toRefV31.js");
42
42
  const refFns_js_1 = require("../../helpers/refFns.js");
43
- const tracer_js_1 = require("../../helpers/tracer.js");
44
43
  const isEmpty_js_1 = require("../../helpers/isEmpty.js");
45
- const toSecuritySchemesV3 = ({ securitySchemes, context }) => {
44
+ const toSecuritySchemesV3 = ({ securitySchemes, stackTrail, context }) => {
46
45
  if (!securitySchemes) {
47
46
  return undefined;
48
47
  }
49
48
  return Object.fromEntries(Object.entries(securitySchemes).map(([key, value]) => {
50
49
  return [
51
50
  key,
52
- (0, tracer_js_1.tracer)(context.stackTrail, key, () => toSecuritySchemeV3({ securityScheme: value, context }))
51
+ stackTrail.trace(key, st => toSecuritySchemeV3({ securityScheme: value, stackTrail: st, context }))
53
52
  ];
54
53
  }));
55
54
  };
56
55
  exports.toSecuritySchemesV3 = toSecuritySchemesV3;
57
- const toSecuritySchemeV3 = ({ securityScheme, context }) => {
56
+ const toSecuritySchemeV3 = ({ securityScheme, stackTrail, context }) => {
58
57
  if ((0, refFns_js_1.isRef)(securityScheme)) {
59
- return (0, toRefV31_js_1.toRefV31)({ ref: securityScheme, refType: 'securityScheme', context });
58
+ return (0, toRefV31_js_1.toRefV31)({ ref: securityScheme, refType: 'securityScheme', stackTrail, context });
60
59
  }
61
60
  return (0, ts_pattern_1.match)(securityScheme)
62
61
  .with({ type: 'http' }, matched => {
63
62
  const { type: _type, description, scheme, bearerFormat, ...skipped } = v.parse(security_scheme_types_js_1.oasHttpSecuritySchemeData, matched);
64
63
  if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
65
- context.logSkippedFields({ skipped, parent: matched, parentType: 'securityScheme:http' });
64
+ context.logSkippedFields({
65
+ skipped,
66
+ parent: matched,
67
+ stackTrail,
68
+ parentType: 'securityScheme:http'
69
+ });
66
70
  }
67
71
  return new SecurityScheme_js_1.OasHttpSecurityScheme({
68
72
  description,
@@ -73,7 +77,12 @@ const toSecuritySchemeV3 = ({ securityScheme, context }) => {
73
77
  .with({ type: 'apiKey' }, matched => {
74
78
  const { type: _type, in: location, description, name, ...skipped } = v.parse(security_scheme_types_js_1.oasApiKeySecuritySchemeData, matched);
75
79
  if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
76
- context.logSkippedFields({ skipped, parent: matched, parentType: 'securityScheme:apiKey' });
80
+ context.logSkippedFields({
81
+ skipped,
82
+ parent: matched,
83
+ stackTrail,
84
+ parentType: 'securityScheme:apiKey'
85
+ });
77
86
  }
78
87
  return new SecurityScheme_js_1.OasApiKeySecurityScheme({
79
88
  description,
@@ -84,7 +93,12 @@ const toSecuritySchemeV3 = ({ securityScheme, context }) => {
84
93
  .with({ type: 'oauth2' }, matched => {
85
94
  const { type: _type, flows, description, ...skipped } = v.parse(security_scheme_types_js_1.oasOAuth2SecuritySchemeData, matched);
86
95
  if (!(0, isEmpty_js_1.isEmpty)(skipped)) {
87
- context.logSkippedFields({ skipped, parent: matched, parentType: 'securityScheme:oauth2' });
96
+ context.logSkippedFields({
97
+ skipped,
98
+ parent: matched,
99
+ stackTrail,
100
+ parentType: 'securityScheme:oauth2'
101
+ });
88
102
  }
89
103
  return new SecurityScheme_js_1.OasOAuth2SecurityScheme({
90
104
  description,
@@ -97,6 +111,7 @@ const toSecuritySchemeV3 = ({ securityScheme, context }) => {
97
111
  context.logSkippedFields({
98
112
  skipped,
99
113
  parent: matched,
114
+ stackTrail,
100
115
  parentType: 'securityScheme:openIdConnect'
101
116
  });
102
117
  }