ts-openapi-codegen 2.0.0 → 2.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/README.md +95 -2
  2. package/README.rus.md +95 -2
  3. package/dist/cli/analyzeDiff/__tests__/analyzeDiff.cli.test.d.ts +2 -0
  4. package/dist/cli/analyzeDiff/__tests__/analyzeDiff.cli.test.d.ts.map +1 -0
  5. package/dist/cli/analyzeDiff/__tests__/analyzeDiff.cli.test.js +365 -0
  6. package/dist/cli/analyzeDiff/__tests__/analyzeDiffRenameAndInvalidRegex.test.d.ts +2 -0
  7. package/dist/cli/analyzeDiff/__tests__/analyzeDiffRenameAndInvalidRegex.test.d.ts.map +1 -0
  8. package/dist/cli/analyzeDiff/__tests__/analyzeDiffRenameAndInvalidRegex.test.js +142 -0
  9. package/dist/cli/analyzeDiff/__tests__/analyzeDiffTypeCoercion.test.d.ts +2 -0
  10. package/dist/cli/analyzeDiff/__tests__/analyzeDiffTypeCoercion.test.d.ts.map +1 -0
  11. package/dist/cli/analyzeDiff/__tests__/analyzeDiffTypeCoercion.test.js +137 -0
  12. package/dist/cli/analyzeDiff/analyzeDiff.d.ts +17 -0
  13. package/dist/cli/analyzeDiff/analyzeDiff.d.ts.map +1 -0
  14. package/dist/cli/analyzeDiff/analyzeDiff.js +105 -0
  15. package/dist/cli/analyzeDiff/buildLegacyReport.d.ts +17 -0
  16. package/dist/cli/analyzeDiff/buildLegacyReport.d.ts.map +1 -0
  17. package/dist/cli/analyzeDiff/buildLegacyReport.js +54 -0
  18. package/dist/cli/analyzeDiff/ciSummary.d.ts +6 -0
  19. package/dist/cli/analyzeDiff/ciSummary.d.ts.map +1 -0
  20. package/dist/cli/analyzeDiff/ciSummary.js +20 -0
  21. package/dist/cli/analyzeDiff/diffEngine.d.ts +54 -0
  22. package/dist/cli/analyzeDiff/diffEngine.d.ts.map +1 -0
  23. package/dist/cli/analyzeDiff/diffEngine.js +209 -0
  24. package/dist/cli/analyzeDiff/ignoreRules.d.ts +33 -0
  25. package/dist/cli/analyzeDiff/ignoreRules.d.ts.map +1 -0
  26. package/dist/cli/analyzeDiff/ignoreRules.js +93 -0
  27. package/dist/cli/analyzeDiff/ignoreSemanticChanges.d.ts +10 -0
  28. package/dist/cli/analyzeDiff/ignoreSemanticChanges.d.ts.map +1 -0
  29. package/dist/cli/analyzeDiff/ignoreSemanticChanges.js +84 -0
  30. package/dist/cli/analyzeDiff/logLegacyReport.d.ts +6 -0
  31. package/dist/cli/analyzeDiff/logLegacyReport.d.ts.map +1 -0
  32. package/dist/cli/analyzeDiff/logLegacyReport.js +29 -0
  33. package/dist/cli/analyzeDiff/miracles.d.ts +89 -0
  34. package/dist/cli/analyzeDiff/miracles.d.ts.map +1 -0
  35. package/dist/cli/analyzeDiff/miracles.js +325 -0
  36. package/dist/cli/analyzeDiff/pluginPaths.d.ts +5 -0
  37. package/dist/cli/analyzeDiff/pluginPaths.d.ts.map +1 -0
  38. package/dist/cli/analyzeDiff/pluginPaths.js +13 -0
  39. package/dist/cli/analyzeDiff/report.d.ts +3 -0
  40. package/dist/cli/analyzeDiff/report.d.ts.map +1 -0
  41. package/dist/cli/analyzeDiff/report.js +7 -0
  42. package/dist/cli/analyzeDiff/semanticDiffContext.d.ts +6 -0
  43. package/dist/cli/analyzeDiff/semanticDiffContext.d.ts.map +1 -0
  44. package/dist/cli/analyzeDiff/semanticDiffContext.js +16 -0
  45. package/dist/cli/analyzeDiff/specParser.d.ts +22 -0
  46. package/dist/cli/analyzeDiff/specParser.d.ts.map +1 -0
  47. package/dist/cli/analyzeDiff/specParser.js +80 -0
  48. package/dist/cli/analyzeDiff/types.d.ts +61 -0
  49. package/dist/cli/analyzeDiff/types.d.ts.map +1 -0
  50. package/dist/cli/analyzeDiff/types.js +2 -0
  51. package/dist/cli/analyzeDiff/writeLegacyReport.d.ts +6 -0
  52. package/dist/cli/analyzeDiff/writeLegacyReport.d.ts.map +1 -0
  53. package/dist/cli/analyzeDiff/writeLegacyReport.js +21 -0
  54. package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts.map +1 -1
  55. package/dist/cli/checkAndUpdateConfig/checkConfig.js +13 -8
  56. package/dist/cli/checkAndUpdateConfig/constants.d.ts +0 -9
  57. package/dist/cli/checkAndUpdateConfig/constants.d.ts.map +1 -1
  58. package/dist/cli/checkAndUpdateConfig/constants.js +1 -10
  59. package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts.map +1 -1
  60. package/dist/cli/checkAndUpdateConfig/updateConfig.js +11 -7
  61. package/dist/cli/checkAndUpdateConfig/utils/selectConfigAction.d.ts.map +1 -1
  62. package/dist/cli/checkAndUpdateConfig/utils/selectConfigAction.js +6 -3
  63. package/dist/cli/checkAndUpdateConfig/utils/updateExistingConfigFile.d.ts.map +1 -1
  64. package/dist/cli/checkAndUpdateConfig/utils/updateExistingConfigFile.js +3 -2
  65. package/dist/cli/checkAndUpdateConfig/utils/writeExampleConfigFile.d.ts.map +1 -1
  66. package/dist/cli/checkAndUpdateConfig/utils/writeExampleConfigFile.js +2 -2
  67. package/dist/cli/generateOpenApiClient/__tests__/generateOpenApiClient.strict.test.d.ts +2 -0
  68. package/dist/cli/generateOpenApiClient/__tests__/generateOpenApiClient.strict.test.d.ts.map +1 -0
  69. package/dist/cli/generateOpenApiClient/__tests__/generateOpenApiClient.strict.test.js +152 -0
  70. package/dist/cli/generateOpenApiClient/generateOpenApiClient.d.ts +6 -2
  71. package/dist/cli/generateOpenApiClient/generateOpenApiClient.d.ts.map +1 -1
  72. package/dist/cli/generateOpenApiClient/generateOpenApiClient.js +54 -18
  73. package/dist/cli/index.js +57 -2
  74. package/dist/cli/initOpenApiConfig/init.d.ts.map +1 -1
  75. package/dist/cli/initOpenApiConfig/init.js +19 -6
  76. package/dist/cli/initOpenApiConfig/initConfig.d.ts +1 -0
  77. package/dist/cli/initOpenApiConfig/initConfig.d.ts.map +1 -1
  78. package/dist/cli/initOpenApiConfig/initConfig.js +47 -24
  79. package/dist/cli/initOpenApiConfig/initCustomRequest.d.ts +8 -1
  80. package/dist/cli/initOpenApiConfig/initCustomRequest.d.ts.map +1 -1
  81. package/dist/cli/initOpenApiConfig/initCustomRequest.js +40 -8
  82. package/dist/cli/initOpenApiConfig/utils/buildConfig.d.ts.map +1 -1
  83. package/dist/cli/initOpenApiConfig/utils/buildConfig.js +60 -0
  84. package/dist/cli/initOpenApiConfig/utils/validateSpecFile.d.ts.map +1 -1
  85. package/dist/cli/initOpenApiConfig/utils/validateSpecFile.js +2 -1
  86. package/dist/cli/initOpenApiConfig/utils/writeConfigFile.d.ts.map +1 -1
  87. package/dist/cli/initOpenApiConfig/utils/writeConfigFile.js +2 -1
  88. package/dist/cli/interactive/confirmDialog.d.ts.map +1 -1
  89. package/dist/cli/interactive/confirmDialog.js +3 -2
  90. package/dist/cli/interactive/constants.d.ts +2 -2
  91. package/dist/cli/interactive/constants.js +8 -8
  92. package/dist/cli/interactive/selectDialog.d.ts.map +1 -1
  93. package/dist/cli/interactive/selectDialog.js +11 -6
  94. package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -1
  95. package/dist/cli/previewChanges/previewChanges.js +45 -17
  96. package/dist/cli/schemas/analyzeDiff.d.ts +14 -0
  97. package/dist/cli/schemas/analyzeDiff.d.ts.map +1 -0
  98. package/dist/cli/schemas/analyzeDiff.js +28 -0
  99. package/dist/cli/schemas/generate.d.ts +9 -0
  100. package/dist/cli/schemas/generate.d.ts.map +1 -1
  101. package/dist/cli/schemas/generate.js +9 -0
  102. package/dist/cli/schemas/index.d.ts +3 -1
  103. package/dist/cli/schemas/index.d.ts.map +1 -1
  104. package/dist/cli/schemas/index.js +2 -0
  105. package/dist/common/Consts.d.ts +1 -0
  106. package/dist/common/Consts.d.ts.map +1 -1
  107. package/dist/common/Consts.js +15 -1
  108. package/dist/common/Logger.d.ts +20 -1
  109. package/dist/common/Logger.d.ts.map +1 -1
  110. package/dist/common/Logger.js +70 -9
  111. package/dist/common/LoggerMessages.d.ts +135 -33
  112. package/dist/common/LoggerMessages.d.ts.map +1 -1
  113. package/dist/common/LoggerMessages.js +118 -45
  114. package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts.map +1 -1
  115. package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.js +7 -1
  116. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts +4 -0
  117. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts.map +1 -1
  118. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts +8 -0
  119. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts.map +1 -1
  120. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts +8 -0
  121. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts.map +1 -1
  122. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts +8 -0
  123. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts.map +1 -1
  124. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.d.ts +35 -0
  125. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.d.ts.map +1 -1
  126. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.js +4 -1
  127. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV5.d.ts +79 -0
  128. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV5.d.ts.map +1 -0
  129. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV5.js +19 -0
  130. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts +171 -0
  131. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts.map +1 -1
  132. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.js +2 -0
  133. package/dist/common/VersionedSchema/CommonSchemas.d.ts +40 -0
  134. package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
  135. package/dist/common/VersionedSchema/CommonSchemas.js +34 -1
  136. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +4 -0
  137. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts.map +1 -1
  138. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts +4 -0
  139. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts.map +1 -1
  140. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts +4 -0
  141. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts.map +1 -1
  142. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +4 -0
  143. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts.map +1 -1
  144. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +4 -0
  145. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts.map +1 -1
  146. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +4 -0
  147. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts.map +1 -1
  148. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts +4 -0
  149. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts.map +1 -1
  150. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts +4 -0
  151. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts.map +1 -1
  152. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +4 -0
  153. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts.map +1 -1
  154. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -1
  155. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +23 -3
  156. package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.js +2 -2
  157. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts.map +1 -1
  158. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.js +2 -1
  159. package/dist/common/__tests__/Logger.test.d.ts +2 -0
  160. package/dist/common/__tests__/Logger.test.d.ts.map +1 -0
  161. package/dist/common/__tests__/Logger.test.js +100 -0
  162. package/dist/common/utils/__tests__/convertArrayToObject.test.js +3 -0
  163. package/dist/common/utils/__tests__/eslintFix.test.d.ts +2 -0
  164. package/dist/common/utils/__tests__/eslintFix.test.d.ts.map +1 -0
  165. package/dist/common/utils/__tests__/eslintFix.test.js +134 -0
  166. package/dist/common/utils/__tests__/format.test.d.ts +2 -0
  167. package/dist/common/utils/__tests__/format.test.d.ts.map +1 -0
  168. package/dist/common/utils/__tests__/format.test.js +90 -0
  169. package/dist/common/utils/convertArrayToObject.d.ts.map +1 -1
  170. package/dist/common/utils/convertArrayToObject.js +3 -0
  171. package/dist/common/utils/eslintFix.d.ts +7 -0
  172. package/dist/common/utils/eslintFix.d.ts.map +1 -0
  173. package/dist/common/utils/eslintFix.js +78 -0
  174. package/dist/common/utils/format.d.ts +1 -1
  175. package/dist/common/utils/format.d.ts.map +1 -1
  176. package/dist/common/utils/format.js +39 -15
  177. package/dist/common/utils/jsonPath.d.ts +5 -0
  178. package/dist/common/utils/jsonPath.d.ts.map +1 -0
  179. package/dist/common/utils/jsonPath.js +27 -0
  180. package/dist/common/utils/normalizeObject.d.ts +2 -0
  181. package/dist/common/utils/normalizeObject.d.ts.map +1 -0
  182. package/dist/common/utils/normalizeObject.js +63 -0
  183. package/dist/core/Context.d.ts +8 -1
  184. package/dist/core/Context.d.ts.map +1 -1
  185. package/dist/core/Context.js +23 -4
  186. package/dist/core/OpenApiClient.d.ts +2 -0
  187. package/dist/core/OpenApiClient.d.ts.map +1 -1
  188. package/dist/core/OpenApiClient.js +116 -6
  189. package/dist/core/WriteClient.d.ts +4 -0
  190. package/dist/core/WriteClient.d.ts.map +1 -1
  191. package/dist/core/WriteClient.js +38 -4
  192. package/dist/core/__tests__/WriteClient.test.js +4 -1
  193. package/dist/core/api/v2/parser/__tests__/getModel.test.d.ts +2 -0
  194. package/dist/core/api/v2/parser/__tests__/getModel.test.d.ts.map +1 -0
  195. package/dist/core/api/v2/parser/__tests__/getModel.test.js +34 -0
  196. package/dist/core/api/v2/parser/getModel.d.ts.map +1 -1
  197. package/dist/core/api/v2/parser/getModel.js +6 -1
  198. package/dist/core/api/v2/parser/getOperation.d.ts.map +1 -1
  199. package/dist/core/api/v2/parser/getOperation.js +2 -0
  200. package/dist/core/api/v2/parser/getOperationResponses.d.ts.map +1 -1
  201. package/dist/core/api/v2/parser/getOperationResponses.js +9 -1
  202. package/dist/core/api/v2/types/OpenApiSchema.model.d.ts +2 -0
  203. package/dist/core/api/v2/types/OpenApiSchema.model.d.ts.map +1 -1
  204. package/dist/core/api/v3/parser/__tests__/getContent.test.d.ts +2 -0
  205. package/dist/core/api/v3/parser/__tests__/getContent.test.d.ts.map +1 -0
  206. package/dist/core/api/v3/parser/__tests__/getContent.test.js +65 -0
  207. package/dist/core/api/v3/parser/__tests__/getModel.test.d.ts +2 -0
  208. package/dist/core/api/v3/parser/__tests__/getModel.test.d.ts.map +1 -0
  209. package/dist/core/api/v3/parser/__tests__/getModel.test.js +34 -0
  210. package/dist/core/api/v3/parser/getContent.d.ts.map +1 -1
  211. package/dist/core/api/v3/parser/getContent.js +21 -11
  212. package/dist/core/api/v3/parser/getModel.d.ts.map +1 -1
  213. package/dist/core/api/v3/parser/getModel.js +6 -1
  214. package/dist/core/api/v3/parser/getOperation.d.ts.map +1 -1
  215. package/dist/core/api/v3/parser/getOperation.js +2 -0
  216. package/dist/core/api/v3/parser/getOperationResponses.d.ts.map +1 -1
  217. package/dist/core/api/v3/parser/getOperationResponses.js +9 -1
  218. package/dist/core/api/v3/types/OpenApiSchema.model.d.ts +2 -0
  219. package/dist/core/api/v3/types/OpenApiSchema.model.d.ts.map +1 -1
  220. package/dist/core/governance/__tests__/evaluateGovernanceRules.test.d.ts +2 -0
  221. package/dist/core/governance/__tests__/evaluateGovernanceRules.test.d.ts.map +1 -0
  222. package/dist/core/governance/__tests__/evaluateGovernanceRules.test.js +100 -0
  223. package/dist/core/governance/__tests__/loadGovernanceConfig.test.d.ts +2 -0
  224. package/dist/core/governance/__tests__/loadGovernanceConfig.test.d.ts.map +1 -0
  225. package/dist/core/governance/__tests__/loadGovernanceConfig.test.js +71 -0
  226. package/dist/core/governance/evaluateGovernanceRules.d.ts +42 -0
  227. package/dist/core/governance/evaluateGovernanceRules.d.ts.map +1 -0
  228. package/dist/core/governance/evaluateGovernanceRules.js +134 -0
  229. package/dist/core/governance/governanceConfigSchema.d.ts +4 -0
  230. package/dist/core/governance/governanceConfigSchema.d.ts.map +1 -0
  231. package/dist/core/governance/governanceConfigSchema.js +39 -0
  232. package/dist/core/governance/loadGovernanceConfig.d.ts +7 -0
  233. package/dist/core/governance/loadGovernanceConfig.d.ts.map +1 -0
  234. package/dist/core/governance/loadGovernanceConfig.js +60 -0
  235. package/dist/core/index.d.ts +3 -0
  236. package/dist/core/index.d.ts.map +1 -1
  237. package/dist/core/index.js +4 -2
  238. package/dist/core/plugins/GeneratorPlugin.model.d.ts +42 -0
  239. package/dist/core/plugins/GeneratorPlugin.model.d.ts.map +1 -0
  240. package/dist/core/plugins/GeneratorPlugin.model.js +2 -0
  241. package/dist/core/plugins/__tests__/applySemanticDiffPluginHooks.test.d.ts +2 -0
  242. package/dist/core/plugins/__tests__/applySemanticDiffPluginHooks.test.d.ts.map +1 -0
  243. package/dist/core/plugins/__tests__/applySemanticDiffPluginHooks.test.js +115 -0
  244. package/dist/core/plugins/__tests__/loadGeneratorPlugins.test.d.ts +2 -0
  245. package/dist/core/plugins/__tests__/loadGeneratorPlugins.test.d.ts.map +1 -0
  246. package/dist/core/plugins/__tests__/loadGeneratorPlugins.test.js +62 -0
  247. package/dist/core/plugins/applySemanticDiffPluginHooks.d.ts +28 -0
  248. package/dist/core/plugins/applySemanticDiffPluginHooks.d.ts.map +1 -0
  249. package/dist/core/plugins/applySemanticDiffPluginHooks.js +160 -0
  250. package/dist/core/plugins/builtins/xTypescriptTypePlugin.d.ts +6 -0
  251. package/dist/core/plugins/builtins/xTypescriptTypePlugin.d.ts.map +1 -0
  252. package/dist/core/plugins/builtins/xTypescriptTypePlugin.js +13 -0
  253. package/dist/core/plugins/getBuiltinPlugins.d.ts +6 -0
  254. package/dist/core/plugins/getBuiltinPlugins.d.ts.map +1 -0
  255. package/dist/core/plugins/getBuiltinPlugins.js +10 -0
  256. package/dist/core/plugins/index.d.ts +4 -0
  257. package/dist/core/plugins/index.d.ts.map +1 -0
  258. package/dist/core/plugins/index.js +5 -0
  259. package/dist/core/plugins/loadGeneratorPlugins.d.ts +6 -0
  260. package/dist/core/plugins/loadGeneratorPlugins.d.ts.map +1 -0
  261. package/dist/core/plugins/loadGeneratorPlugins.js +94 -0
  262. package/dist/core/semanticDiff/__tests__/analyzeOpenApiDiff.test.d.ts +2 -0
  263. package/dist/core/semanticDiff/__tests__/analyzeOpenApiDiff.test.d.ts.map +1 -0
  264. package/dist/core/semanticDiff/__tests__/analyzeOpenApiDiff.test.js +537 -0
  265. package/dist/core/semanticDiff/__tests__/semanticDiffReportSchema.test.d.ts +2 -0
  266. package/dist/core/semanticDiff/__tests__/semanticDiffReportSchema.test.d.ts.map +1 -0
  267. package/dist/core/semanticDiff/__tests__/semanticDiffReportSchema.test.js +66 -0
  268. package/dist/core/semanticDiff/analyzeOpenApiDiff.d.ts +45 -0
  269. package/dist/core/semanticDiff/analyzeOpenApiDiff.d.ts.map +1 -0
  270. package/dist/core/semanticDiff/analyzeOpenApiDiff.js +640 -0
  271. package/dist/core/semanticDiff/semanticDiffReportSchema.d.ts +11 -0
  272. package/dist/core/semanticDiff/semanticDiffReportSchema.d.ts.map +1 -0
  273. package/dist/core/semanticDiff/semanticDiffReportSchema.js +132 -0
  274. package/dist/core/strict/__tests__/validateOpenApiStrict.test.d.ts +2 -0
  275. package/dist/core/strict/__tests__/validateOpenApiStrict.test.d.ts.map +1 -0
  276. package/dist/core/strict/__tests__/validateOpenApiStrict.test.js +156 -0
  277. package/dist/core/strict/validateOpenApiStrict.d.ts +43 -0
  278. package/dist/core/strict/validateOpenApiStrict.d.ts.map +1 -0
  279. package/dist/core/strict/validateOpenApiStrict.js +253 -0
  280. package/dist/core/types/base/ClientArtifacts.model.d.ts +2 -0
  281. package/dist/core/types/base/ClientArtifacts.model.d.ts.map +1 -1
  282. package/dist/core/types/base/Templates.model.d.ts +3 -0
  283. package/dist/core/types/base/Templates.model.d.ts.map +1 -1
  284. package/dist/core/types/enums/ModelsMode.enum.d.ts +5 -0
  285. package/dist/core/types/enums/ModelsMode.enum.d.ts.map +1 -0
  286. package/dist/core/types/enums/ModelsMode.enum.js +8 -0
  287. package/dist/core/types/shared/Client.model.d.ts +2 -0
  288. package/dist/core/types/shared/Client.model.d.ts.map +1 -1
  289. package/dist/core/types/shared/DiffInfo.model.d.ts +13 -0
  290. package/dist/core/types/shared/DiffInfo.model.d.ts.map +1 -0
  291. package/dist/core/types/shared/DiffInfo.model.js +2 -0
  292. package/dist/core/types/shared/Miracle.model.d.ts +13 -0
  293. package/dist/core/types/shared/Miracle.model.d.ts.map +1 -0
  294. package/dist/core/types/shared/Miracle.model.js +2 -0
  295. package/dist/core/types/shared/Model.model.d.ts +23 -0
  296. package/dist/core/types/shared/Model.model.d.ts.map +1 -1
  297. package/dist/core/types/shared/Operation.model.d.ts +5 -0
  298. package/dist/core/types/shared/Operation.model.d.ts.map +1 -1
  299. package/dist/core/utils/__mocks__/templates.d.ts.map +1 -1
  300. package/dist/core/utils/__mocks__/templates.js +9 -0
  301. package/dist/core/utils/__tests__/applyDiffReportToClient.test.d.ts +2 -0
  302. package/dist/core/utils/__tests__/applyDiffReportToClient.test.d.ts.map +1 -0
  303. package/dist/core/utils/__tests__/applyDiffReportToClient.test.js +108 -0
  304. package/dist/core/utils/__tests__/getMappedType.test.js +2 -0
  305. package/dist/core/utils/__tests__/getOperationResponseCode.test.js +7 -2
  306. package/dist/core/utils/__tests__/getOperationResults.test.d.ts +2 -0
  307. package/dist/core/utils/__tests__/getOperationResults.test.d.ts.map +1 -0
  308. package/dist/core/utils/__tests__/getOperationResults.test.js +43 -0
  309. package/dist/core/utils/__tests__/prepareDtoModels.test.d.ts +2 -0
  310. package/dist/core/utils/__tests__/prepareDtoModels.test.d.ts.map +1 -0
  311. package/dist/core/utils/__tests__/prepareDtoModels.test.js +116 -0
  312. package/dist/core/utils/__tests__/serviceHelpers.test.js +1 -0
  313. package/dist/core/utils/__tests__/writeClientModels.test.js +50 -0
  314. package/dist/core/utils/applyDiffReportToClient.d.ts +14 -0
  315. package/dist/core/utils/applyDiffReportToClient.d.ts.map +1 -0
  316. package/dist/core/utils/applyDiffReportToClient.js +367 -0
  317. package/dist/core/utils/getMappedType.d.ts.map +1 -1
  318. package/dist/core/utils/getMappedType.js +2 -0
  319. package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
  320. package/dist/core/utils/getOpenApiSpec.js +1 -14
  321. package/dist/core/utils/getOperationResponseCode.d.ts.map +1 -1
  322. package/dist/core/utils/getOperationResponseCode.js +10 -8
  323. package/dist/core/utils/loadDiffReport.d.ts +39 -0
  324. package/dist/core/utils/loadDiffReport.d.ts.map +1 -0
  325. package/dist/core/utils/loadDiffReport.js +51 -0
  326. package/dist/core/utils/prepareDtoModels.d.ts +3 -0
  327. package/dist/core/utils/prepareDtoModels.d.ts.map +1 -0
  328. package/dist/core/utils/prepareDtoModels.js +189 -0
  329. package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
  330. package/dist/core/utils/registerHandlebarHelpers.js +4 -1
  331. package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
  332. package/dist/core/utils/registerHandlebarTemplates.js +6 -0
  333. package/dist/core/utils/validateRawOptions.d.ts +1 -1
  334. package/dist/core/utils/validateRawOptions.d.ts.map +1 -1
  335. package/dist/core/utils/validateRawOptions.js +4 -2
  336. package/dist/core/utils/writeClientCore.d.ts +2 -0
  337. package/dist/core/utils/writeClientCore.d.ts.map +1 -1
  338. package/dist/core/utils/writeClientCore.js +6 -1
  339. package/dist/core/utils/writeClientCoreIndex.d.ts +1 -0
  340. package/dist/core/utils/writeClientCoreIndex.d.ts.map +1 -1
  341. package/dist/core/utils/writeClientCoreIndex.js +2 -2
  342. package/dist/core/utils/writeClientExecutor.d.ts +2 -0
  343. package/dist/core/utils/writeClientExecutor.d.ts.map +1 -1
  344. package/dist/core/utils/writeClientExecutor.js +6 -2
  345. package/dist/core/utils/writeClientFullIndex.d.ts.map +1 -1
  346. package/dist/core/utils/writeClientFullIndex.js +3 -1
  347. package/dist/core/utils/writeClientModels.d.ts +6 -0
  348. package/dist/core/utils/writeClientModels.d.ts.map +1 -1
  349. package/dist/core/utils/writeClientModels.js +24 -3
  350. package/dist/core/utils/writeClientModelsIndex.d.ts +2 -0
  351. package/dist/core/utils/writeClientModelsIndex.d.ts.map +1 -1
  352. package/dist/core/utils/writeClientModelsIndex.js +2 -2
  353. package/dist/core/utils/writeClientSchemas.d.ts +2 -0
  354. package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
  355. package/dist/core/utils/writeClientSchemas.js +6 -2
  356. package/dist/core/utils/writeClientServices.d.ts +2 -0
  357. package/dist/core/utils/writeClientServices.d.ts.map +1 -1
  358. package/dist/core/utils/writeClientServices.js +6 -2
  359. package/dist/templatesCompiled/cli/openApiConfig.d.ts +4 -1
  360. package/dist/templatesCompiled/cli/openApiConfig.d.ts.map +1 -1
  361. package/dist/templatesCompiled/cli/openApiConfig.js +88 -37
  362. package/dist/templatesCompiled/client/core/ApiRequestOptions.js +1 -1
  363. package/dist/templatesCompiled/client/core/BaseDto.d.ts +8 -0
  364. package/dist/templatesCompiled/client/core/BaseDto.d.ts.map +1 -0
  365. package/dist/templatesCompiled/client/core/BaseDto.js +18 -0
  366. package/dist/templatesCompiled/client/core/axios/getResponseBody.js +1 -1
  367. package/dist/templatesCompiled/client/core/axios/request.js +2 -2
  368. package/dist/templatesCompiled/client/core/axios/sendRequest.js +4 -4
  369. package/dist/templatesCompiled/client/core/dtoUtils.d.ts +8 -0
  370. package/dist/templatesCompiled/client/core/dtoUtils.d.ts.map +1 -0
  371. package/dist/templatesCompiled/client/core/dtoUtils.js +18 -0
  372. package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.js +2 -2
  373. package/dist/templatesCompiled/client/core/executor/requestExecutor.js +1 -1
  374. package/dist/templatesCompiled/client/core/fetch/getResponseBody.js +1 -1
  375. package/dist/templatesCompiled/client/core/fetch/request.js +2 -2
  376. package/dist/templatesCompiled/client/core/functions/isBinary.js +1 -1
  377. package/dist/templatesCompiled/client/core/node/getResponseBody.js +1 -1
  378. package/dist/templatesCompiled/client/core/node/request.js +2 -2
  379. package/dist/templatesCompiled/client/core/xhr/getResponseBody.js +1 -1
  380. package/dist/templatesCompiled/client/core/xhr/request.js +2 -2
  381. package/dist/templatesCompiled/client/core/xhr/sendRequest.js +4 -4
  382. package/dist/templatesCompiled/client/exportModels.d.ts +34 -0
  383. package/dist/templatesCompiled/client/exportModels.d.ts.map +1 -0
  384. package/dist/templatesCompiled/client/exportModels.js +280 -0
  385. package/dist/templatesCompiled/client/exportService.d.ts +7 -4
  386. package/dist/templatesCompiled/client/exportService.d.ts.map +1 -1
  387. package/dist/templatesCompiled/client/exportService.js +52 -33
  388. package/dist/templatesCompiled/client/indexCore.d.ts +3 -1
  389. package/dist/templatesCompiled/client/indexCore.d.ts.map +1 -1
  390. package/dist/templatesCompiled/client/indexCore.js +13 -2
  391. package/dist/templatesCompiled/client/indexFull.d.ts +9 -7
  392. package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -1
  393. package/dist/templatesCompiled/client/indexFull.js +52 -34
  394. package/dist/templatesCompiled/client/indexModels.d.ts +7 -5
  395. package/dist/templatesCompiled/client/indexModels.d.ts.map +1 -1
  396. package/dist/templatesCompiled/client/indexModels.js +27 -18
  397. package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.d.ts +27 -19
  398. package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.d.ts.map +1 -1
  399. package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.js +144 -63
  400. package/dist/templatesCompiled/client/jsonschema/exportSchema.d.ts +1 -0
  401. package/dist/templatesCompiled/client/jsonschema/exportSchema.d.ts.map +1 -1
  402. package/dist/templatesCompiled/client/jsonschema/exportSchema.js +17 -13
  403. package/dist/templatesCompiled/client/partials/exportInterface.d.ts +13 -5
  404. package/dist/templatesCompiled/client/partials/exportInterface.d.ts.map +1 -1
  405. package/dist/templatesCompiled/client/partials/exportInterface.js +91 -21
  406. package/dist/templatesCompiled/client/partials/result.d.ts +6 -4
  407. package/dist/templatesCompiled/client/partials/result.d.ts.map +1 -1
  408. package/dist/templatesCompiled/client/partials/result.js +16 -6
  409. package/dist/templatesCompiled/client/partials/serviceOption.d.ts +1 -0
  410. package/dist/templatesCompiled/client/partials/serviceOption.d.ts.map +1 -1
  411. package/dist/templatesCompiled/client/partials/serviceOption.js +11 -4
  412. package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.d.ts +22 -16
  413. package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.d.ts.map +1 -1
  414. package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.js +72 -60
  415. package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.d.ts +27 -19
  416. package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.d.ts.map +1 -1
  417. package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.js +77 -61
  418. package/package.json +7 -5
@@ -7,131 +7,196 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  /* eslint: disable */
8
8
  // @ts-nocheck
9
9
  exports.default = { "1": function (container, depth0, helpers, partials, data) {
10
- var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
10
+ var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
11
11
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
12
12
  return parent[propertyName];
13
13
  }
14
14
  return undefined;
15
15
  };
16
- return "Joi.string()"
17
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minLength"), { "name": "if", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 12 }, "end": { "line": 2, "column": 57 } } })) != null ? stack1 : "")
18
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxLength"), { "name": "if", "hash": {}, "fn": container.program(4, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 57 }, "end": { "line": 2, "column": 102 } } })) != null ? stack1 : "")
19
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "pattern"), { "name": "if", "hash": {}, "fn": container.program(6, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 102 }, "end": { "line": 2, "column": 149 } } })) != null ? stack1 : "")
20
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "format"), { "name": "if", "hash": {}, "fn": container.program(8, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 149 }, "end": { "line": 2, "column": 365 } } })) != null ? stack1 : "")
21
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(23, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 365 }, "end": { "line": 2, "column": 402 } } })) != null ? stack1 : "")
16
+ return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "needsCoercion"), { "name": "if", "hash": {}, "fn": container.program(2, data, 0), "inverse": container.program(26, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 878 } } })) != null ? stack1 : "")
22
17
  + "\n";
23
18
  }, "2": function (container, depth0, helpers, partials, data) {
19
+ var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
20
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
21
+ return parent[propertyName];
22
+ }
23
+ return undefined;
24
+ };
25
+ return "Joi.alternatives().try(Joi.string()"
26
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minLength"), { "name": "if", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 56 }, "end": { "line": 2, "column": 101 } } })) != null ? stack1 : "")
27
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxLength"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 101 }, "end": { "line": 2, "column": 146 } } })) != null ? stack1 : "")
28
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "pattern"), { "name": "if", "hash": {}, "fn": container.program(7, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 146 }, "end": { "line": 2, "column": 193 } } })) != null ? stack1 : "")
29
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "format"), { "name": "if", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 193 }, "end": { "line": 2, "column": 409 } } })) != null ? stack1 : "")
30
+ + ", Joi.number())"
31
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 424 }, "end": { "line": 2, "column": 461 } } })) != null ? stack1 : "");
32
+ }, "3": function (container, depth0, helpers, partials, data) {
24
33
  var stack1;
25
34
  return ".min("
26
- + ((stack1 = container.lambda(container.strict(depth0, "minLength", { "start": { "line": 2, "column": 37 }, "end": { "line": 2, "column": 46 } }), depth0)) != null ? stack1 : "")
35
+ + ((stack1 = container.lambda(container.strict(depth0, "minLength", { "start": { "line": 2, "column": 81 }, "end": { "line": 2, "column": 90 } }), depth0)) != null ? stack1 : "")
27
36
  + ")";
28
- }, "4": function (container, depth0, helpers, partials, data) {
37
+ }, "5": function (container, depth0, helpers, partials, data) {
29
38
  var stack1;
30
39
  return ".max("
31
- + ((stack1 = container.lambda(container.strict(depth0, "maxLength", { "start": { "line": 2, "column": 82 }, "end": { "line": 2, "column": 91 } }), depth0)) != null ? stack1 : "")
40
+ + ((stack1 = container.lambda(container.strict(depth0, "maxLength", { "start": { "line": 2, "column": 126 }, "end": { "line": 2, "column": 135 } }), depth0)) != null ? stack1 : "")
32
41
  + ")";
33
- }, "6": function (container, depth0, helpers, partials, data) {
42
+ }, "7": function (container, depth0, helpers, partials, data) {
34
43
  var stack1;
35
44
  return ".pattern(/"
36
- + ((stack1 = container.lambda(container.strict(depth0, "pattern", { "start": { "line": 2, "column": 130 }, "end": { "line": 2, "column": 137 } }), depth0)) != null ? stack1 : "")
45
+ + ((stack1 = container.lambda(container.strict(depth0, "pattern", { "start": { "line": 2, "column": 174 }, "end": { "line": 2, "column": 181 } }), depth0)) != null ? stack1 : "")
37
46
  + "/)";
38
- }, "8": function (container, depth0, helpers, partials, data) {
47
+ }, "9": function (container, depth0, helpers, partials, data) {
39
48
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
40
49
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
41
50
  return parent[propertyName];
42
51
  }
43
52
  return undefined;
44
53
  };
45
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "date-time", { "name": "equals", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.program(11, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 163 }, "end": { "line": 2, "column": 358 } } })) != null ? stack1 : "");
46
- }, "9": function (container, depth0, helpers, partials, data) {
54
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "date-time", { "name": "equals", "hash": {}, "fn": container.program(10, data, 0), "inverse": container.program(12, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 207 }, "end": { "line": 2, "column": 402 } } })) != null ? stack1 : "");
55
+ }, "10": function (container, depth0, helpers, partials, data) {
47
56
  return ".isoDate()";
48
- }, "11": function (container, depth0, helpers, partials, data) {
57
+ }, "12": function (container, depth0, helpers, partials, data) {
49
58
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
50
59
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
51
60
  return parent[propertyName];
52
61
  }
53
62
  return undefined;
54
63
  };
55
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "date", { "name": "equals", "hash": {}, "fn": container.program(12, data, 0), "inverse": container.program(14, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 203 }, "end": { "line": 2, "column": 347 } } })) != null ? stack1 : "");
56
- }, "12": function (container, depth0, helpers, partials, data) {
64
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "date", { "name": "equals", "hash": {}, "fn": container.program(13, data, 0), "inverse": container.program(15, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 247 }, "end": { "line": 2, "column": 391 } } })) != null ? stack1 : "");
65
+ }, "13": function (container, depth0, helpers, partials, data) {
57
66
  return ".date()";
58
- }, "14": function (container, depth0, helpers, partials, data) {
67
+ }, "15": function (container, depth0, helpers, partials, data) {
59
68
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
60
69
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
61
70
  return parent[propertyName];
62
71
  }
63
72
  return undefined;
64
73
  };
65
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "email", { "name": "equals", "hash": {}, "fn": container.program(15, data, 0), "inverse": container.program(17, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 239 }, "end": { "line": 2, "column": 347 } } })) != null ? stack1 : "");
66
- }, "15": function (container, depth0, helpers, partials, data) {
74
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "email", { "name": "equals", "hash": {}, "fn": container.program(16, data, 0), "inverse": container.program(18, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 283 }, "end": { "line": 2, "column": 391 } } })) != null ? stack1 : "");
75
+ }, "16": function (container, depth0, helpers, partials, data) {
67
76
  return ".email()";
68
- }, "17": function (container, depth0, helpers, partials, data) {
77
+ }, "18": function (container, depth0, helpers, partials, data) {
69
78
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
70
79
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
71
80
  return parent[propertyName];
72
81
  }
73
82
  return undefined;
74
83
  };
75
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "uri", { "name": "equals", "hash": {}, "fn": container.program(18, data, 0), "inverse": container.program(20, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 277 }, "end": { "line": 2, "column": 347 } } })) != null ? stack1 : "");
76
- }, "18": function (container, depth0, helpers, partials, data) {
84
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "uri", { "name": "equals", "hash": {}, "fn": container.program(19, data, 0), "inverse": container.program(21, data, 0), "data": data, "loc": { "start": { "line": 2, "column": 321 }, "end": { "line": 2, "column": 391 } } })) != null ? stack1 : "");
85
+ }, "19": function (container, depth0, helpers, partials, data) {
77
86
  return ".uri()";
78
- }, "20": function (container, depth0, helpers, partials, data) {
87
+ }, "21": function (container, depth0, helpers, partials, data) {
79
88
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
80
89
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
81
90
  return parent[propertyName];
82
91
  }
83
92
  return undefined;
84
93
  };
85
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "uuid", { "name": "equals", "hash": {}, "fn": container.program(21, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 311 }, "end": { "line": 2, "column": 347 } } })) != null ? stack1 : "");
86
- }, "21": function (container, depth0, helpers, partials, data) {
94
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "format"), "uuid", { "name": "equals", "hash": {}, "fn": container.program(22, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 355 }, "end": { "line": 2, "column": 391 } } })) != null ? stack1 : "");
95
+ }, "22": function (container, depth0, helpers, partials, data) {
87
96
  return ".uuid()";
88
- }, "23": function (container, depth0, helpers, partials, data) {
97
+ }, "24": function (container, depth0, helpers, partials, data) {
89
98
  return ".allow(null)";
90
- }, "25": function (container, depth0, helpers, partials, data) {
99
+ }, "26": function (container, depth0, helpers, partials, data) {
100
+ var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
101
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
102
+ return parent[propertyName];
103
+ }
104
+ return undefined;
105
+ };
106
+ return "Joi.string()"
107
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minLength"), { "name": "if", "hash": {}, "fn": container.program(3, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 481 }, "end": { "line": 2, "column": 526 } } })) != null ? stack1 : "")
108
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maxLength"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 526 }, "end": { "line": 2, "column": 571 } } })) != null ? stack1 : "")
109
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "pattern"), { "name": "if", "hash": {}, "fn": container.program(7, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 571 }, "end": { "line": 2, "column": 618 } } })) != null ? stack1 : "")
110
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "format"), { "name": "if", "hash": {}, "fn": container.program(9, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 618 }, "end": { "line": 2, "column": 834 } } })) != null ? stack1 : "")
111
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 2, "column": 834 }, "end": { "line": 2, "column": 871 } } })) != null ? stack1 : "");
112
+ }, "28": function (container, depth0, helpers, partials, data) {
91
113
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
92
114
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
93
115
  return parent[propertyName];
94
116
  }
95
117
  return undefined;
96
118
  };
97
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "number", { "name": "equals", "hash": {}, "fn": container.program(26, data, 0), "inverse": container.program(33, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
98
- }, "26": function (container, depth0, helpers, partials, data) {
99
- var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
119
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "number", { "name": "equals", "hash": {}, "fn": container.program(29, data, 0), "inverse": container.program(39, data, 0), "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
120
+ }, "29": function (container, depth0, helpers, partials, data) {
121
+ var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
100
122
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
101
123
  return parent[propertyName];
102
124
  }
103
125
  return undefined;
104
126
  };
105
- return "Joi.number()"
106
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(27, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 12 }, "end": { "line": 4, "column": 53 } } })) != null ? stack1 : "")
107
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(29, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 53 }, "end": { "line": 4, "column": 94 } } })) != null ? stack1 : "")
108
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(31, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 94 }, "end": { "line": 4, "column": 146 } } })) != null ? stack1 : "")
109
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(23, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 146 }, "end": { "line": 4, "column": 183 } } })) != null ? stack1 : "")
127
+ return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "needsCoercion"), { "name": "if", "hash": {}, "fn": container.program(30, data, 0), "inverse": container.program(37, data, 0), "data": data, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 440 } } })) != null ? stack1 : "")
110
128
  + "\n";
111
- }, "27": function (container, depth0, helpers, partials, data) {
129
+ }, "30": function (container, depth0, helpers, partials, data) {
130
+ var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
131
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
132
+ return parent[propertyName];
133
+ }
134
+ return undefined;
135
+ };
136
+ return "Joi.alternatives().try(Joi.number()"
137
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(31, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 56 }, "end": { "line": 4, "column": 97 } } })) != null ? stack1 : "")
138
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(33, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 97 }, "end": { "line": 4, "column": 138 } } })) != null ? stack1 : "")
139
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(35, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 138 }, "end": { "line": 4, "column": 190 } } })) != null ? stack1 : "")
140
+ + ", Joi.string())"
141
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 205 }, "end": { "line": 4, "column": 242 } } })) != null ? stack1 : "");
142
+ }, "31": function (container, depth0, helpers, partials, data) {
112
143
  var stack1;
113
144
  return ".min("
114
- + ((stack1 = container.lambda(container.strict(depth0, "minimum", { "start": { "line": 4, "column": 35 }, "end": { "line": 4, "column": 42 } }), depth0)) != null ? stack1 : "")
145
+ + ((stack1 = container.lambda(container.strict(depth0, "minimum", { "start": { "line": 4, "column": 79 }, "end": { "line": 4, "column": 86 } }), depth0)) != null ? stack1 : "")
115
146
  + ")";
116
- }, "29": function (container, depth0, helpers, partials, data) {
147
+ }, "33": function (container, depth0, helpers, partials, data) {
117
148
  var stack1;
118
149
  return ".max("
119
- + ((stack1 = container.lambda(container.strict(depth0, "maximum", { "start": { "line": 4, "column": 76 }, "end": { "line": 4, "column": 83 } }), depth0)) != null ? stack1 : "")
150
+ + ((stack1 = container.lambda(container.strict(depth0, "maximum", { "start": { "line": 4, "column": 120 }, "end": { "line": 4, "column": 127 } }), depth0)) != null ? stack1 : "")
120
151
  + ")";
121
- }, "31": function (container, depth0, helpers, partials, data) {
152
+ }, "35": function (container, depth0, helpers, partials, data) {
122
153
  var stack1;
123
154
  return ".multiple("
124
- + ((stack1 = container.lambda(container.strict(depth0, "multipleOf", { "start": { "line": 4, "column": 125 }, "end": { "line": 4, "column": 135 } }), depth0)) != null ? stack1 : "")
155
+ + ((stack1 = container.lambda(container.strict(depth0, "multipleOf", { "start": { "line": 4, "column": 169 }, "end": { "line": 4, "column": 179 } }), depth0)) != null ? stack1 : "")
125
156
  + ")";
126
- }, "33": function (container, depth0, helpers, partials, data) {
157
+ }, "37": function (container, depth0, helpers, partials, data) {
158
+ var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
159
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
160
+ return parent[propertyName];
161
+ }
162
+ return undefined;
163
+ };
164
+ return "Joi.number()"
165
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(31, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 262 }, "end": { "line": 4, "column": 303 } } })) != null ? stack1 : "")
166
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(33, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 303 }, "end": { "line": 4, "column": 344 } } })) != null ? stack1 : "")
167
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(35, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 344 }, "end": { "line": 4, "column": 396 } } })) != null ? stack1 : "")
168
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 4, "column": 396 }, "end": { "line": 4, "column": 433 } } })) != null ? stack1 : "");
169
+ }, "39": function (container, depth0, helpers, partials, data) {
127
170
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
128
171
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
129
172
  return parent[propertyName];
130
173
  }
131
174
  return undefined;
132
175
  };
133
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "integer", { "name": "equals", "hash": {}, "fn": container.program(34, data, 0), "inverse": container.program(36, data, 0), "data": data, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
134
- }, "34": function (container, depth0, helpers, partials, data) {
176
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "integer", { "name": "equals", "hash": {}, "fn": container.program(40, data, 0), "inverse": container.program(45, data, 0), "data": data, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
177
+ }, "40": function (container, depth0, helpers, partials, data) {
178
+ var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
179
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
180
+ return parent[propertyName];
181
+ }
182
+ return undefined;
183
+ };
184
+ return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "needsCoercion"), { "name": "if", "hash": {}, "fn": container.program(41, data, 0), "inverse": container.program(43, data, 0), "data": data, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 460 } } })) != null ? stack1 : "")
185
+ + "\n";
186
+ }, "41": function (container, depth0, helpers, partials, data) {
187
+ var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
188
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
189
+ return parent[propertyName];
190
+ }
191
+ return undefined;
192
+ };
193
+ return "Joi.alternatives().try(Joi.number().integer()"
194
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(31, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 66 }, "end": { "line": 6, "column": 107 } } })) != null ? stack1 : "")
195
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(33, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 107 }, "end": { "line": 6, "column": 148 } } })) != null ? stack1 : "")
196
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(35, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 148 }, "end": { "line": 6, "column": 200 } } })) != null ? stack1 : "")
197
+ + ", Joi.string())"
198
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 215 }, "end": { "line": 6, "column": 252 } } })) != null ? stack1 : "");
199
+ }, "43": function (container, depth0, helpers, partials, data) {
135
200
  var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function (parent, propertyName) {
136
201
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
137
202
  return parent[propertyName];
@@ -139,20 +204,37 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
139
204
  return undefined;
140
205
  };
141
206
  return "Joi.number().integer()"
142
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(27, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 22 }, "end": { "line": 6, "column": 63 } } })) != null ? stack1 : "")
143
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(29, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 63 }, "end": { "line": 6, "column": 104 } } })) != null ? stack1 : "")
144
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(31, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 104 }, "end": { "line": 6, "column": 156 } } })) != null ? stack1 : "")
145
- + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(23, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 156 }, "end": { "line": 6, "column": 193 } } })) != null ? stack1 : "")
207
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "minimum"), { "name": "if", "hash": {}, "fn": container.program(31, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 282 }, "end": { "line": 6, "column": 323 } } })) != null ? stack1 : "")
208
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "maximum"), { "name": "if", "hash": {}, "fn": container.program(33, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 323 }, "end": { "line": 6, "column": 364 } } })) != null ? stack1 : "")
209
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "multipleOf"), { "name": "if", "hash": {}, "fn": container.program(35, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 364 }, "end": { "line": 6, "column": 416 } } })) != null ? stack1 : "")
210
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 6, "column": 416 }, "end": { "line": 6, "column": 453 } } })) != null ? stack1 : "");
211
+ }, "45": function (container, depth0, helpers, partials, data) {
212
+ var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
213
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
214
+ return parent[propertyName];
215
+ }
216
+ return undefined;
217
+ };
218
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "boolean", { "name": "equals", "hash": {}, "fn": container.program(46, data, 0), "inverse": container.program(51, data, 0), "data": data, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
219
+ }, "46": function (container, depth0, helpers, partials, data) {
220
+ var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
221
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
222
+ return parent[propertyName];
223
+ }
224
+ return undefined;
225
+ };
226
+ return ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "needsCoercion"), { "name": "if", "hash": {}, "fn": container.program(47, data, 0), "inverse": container.program(49, data, 0), "data": data, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 174 } } })) != null ? stack1 : "")
146
227
  + "\n";
147
- }, "36": function (container, depth0, helpers, partials, data) {
228
+ }, "47": function (container, depth0, helpers, partials, data) {
148
229
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
149
230
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
150
231
  return parent[propertyName];
151
232
  }
152
233
  return undefined;
153
234
  };
154
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "boolean", { "name": "equals", "hash": {}, "fn": container.program(37, data, 0), "inverse": container.program(39, data, 0), "data": data, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
155
- }, "37": function (container, depth0, helpers, partials, data) {
235
+ return "Joi.alternatives().try(Joi.boolean(), Joi.string())"
236
+ + ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 72 }, "end": { "line": 8, "column": 109 } } })) != null ? stack1 : "");
237
+ }, "49": function (container, depth0, helpers, partials, data) {
156
238
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
157
239
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
158
240
  return parent[propertyName];
@@ -160,17 +242,16 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
160
242
  return undefined;
161
243
  };
162
244
  return "Joi.boolean()"
163
- + ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(23, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 50 } } })) != null ? stack1 : "")
164
- + "\n";
165
- }, "39": function (container, depth0, helpers, partials, data) {
245
+ + ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 8, "column": 130 }, "end": { "line": 8, "column": 167 } } })) != null ? stack1 : "");
246
+ }, "51": function (container, depth0, helpers, partials, data) {
166
247
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
167
248
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
168
249
  return parent[propertyName];
169
250
  }
170
251
  return undefined;
171
252
  };
172
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "File", { "name": "equals", "hash": {}, "fn": container.program(40, data, 0), "inverse": container.program(42, data, 0), "data": data, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
173
- }, "40": function (container, depth0, helpers, partials, data) {
253
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "File", { "name": "equals", "hash": {}, "fn": container.program(52, data, 0), "inverse": container.program(54, data, 0), "data": data, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
254
+ }, "52": function (container, depth0, helpers, partials, data) {
174
255
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
175
256
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
176
257
  return parent[propertyName];
@@ -178,17 +259,17 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
178
259
  return undefined;
179
260
  };
180
261
  return "Joi.any()"
181
- + ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(23, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 46 } } })) != null ? stack1 : "")
262
+ + ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "isNullable"), { "name": "if", "hash": {}, "fn": container.program(24, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 46 } } })) != null ? stack1 : "")
182
263
  + "\n";
183
- }, "42": function (container, depth0, helpers, partials, data) {
264
+ }, "54": function (container, depth0, helpers, partials, data) {
184
265
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
185
266
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
186
267
  return parent[propertyName];
187
268
  }
188
269
  return undefined;
189
270
  };
190
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "null", { "name": "equals", "hash": {}, "fn": container.program(43, data, 0), "inverse": container.program(40, data, 0), "data": data, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
191
- }, "43": function (container, depth0, helpers, partials, data) {
271
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "null", { "name": "equals", "hash": {}, "fn": container.program(55, data, 0), "inverse": container.program(52, data, 0), "data": data, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 15, "column": 0 } } })) != null ? stack1 : "");
272
+ }, "55": function (container, depth0, helpers, partials, data) {
192
273
  return "Joi.any().allow(null)\n";
193
274
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
194
275
  var stack1, lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -197,5 +278,5 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
197
278
  }
198
279
  return undefined;
199
280
  };
200
- return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "string", { "name": "equals", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(25, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 15, "column": 11 } } })) != null ? stack1 : "");
281
+ return ((stack1 = lookupProperty(helpers, "equals").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "base"), "string", { "name": "equals", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.program(28, data, 0), "data": data, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 15, "column": 11 } } })) != null ? stack1 : "");
201
282
  }, "useData": true };
@@ -2,6 +2,7 @@ declare const _default: {
2
2
  "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
3
3
  "2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
4
4
  "3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
5
+ "5": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
5
6
  compiler: (string | number)[];
6
7
  main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
7
8
  usePartial: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"exportSchema.d.ts","sourceRoot":"","sources":["../../../../src/templatesCompiled/client/jsonschema/exportSchema.ts"],"names":[],"mappings":";;;;;;;;;AAMA,wBAgEmC"}
1
+ {"version":3,"file":"exportSchema.d.ts","sourceRoot":"","sources":["../../../../src/templatesCompiled/client/jsonschema/exportSchema.ts"],"names":[],"mappings":";;;;;;;;;;AAMA,wBAoEmC"}
@@ -33,8 +33,10 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
33
33
  return " as "
34
34
  + ((stack1 = container.lambda(container.strict(depth0, "alias", { "start": { "line": 5, "column": 45 }, "end": { "line": 5, "column": 50 } }), depth0)) != null ? stack1 : "")
35
35
  + "Schema";
36
+ }, "5": function (container, depth0, helpers, partials, data) {
37
+ return ", coerceTypes: true";
36
38
  }, "compiler": [8, ">= 4.3.0"], "main": function (container, depth0, helpers, partials, data) {
37
- var stack1, alias1 = container.strict, alias2 = container.lambda, lookupProperty = container.lookupProperty || function (parent, propertyName) {
39
+ var stack1, alias1 = depth0 != null ? depth0 : (container.nullContext || {}), alias2 = container.strict, alias3 = container.lambda, lookupProperty = container.lookupProperty || function (parent, propertyName) {
38
40
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
39
41
  return parent[propertyName];
40
42
  }
@@ -42,28 +44,30 @@ exports.default = { "1": function (container, depth0, helpers, partials, data) {
42
44
  };
43
45
  return ((stack1 = container.invokePartial(lookupProperty(partials, "header"), depth0, { "name": "header", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
44
46
  + "\n"
45
- + ((stack1 = lookupProperty(helpers, "if").call(depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty(depth0, "imports"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 7 } } })) != null ? stack1 : "")
46
- + "\nimport Ajv, { ErrorObject } from 'ajv';\nimport addFormats from 'ajv-formats';\n\nconst ajv = new Ajv({ allErrors: true });\naddFormats(ajv);\n\nexport const "
47
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 15, "column": 16 }, "end": { "line": 15, "column": 20 } }), depth0)) != null ? stack1 : "")
47
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "imports"), { "name": "if", "hash": {}, "fn": container.program(1, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 7 } } })) != null ? stack1 : "")
48
+ + "\nimport Ajv, { ErrorObject } from 'ajv';\nimport addFormats from 'ajv-formats';\n\nconst ajv = new Ajv({ allErrors: true"
49
+ + ((stack1 = lookupProperty(helpers, "if").call(alias1, lookupProperty(depth0, "hasCoercion"), { "name": "if", "hash": {}, "fn": container.program(5, data, 0), "inverse": container.noop, "data": data, "loc": { "start": { "line": 12, "column": 37 }, "end": { "line": 12, "column": 82 } } })) != null ? stack1 : "")
50
+ + " });\naddFormats(ajv);\n\nexport const "
51
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 15, "column": 16 }, "end": { "line": 15, "column": 20 } }), depth0)) != null ? stack1 : "")
48
52
  + "Schema = "
49
53
  + ((stack1 = container.invokePartial(lookupProperty(partials, "jsonschema/jsonschemaSchema"), depth0, { "name": "jsonschema/jsonschemaSchema", "data": data, "helpers": helpers, "partials": partials, "decorators": container.decorators })) != null ? stack1 : "")
50
54
  + ";\n\nexport type "
51
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } }), depth0)) != null ? stack1 : "")
55
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } }), depth0)) != null ? stack1 : "")
52
56
  + " = any; // JSON Schema doesn't provide type inference\n\nexport function validate"
53
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 31 } }), depth0)) != null ? stack1 : "")
57
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 31 } }), depth0)) != null ? stack1 : "")
54
58
  + "(data: unknown): { valid: true; data: "
55
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 19, "column": 75 }, "end": { "line": 19, "column": 79 } }), depth0)) != null ? stack1 : "")
59
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 19, "column": 75 }, "end": { "line": 19, "column": 79 } }), depth0)) != null ? stack1 : "")
56
60
  + " } | { valid: false; errors: ErrorObject[] } {\n const validate = ajv.compile("
57
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 20, "column": 36 }, "end": { "line": 20, "column": 40 } }), depth0)) != null ? stack1 : "")
61
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 20, "column": 36 }, "end": { "line": 20, "column": 40 } }), depth0)) != null ? stack1 : "")
58
62
  + "Schema);\n const valid = validate(data);\n if (valid) {\n return { valid: true, data: data as "
59
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 23, "column": 47 }, "end": { "line": 23, "column": 51 } }), depth0)) != null ? stack1 : "")
63
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 23, "column": 47 }, "end": { "line": 23, "column": 51 } }), depth0)) != null ? stack1 : "")
60
64
  + " };\n }\n return { valid: false, errors: validate.errors || [] };\n}\n\nexport function validate"
61
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 28, "column": 27 }, "end": { "line": 28, "column": 31 } }), depth0)) != null ? stack1 : "")
65
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 28, "column": 27 }, "end": { "line": 28, "column": 31 } }), depth0)) != null ? stack1 : "")
62
66
  + "Sync(data: unknown): "
63
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 28, "column": 58 }, "end": { "line": 28, "column": 62 } }), depth0)) != null ? stack1 : "")
67
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 28, "column": 58 }, "end": { "line": 28, "column": 62 } }), depth0)) != null ? stack1 : "")
64
68
  + " {\n const validate = ajv.compile("
65
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 29, "column": 36 }, "end": { "line": 29, "column": 40 } }), depth0)) != null ? stack1 : "")
69
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 29, "column": 36 }, "end": { "line": 29, "column": 40 } }), depth0)) != null ? stack1 : "")
66
70
  + "Schema);\n const valid = validate(data);\n if (!valid) {\n throw new Error(ajv.errorsText(validate.errors));\n }\n return data as "
67
- + ((stack1 = alias2(alias1(depth0, "name", { "start": { "line": 34, "column": 22 }, "end": { "line": 34, "column": 26 } }), depth0)) != null ? stack1 : "")
71
+ + ((stack1 = alias3(alias2(depth0, "name", { "start": { "line": 34, "column": 22 }, "end": { "line": 34, "column": 26 } }), depth0)) != null ? stack1 : "")
68
72
  + ";\n}\n";
69
73
  }, "usePartial": true, "useData": true };
@@ -2,12 +2,20 @@ declare const _default: {
2
2
  "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
3
3
  "3": (container: any, depth0: any, helpers: any, partials: any, data: any, blockParams: any, depths: any) => string;
4
4
  "4": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
5
- "6": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
6
- "7": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
7
- "8": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
8
- "9": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
9
- "11": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
5
+ "5": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
6
+ "6": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
7
+ "8": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
8
+ "9": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
9
+ "10": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
10
+ "12": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
10
11
  "13": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
12
+ "15": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
13
+ "16": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
14
+ "17": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
15
+ "18": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
16
+ "20": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
17
+ "22": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
18
+ "24": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
11
19
  compiler: (string | number)[];
12
20
  main: (container: any, depth0: any, helpers: any, partials: any, data: any, blockParams: any, depths: any) => string;
13
21
  usePartial: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"exportInterface.d.ts","sourceRoot":"","sources":["../../../../src/templatesCompiled/client/partials/exportInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAMA,wBAiGoD"}
1
+ {"version":3,"file":"exportInterface.d.ts","sourceRoot":"","sources":["../../../../src/templatesCompiled/client/partials/exportInterface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBA+KoD"}