ts-openapi-codegen 2.0.0-beta.1 → 2.0.0-beta.10
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.
- package/README.md +149 -103
- package/README.rus.md +149 -101
- package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts +2 -1
- package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts.map +1 -1
- package/dist/cli/checkAndUpdateConfig/checkConfig.js +14 -6
- package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts +2 -1
- package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts.map +1 -1
- package/dist/cli/checkAndUpdateConfig/updateConfig.js +13 -5
- package/dist/cli/{generate/runGenerateOpenApi.d.ts → generateOpenApiClient/generateOpenApiClient.d.ts} +2 -2
- package/dist/cli/generateOpenApiClient/generateOpenApiClient.d.ts.map +1 -0
- package/dist/cli/{generate/runGenerateOpenApi.js → generateOpenApiClient/generateOpenApiClient.js} +31 -11
- package/dist/cli/index.js +29 -8
- package/dist/cli/initOpenApiConfig/Types.d.ts +4 -4
- package/dist/cli/initOpenApiConfig/Types.d.ts.map +1 -1
- package/dist/cli/initOpenApiConfig/init.d.ts +6 -0
- package/dist/cli/initOpenApiConfig/init.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/init.js +53 -0
- package/dist/cli/initOpenApiConfig/initConfig.d.ts +11 -0
- package/dist/cli/initOpenApiConfig/initConfig.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/initConfig.js +102 -0
- package/dist/cli/initOpenApiConfig/initCustomRequest.d.ts +3 -0
- package/dist/cli/initOpenApiConfig/initCustomRequest.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/initCustomRequest.js +23 -0
- package/dist/cli/initOpenApiConfig/utils/buildConfig.d.ts +21 -0
- package/dist/cli/initOpenApiConfig/utils/buildConfig.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/utils/buildConfig.js +107 -0
- package/dist/cli/initOpenApiConfig/utils/findSpecFiles.d.ts +8 -0
- package/dist/cli/initOpenApiConfig/utils/findSpecFiles.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/utils/findSpecFiles.js +40 -0
- package/dist/cli/initOpenApiConfig/utils/registerHandlebarTemplates.d.ts +3 -0
- package/dist/cli/initOpenApiConfig/utils/registerHandlebarTemplates.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/utils/registerHandlebarTemplates.js +53 -0
- package/dist/cli/initOpenApiConfig/utils/validateSpecFile.d.ts +7 -0
- package/dist/cli/initOpenApiConfig/utils/validateSpecFile.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/utils/validateSpecFile.js +23 -0
- package/dist/cli/initOpenApiConfig/utils/validateSpecFiles.d.ts +11 -0
- package/dist/cli/initOpenApiConfig/utils/validateSpecFiles.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/utils/validateSpecFiles.js +24 -0
- package/dist/cli/initOpenApiConfig/utils/writeConfigFile.d.ts +11 -0
- package/dist/cli/initOpenApiConfig/utils/writeConfigFile.d.ts.map +1 -0
- package/dist/cli/initOpenApiConfig/utils/writeConfigFile.js +31 -0
- package/dist/cli/previewChanges/previewChanges.d.ts +8 -0
- package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -0
- package/dist/cli/previewChanges/previewChanges.js +189 -0
- package/dist/cli/previewChanges/utils/compareFiles.d.ts +6 -0
- package/dist/cli/previewChanges/utils/compareFiles.d.ts.map +1 -0
- package/dist/cli/previewChanges/utils/compareFiles.js +50 -0
- package/dist/cli/previewChanges/utils/formatDiff.d.ts +6 -0
- package/dist/cli/previewChanges/utils/formatDiff.d.ts.map +1 -0
- package/dist/cli/previewChanges/utils/formatDiff.js +30 -0
- package/dist/cli/previewChanges/utils/isDirectoryEmpty.d.ts +5 -0
- package/dist/cli/previewChanges/utils/isDirectoryEmpty.d.ts.map +1 -0
- package/dist/cli/previewChanges/utils/isDirectoryEmpty.js +17 -0
- package/dist/cli/previewChanges/utils/readDirectoryRecursive.d.ts +5 -0
- package/dist/cli/previewChanges/utils/readDirectoryRecursive.d.ts.map +1 -0
- package/dist/cli/previewChanges/utils/readDirectoryRecursive.js +28 -0
- package/dist/cli/previewChanges/utils/updateOutputPaths.d.ts +10 -0
- package/dist/cli/previewChanges/utils/updateOutputPaths.d.ts.map +1 -0
- package/dist/cli/previewChanges/utils/updateOutputPaths.js +106 -0
- package/dist/cli/schemas/base.d.ts +22 -0
- package/dist/cli/schemas/base.d.ts.map +1 -0
- package/dist/cli/schemas/base.js +23 -0
- package/dist/cli/schemas/checkConfig.d.ts +6 -0
- package/dist/cli/schemas/checkConfig.d.ts.map +1 -0
- package/dist/cli/schemas/checkConfig.js +5 -0
- package/dist/cli/schemas/generate.d.ts +8 -0
- package/dist/cli/schemas/generate.d.ts.map +1 -0
- package/dist/cli/schemas/generate.js +45 -0
- package/dist/cli/schemas/index.d.ts +8 -0
- package/dist/cli/schemas/index.d.ts.map +1 -0
- package/dist/cli/schemas/index.js +22 -0
- package/dist/cli/schemas/init.d.ts +10 -0
- package/dist/cli/schemas/init.d.ts.map +1 -0
- package/dist/cli/schemas/init.js +11 -0
- package/dist/cli/schemas/previewChanges.d.ts +9 -0
- package/dist/cli/schemas/previewChanges.d.ts.map +1 -0
- package/dist/cli/schemas/previewChanges.js +11 -0
- package/dist/cli/schemas/updateConfig.d.ts +6 -0
- package/dist/cli/schemas/updateConfig.d.ts.map +1 -0
- package/dist/cli/schemas/updateConfig.js +5 -0
- package/dist/common/Consts.d.ts +5 -0
- package/dist/common/Consts.d.ts.map +1 -1
- package/dist/common/Consts.js +9 -2
- package/dist/common/LoggerMessages.js +1 -1
- package/dist/common/TRawOptions.d.ts +4 -36
- package/dist/common/TRawOptions.d.ts.map +1 -1
- package/dist/common/Validation/formatZodError.d.ts +10 -0
- package/dist/common/Validation/formatZodError.d.ts.map +1 -0
- package/dist/common/Validation/formatZodError.js +114 -0
- package/dist/common/Validation/index.d.ts +3 -0
- package/dist/common/Validation/index.d.ts.map +1 -0
- package/dist/common/Validation/index.js +18 -0
- package/dist/common/Validation/validateZodOptions.d.ts +27 -0
- package/dist/common/Validation/validateZodOptions.d.ts.map +1 -0
- package/dist/common/Validation/validateZodOptions.js +35 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.js +10 -4
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts +6 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.js +8 -8
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts +28 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.js +25 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts +37 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.js +37 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts +38 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.js +34 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts +40 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.js +36 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts +65 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts.map +1 -0
- package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.js +31 -0
- package/dist/common/VersionedSchema/CommonSchemas.d.ts +53 -29
- package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/CommonSchemas.js +44 -62
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsMigrationPlan.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsMigrationPlan.js +9 -16
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +25 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.js +34 -17
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts +25 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.js +28 -19
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts +25 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.js +29 -2
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +25 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.js +30 -14
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +23 -5
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.js +33 -18
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts +3 -2
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.js +18 -11
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsMigrationPlans.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsMigrationPlans.js +2 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +22 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.js +30 -12
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts +22 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.js +27 -13
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts +22 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.js +28 -2
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +22 -5
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.js +31 -12
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts +3 -2
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.js +15 -9
- package/dist/common/VersionedSchema/Types.d.ts +5 -5
- package/dist/common/VersionedSchema/Types.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts +16 -0
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +85 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.d.ts +2 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.js +23 -0
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.d.ts +2 -0
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.js +75 -0
- package/dist/common/VersionedSchema/Utils/buildVersionedSchema.d.ts +12 -0
- package/dist/common/VersionedSchema/Utils/buildVersionedSchema.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/buildVersionedSchema.js +13 -0
- package/dist/common/VersionedSchema/Utils/compareShapes.d.ts +16 -0
- package/dist/common/VersionedSchema/Utils/compareShapes.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/compareShapes.js +30 -0
- package/dist/common/VersionedSchema/Utils/createFieldTransformationMigration.d.ts +32 -0
- package/dist/common/VersionedSchema/Utils/createFieldTransformationMigration.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/createFieldTransformationMigration.js +40 -0
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts +2 -1
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.js +5 -5
- package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts +2 -2
- package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.js +15 -7
- package/dist/common/VersionedSchema/Utils/getLatestVersionFromMigrationPlans.d.ts +16 -0
- package/dist/common/VersionedSchema/Utils/getLatestVersionFromMigrationPlans.d.ts.map +1 -0
- package/dist/common/VersionedSchema/Utils/getLatestVersionFromMigrationPlans.js +23 -0
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts +2 -2
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.js +16 -3
- package/dist/common/VersionedSchema/Utils/getUniqueObjectKeys.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/getUniqueObjectKeys.js +19 -2
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts +2 -1
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts.map +1 -1
- package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.js +10 -9
- package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.d.ts +4 -0
- package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.d.ts.map +1 -0
- package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.js +43 -0
- package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.d.ts +4 -0
- package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.d.ts.map +1 -0
- package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.js +21 -0
- package/dist/common/defaultOptions.d.ts.map +1 -1
- package/dist/common/defaultOptions.js +2 -1
- package/dist/common/utils/__tests__/convertArrayToObject.test.js +5 -6
- package/dist/common/utils/convertArrayToObject.d.ts.map +1 -1
- package/dist/common/utils/convertArrayToObject.js +1 -2
- package/dist/common/utils/fileSystemHelpers.d.ts +3 -1
- package/dist/common/utils/fileSystemHelpers.d.ts.map +1 -1
- package/dist/common/utils/fileSystemHelpers.js +3 -0
- package/dist/core/Context.d.ts +25 -2
- package/dist/core/Context.d.ts.map +1 -1
- package/dist/core/Context.js +144 -4
- package/dist/core/OpenApiClient.d.ts.map +1 -1
- package/dist/core/OpenApiClient.js +54 -13
- package/dist/core/WriteClient.d.ts +6 -13
- package/dist/core/WriteClient.d.ts.map +1 -1
- package/dist/core/WriteClient.js +32 -22
- package/dist/core/__tests__/WriteClient.test.js +7 -2
- package/dist/core/api/v2/Parser.d.ts +1 -1
- package/dist/core/api/v2/Parser.d.ts.map +1 -1
- package/dist/core/api/v2/Parser.js +2 -2
- package/dist/core/api/v2/parser/getModel.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getModel.js +2 -5
- package/dist/core/api/v2/parser/getModelProperties.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getModelProperties.js +1 -3
- package/dist/core/api/v2/parser/getModels.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getModels.js +2 -4
- package/dist/core/api/v2/parser/getOperationParameter.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getOperationParameter.js +2 -5
- package/dist/core/api/v2/parser/getOperationParameters.js +1 -1
- package/dist/core/api/v2/parser/getOperationResponse.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getOperationResponse.js +1 -3
- package/dist/core/api/v2/parser/getOperationResponses.js +1 -1
- package/dist/core/api/v2/parser/getServices.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getServices.js +4 -3
- package/dist/core/api/v2/parser/getType.d.ts.map +1 -1
- package/dist/core/api/v2/parser/getType.js +16 -9
- package/dist/core/api/v3/Parser.d.ts +1 -1
- package/dist/core/api/v3/Parser.d.ts.map +1 -1
- package/dist/core/api/v3/Parser.js +2 -2
- package/dist/core/api/v3/parser/getModel.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getModel.js +2 -5
- package/dist/core/api/v3/parser/getModelProperties.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getModelProperties.js +1 -3
- package/dist/core/api/v3/parser/getModels.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getModels.js +2 -4
- package/dist/core/api/v3/parser/getOperation.js +1 -1
- package/dist/core/api/v3/parser/getOperationParameter.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getOperationParameter.js +2 -5
- package/dist/core/api/v3/parser/getOperationParameters.js +1 -1
- package/dist/core/api/v3/parser/getOperationRequestBody.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getOperationRequestBody.js +1 -3
- package/dist/core/api/v3/parser/getOperationResponse.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getOperationResponse.js +1 -3
- package/dist/core/api/v3/parser/getOperationResponses.js +1 -1
- package/dist/core/api/v3/parser/getServices.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getServices.js +4 -3
- package/dist/core/api/v3/parser/getType.d.ts.map +1 -1
- package/dist/core/api/v3/parser/getType.js +16 -9
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -0
- package/dist/core/types/base/ClientArtifacts.model.d.ts +1 -1
- package/dist/core/types/base/ClientArtifacts.model.d.ts.map +1 -1
- package/dist/core/types/base/SimpleClientArtifacts.model.d.ts +1 -1
- package/dist/core/types/base/SimpleClientArtifacts.model.d.ts.map +1 -1
- package/dist/core/types/base/Templates.model.d.ts +32 -0
- package/dist/core/types/base/Templates.model.d.ts.map +1 -0
- package/dist/core/types/enums/ValidationLibrary.enum.d.ts +8 -0
- package/dist/core/types/enums/ValidationLibrary.enum.d.ts.map +1 -0
- package/dist/core/types/enums/ValidationLibrary.enum.js +11 -0
- package/dist/core/utils/__mocks__/templates.d.ts +1 -1
- package/dist/core/utils/__mocks__/templates.d.ts.map +1 -1
- package/dist/core/utils/__mocks__/templates.js +5 -1
- package/dist/core/utils/__tests__/getRelativeModelPath.test.js +9 -3
- package/dist/core/utils/__tests__/isSubdirectory.test.js +2 -2
- package/dist/core/utils/__tests__/modelHelpers.test.d.ts +2 -0
- package/dist/core/utils/__tests__/modelHelpers.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/modelHelpers.test.js +151 -0
- package/dist/core/utils/__tests__/postProcessModelImports.test.d.ts +2 -0
- package/dist/core/utils/__tests__/postProcessModelImports.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/postProcessModelImports.test.js +67 -0
- package/dist/core/utils/__tests__/postProcessServiceImports.test.d.ts +2 -0
- package/dist/core/utils/__tests__/postProcessServiceImports.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/postProcessServiceImports.test.js +26 -0
- package/dist/core/utils/__tests__/registerHandlebarTemplates.test.js +2 -0
- package/dist/core/utils/__tests__/resolveRefPath.test.d.ts +2 -0
- package/dist/core/utils/__tests__/resolveRefPath.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/resolveRefPath.test.js +22 -0
- package/dist/core/utils/__tests__/serviceHelpers.test.d.ts +2 -0
- package/dist/core/utils/__tests__/serviceHelpers.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/serviceHelpers.test.js +121 -0
- package/dist/core/utils/__tests__/writeClientExecutor.test.d.ts +2 -0
- package/dist/core/utils/__tests__/writeClientExecutor.test.d.ts.map +1 -0
- package/dist/core/utils/__tests__/writeClientExecutor.test.js +20 -0
- package/dist/core/utils/__tests__/writeClientSchemas.test.js +2 -0
- package/dist/core/utils/getOpenApiSpec.d.ts +0 -6
- package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
- package/dist/core/utils/getOpenApiSpec.js +26 -23
- package/dist/core/utils/modelHelpers.d.ts.map +1 -1
- package/dist/core/utils/modelHelpers.js +37 -3
- package/dist/core/utils/postProcessModelImports.d.ts.map +1 -1
- package/dist/core/utils/postProcessModelImports.js +14 -1
- package/dist/core/utils/postProcessServiceImports.d.ts.map +1 -1
- package/dist/core/utils/postProcessServiceImports.js +1 -2
- package/dist/core/utils/precompileTemplates.js +7 -0
- package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarHelpers.js +85 -0
- package/dist/core/utils/registerHandlebarTemplates.d.ts +3 -27
- package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
- package/dist/core/utils/registerHandlebarTemplates.js +97 -6
- package/dist/core/utils/resolveRefPath.d.ts.map +1 -1
- package/dist/core/utils/resolveRefPath.js +1 -4
- package/dist/core/utils/serviceHelpers.d.ts.map +1 -1
- package/dist/core/utils/serviceHelpers.js +32 -6
- package/dist/core/utils/stripNamespace.js +1 -1
- package/dist/core/utils/validateRawOptions.d.ts +3 -0
- package/dist/core/utils/validateRawOptions.d.ts.map +1 -0
- package/dist/core/utils/validateRawOptions.js +15 -0
- package/dist/core/utils/writeClientCore.d.ts +1 -1
- package/dist/core/utils/writeClientCore.d.ts.map +1 -1
- package/dist/core/utils/writeClientCore.js +7 -4
- package/dist/core/utils/writeClientCoreIndex.d.ts +1 -1
- package/dist/core/utils/writeClientCoreIndex.d.ts.map +1 -1
- package/dist/core/utils/writeClientExecutor.d.ts +13 -0
- package/dist/core/utils/writeClientExecutor.d.ts.map +1 -0
- package/dist/core/utils/writeClientExecutor.js +30 -0
- package/dist/core/utils/writeClientFullIndex.d.ts.map +1 -1
- package/dist/core/utils/writeClientFullIndex.js +1 -1
- package/dist/core/utils/writeClientModels.d.ts +1 -1
- package/dist/core/utils/writeClientModels.d.ts.map +1 -1
- package/dist/core/utils/writeClientModelsIndex.d.ts +1 -1
- package/dist/core/utils/writeClientModelsIndex.d.ts.map +1 -1
- package/dist/core/utils/writeClientSchemas.d.ts +3 -1
- package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
- package/dist/core/utils/writeClientSchemas.js +23 -20
- package/dist/core/utils/writeClientSchemasIndex.d.ts +1 -1
- package/dist/core/utils/writeClientSchemasIndex.d.ts.map +1 -1
- package/dist/core/utils/writeClientServices.d.ts +1 -1
- package/dist/core/utils/writeClientServices.d.ts.map +1 -1
- package/dist/core/utils/writeClientServicesIndex.d.ts +1 -1
- package/dist/core/utils/writeClientServicesIndex.d.ts.map +1 -1
- package/dist/core/utils/writeClientSimpleIndex.d.ts.map +1 -1
- package/dist/core/utils/writeClientSimpleIndex.js +1 -1
- package/dist/templatesCompiled/cli/customRequest.d.ts +11 -0
- package/dist/templatesCompiled/cli/customRequest.d.ts.map +1 -0
- package/dist/templatesCompiled/cli/customRequest.js +27 -0
- package/dist/templatesCompiled/cli/customRequestExecutor.d.ts +11 -0
- package/dist/templatesCompiled/cli/customRequestExecutor.d.ts.map +1 -0
- package/dist/templatesCompiled/cli/customRequestExecutor.js +27 -0
- package/dist/templatesCompiled/cli/openApiConfig.d.ts +2 -1
- package/dist/templatesCompiled/cli/openApiConfig.d.ts.map +1 -1
- package/dist/templatesCompiled/cli/openApiConfig.js +76 -4
- package/dist/templatesCompiled/client/core/ApiError.js +1 -1
- package/dist/templatesCompiled/client/core/CancelablePromise.d.ts +1 -0
- package/dist/templatesCompiled/client/core/CancelablePromise.d.ts.map +1 -1
- package/dist/templatesCompiled/client/core/CancelablePromise.js +9 -2
- package/dist/templatesCompiled/client/core/HttpStatusCode.d.ts +1 -0
- package/dist/templatesCompiled/client/core/HttpStatusCode.d.ts.map +1 -1
- package/dist/templatesCompiled/client/core/HttpStatusCode.js +9 -2
- package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.d.ts +12 -0
- package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.js +32 -0
- package/dist/templatesCompiled/client/core/{legacy-request-adapter.d.ts → executor/requestExecutor.d.ts} +1 -1
- package/dist/templatesCompiled/client/core/executor/requestExecutor.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/executor/requestExecutor.js +18 -0
- package/dist/templatesCompiled/client/core/functions/catchErrors.js +1 -1
- package/dist/templatesCompiled/client/core/interceptors/apiErrorInterceptor.d.ts +8 -0
- package/dist/templatesCompiled/client/core/interceptors/apiErrorInterceptor.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/interceptors/apiErrorInterceptor.js +18 -0
- package/dist/templatesCompiled/client/core/{request-executor.d.ts → interceptors/interceptors.d.ts} +2 -1
- package/dist/templatesCompiled/client/core/interceptors/interceptors.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/interceptors/interceptors.js +18 -0
- package/dist/templatesCompiled/client/core/interceptors/withInterceptors.d.ts +8 -0
- package/dist/templatesCompiled/client/core/interceptors/withInterceptors.d.ts.map +1 -0
- package/dist/templatesCompiled/client/core/interceptors/withInterceptors.js +18 -0
- package/dist/templatesCompiled/client/exportClient.d.ts +10 -0
- package/dist/templatesCompiled/client/exportClient.d.ts.map +1 -0
- package/dist/templatesCompiled/client/exportClient.js +53 -0
- package/dist/templatesCompiled/client/exportService.js +1 -1
- package/dist/templatesCompiled/client/indexCore.js +2 -2
- package/dist/templatesCompiled/client/indexFull.d.ts +13 -9
- package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -1
- package/dist/templatesCompiled/client/indexFull.js +72 -46
- package/dist/templatesCompiled/client/indexSimple.d.ts +1 -0
- package/dist/templatesCompiled/client/indexSimple.d.ts.map +1 -1
- package/dist/templatesCompiled/client/indexSimple.js +5 -1
- package/dist/templatesCompiled/client/joi/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/joi/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/exportSchema.js +71 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchema.js +129 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaArray.d.ts +16 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaArray.js +84 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.d.ts +18 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.js +96 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaDictionary.d.ts +14 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaDictionary.js +72 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaEnum.d.ts +14 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaEnum.js +74 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.d.ts +35 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaGeneric.js +201 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts +14 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.js +50 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/joi/partials/joiSchemaReference.js +25 -0
- package/dist/templatesCompiled/client/jsonschema/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/jsonschema/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/exportSchema.js +69 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.js +129 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.d.ts +16 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.js +74 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.d.ts +16 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.js +84 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.d.ts +13 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.js +56 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum.d.ts +12 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaEnum.js +49 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaGeneric.d.ts +29 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaGeneric.js +175 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts +15 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.js +63 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaReference.js +25 -0
- package/dist/templatesCompiled/client/partials/exportComposition.d.ts +2 -0
- package/dist/templatesCompiled/client/partials/exportComposition.d.ts.map +1 -1
- package/dist/templatesCompiled/client/partials/exportComposition.js +17 -9
- package/dist/templatesCompiled/client/partials/parameters.js +1 -1
- package/dist/templatesCompiled/client/partials/serviceOption.d.ts +2 -4
- package/dist/templatesCompiled/client/partials/serviceOption.d.ts.map +1 -1
- package/dist/templatesCompiled/client/partials/serviceOption.js +32 -46
- package/dist/templatesCompiled/client/yup/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/yup/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/exportSchema.js +73 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchema.js +129 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaArray.d.ts +16 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaArray.js +84 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.d.ts +18 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.js +96 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaDictionary.d.ts +14 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaDictionary.js +72 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaEnum.d.ts +14 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaEnum.js +74 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.d.ts +34 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaGeneric.js +201 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts +14 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.js +50 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/yup/partials/yupSchemaReference.js +25 -0
- package/dist/templatesCompiled/client/zod/exportSchema.d.ts +11 -0
- package/dist/templatesCompiled/client/zod/exportSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/exportSchema.js +67 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchema.d.ts +22 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchema.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchema.js +129 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts +14 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.js +65 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts +15 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.js +70 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts +12 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.js +53 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaEnum.d.ts +15 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaEnum.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaEnum.js +86 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.d.ts +34 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaGeneric.js +193 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts +14 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.js +50 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaReference.d.ts +9 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaReference.d.ts.map +1 -0
- package/dist/templatesCompiled/client/zod/partials/zodSchemaReference.js +25 -0
- package/package.json +9 -4
- package/dist/cli/generate/runGenerateOpenApi.d.ts.map +0 -1
- package/dist/cli/initOpenApiConfig/Enums.d.ts +0 -5
- package/dist/cli/initOpenApiConfig/Enums.d.ts.map +0 -1
- package/dist/cli/initOpenApiConfig/Enums.js +0 -8
- package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts +0 -3
- package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts.map +0 -1
- package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.js +0 -70
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsMigrationPlan.d.ts +0 -3
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsMigrationPlan.d.ts.map +0 -1
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsMigrationPlan.js +0 -28
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsSchemaV1.d.ts +0 -7
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsSchemaV1.d.ts.map +0 -1
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsSchemaV1.js +0 -42
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsVersionedSchemas.d.ts +0 -3
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsVersionedSchemas.d.ts.map +0 -1
- package/dist/common/VersionedSchema/UnifiedOptionsVersioned/UnifiedOptionsVersionedSchemas.js +0 -10
- package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.d.ts +0 -6
- package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.js +0 -7
- package/dist/common/VersionedSchema/Utils/joiHandlers.d.ts +0 -6
- package/dist/common/VersionedSchema/Utils/joiHandlers.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/joiHandlers.js +0 -59
- package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.d.ts +0 -3
- package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.js +0 -12
- package/dist/common/VersionedSchema/Utils/traverseObjectStructure.d.ts +0 -3
- package/dist/common/VersionedSchema/Utils/traverseObjectStructure.d.ts.map +0 -1
- package/dist/common/VersionedSchema/Utils/traverseObjectStructure.js +0 -31
- package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts +0 -19
- package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts.map +0 -1
- package/dist/common/utils/__tests__/__mock__/mockJoiSchema.js +0 -14
- package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts +0 -2
- package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.js +0 -38
- package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts +0 -2
- package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.js +0 -20
- package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts +0 -2
- package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/mergeObjectSchemas.test.js +0 -35
- package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts +0 -2
- package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/migrationForMultiOptions.test.js +0 -112
- package/dist/common/utils/__tests__/migrationForOptions.test.d.ts +0 -2
- package/dist/common/utils/__tests__/migrationForOptions.test.d.ts.map +0 -1
- package/dist/common/utils/__tests__/migrationForOptions.test.js +0 -56
- package/dist/core/types/base/RefWithtype.model.d.ts +0 -11
- package/dist/core/types/base/RefWithtype.model.d.ts.map +0 -1
- package/dist/core/types/enums/TypeRef.enum.d.ts +0 -8
- package/dist/core/types/enums/TypeRef.enum.d.ts.map +0 -1
- package/dist/core/types/enums/TypeRef.enum.js +0 -11
- package/dist/core/utils/__tests__/getGatheringRefs.test.d.ts +0 -2
- package/dist/core/utils/__tests__/getGatheringRefs.test.d.ts.map +0 -1
- package/dist/core/utils/__tests__/getGatheringRefs.test.js +0 -26
- package/dist/core/utils/__tests__/getRefFromSchema.test.d.ts +0 -2
- package/dist/core/utils/__tests__/getRefFromSchema.test.d.ts.map +0 -1
- package/dist/core/utils/__tests__/getRefFromSchema.test.js +0 -167
- package/dist/core/utils/__tests__/refResolver.test.d.ts +0 -2
- package/dist/core/utils/__tests__/refResolver.test.d.ts.map +0 -1
- package/dist/core/utils/__tests__/refResolver.test.js +0 -55
- package/dist/core/utils/__tests__/resolveRefToImportPath.test.d.ts +0 -2
- package/dist/core/utils/__tests__/resolveRefToImportPath.test.d.ts.map +0 -1
- package/dist/core/utils/__tests__/resolveRefToImportPath.test.js +0 -376
- package/dist/core/utils/advancedDeduplicatePath.d.ts +0 -5
- package/dist/core/utils/advancedDeduplicatePath.d.ts.map +0 -1
- package/dist/core/utils/advancedDeduplicatePath.js +0 -29
- package/dist/core/utils/findCommonParent.d.ts +0 -7
- package/dist/core/utils/findCommonParent.d.ts.map +0 -1
- package/dist/core/utils/findCommonParent.js +0 -20
- package/dist/core/utils/getGatheringRefs.d.ts +0 -4
- package/dist/core/utils/getGatheringRefs.d.ts.map +0 -1
- package/dist/core/utils/getGatheringRefs.js +0 -68
- package/dist/core/utils/getRefFromSchema.d.ts +0 -3
- package/dist/core/utils/getRefFromSchema.d.ts.map +0 -1
- package/dist/core/utils/getRefFromSchema.js +0 -9
- package/dist/core/utils/isBoolean.d.ts +0 -2
- package/dist/core/utils/isBoolean.d.ts.map +0 -1
- package/dist/core/utils/isBoolean.js +0 -12
- package/dist/core/utils/isFileName.d.ts +0 -7
- package/dist/core/utils/isFileName.d.ts.map +0 -1
- package/dist/core/utils/isFileName.js +0 -30
- package/dist/core/utils/mapPathToTargetDirSafe.d.ts +0 -10
- package/dist/core/utils/mapPathToTargetDirSafe.d.ts.map +0 -1
- package/dist/core/utils/mapPathToTargetDirSafe.js +0 -48
- package/dist/core/utils/normalizeAllRefs.d.ts +0 -6
- package/dist/core/utils/normalizeAllRefs.d.ts.map +0 -1
- package/dist/core/utils/normalizeAllRefs.js +0 -35
- package/dist/core/utils/resolveRefToImportPath.d.ts +0 -13
- package/dist/core/utils/resolveRefToImportPath.d.ts.map +0 -1
- package/dist/core/utils/resolveRefToImportPath.js +0 -105
- package/dist/templatesCompiled/client/core/legacy-request-adapter.d.ts.map +0 -1
- package/dist/templatesCompiled/client/core/legacy-request-adapter.js +0 -18
- package/dist/templatesCompiled/client/core/request-executor.d.ts.map +0 -1
- package/dist/templatesCompiled/client/core/request-executor.js +0 -11
- /package/dist/core/types/base/{RefWithtype.model.js → Templates.model.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export type CompatibilityIssue = {
|
|
3
|
+
type: 'removed';
|
|
4
|
+
key: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: 'added';
|
|
7
|
+
key: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'type-changed';
|
|
10
|
+
key: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'optional-to-required';
|
|
13
|
+
key: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function compareShapes(prev: z.ZodObject<any>, next: z.ZodObject<any>): CompatibilityIssue[];
|
|
16
|
+
//# sourceMappingURL=compareShapes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareShapes.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/compareShapes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,kBAAkB,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3L,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,kBAAkB,EAAE,CAiClG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.compareShapes = compareShapes;
|
|
4
|
+
function compareShapes(prev, next) {
|
|
5
|
+
const prevShape = prev.shape;
|
|
6
|
+
const nextShape = next.shape;
|
|
7
|
+
const issues = [];
|
|
8
|
+
// removed / changed / optional → required
|
|
9
|
+
for (const key of Object.keys(prevShape)) {
|
|
10
|
+
if (!(key in nextShape)) {
|
|
11
|
+
issues.push({ type: 'removed', key });
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
const prevField = prevShape[key];
|
|
15
|
+
const nextField = nextShape[key];
|
|
16
|
+
if (prevField._def.typeName !== nextField._def.typeName) {
|
|
17
|
+
issues.push({ type: 'type-changed', key });
|
|
18
|
+
}
|
|
19
|
+
if (prevField.isOptional() && !nextField.isOptional()) {
|
|
20
|
+
issues.push({ type: 'optional-to-required', key });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
// added
|
|
24
|
+
for (const key of Object.keys(nextShape)) {
|
|
25
|
+
if (!(key in prevShape)) {
|
|
26
|
+
issues.push({ type: 'added', key });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return issues;
|
|
30
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SchemaMigrationPlan } from '../Types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a migration plan that transforms fields using a custom migration function.
|
|
4
|
+
* Use this for migrations that require field renaming, restructuring, or complex transformations
|
|
5
|
+
* that cannot be handled by createDefaultFieldsMigration or createTrivialMigration.
|
|
6
|
+
*
|
|
7
|
+
* @param fromVersion - Source version
|
|
8
|
+
* @param toVersion - Target version
|
|
9
|
+
* @param migrate - Custom migration function that transforms the data
|
|
10
|
+
* @param description - Optional description of what this migration does
|
|
11
|
+
* @returns A migration plan with the custom transformation
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Rename field: client -> httpClient
|
|
16
|
+
* createFieldTransformationMigration('v1', 'v2',
|
|
17
|
+
* ({ client, ...otherProps }) => ({ ...otherProps, httpClient: client }),
|
|
18
|
+
* 'Renames client field to httpClient'
|
|
19
|
+
* )
|
|
20
|
+
*
|
|
21
|
+
* // Transform items array
|
|
22
|
+
* createFieldTransformationMigration('v3', 'v4',
|
|
23
|
+
* ({ items, input, output, ...otherProps }) => ({
|
|
24
|
+
* ...otherProps,
|
|
25
|
+
* items: items.map(el => ({ ...el, input, output }))
|
|
26
|
+
* }),
|
|
27
|
+
* 'Moves input/output fields into each item'
|
|
28
|
+
* )
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function createFieldTransformationMigration<From extends Record<string, any>, To extends Record<string, any>>(fromVersion: string, toVersion: string, migrate: (input: From) => To, description?: string): SchemaMigrationPlan<From, To>;
|
|
32
|
+
//# sourceMappingURL=createFieldTransformationMigration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFieldTransformationMigration.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/createFieldTransformationMigration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kCAAkC,CAAC,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC/G,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,EAAE,EAC5B,WAAW,CAAC,EAAE,MAAM,GACrB,mBAAmB,CAAC,IAAI,EAAE,EAAE,CAAC,CAO/B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createFieldTransformationMigration = createFieldTransformationMigration;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a migration plan that transforms fields using a custom migration function.
|
|
6
|
+
* Use this for migrations that require field renaming, restructuring, or complex transformations
|
|
7
|
+
* that cannot be handled by createDefaultFieldsMigration or createTrivialMigration.
|
|
8
|
+
*
|
|
9
|
+
* @param fromVersion - Source version
|
|
10
|
+
* @param toVersion - Target version
|
|
11
|
+
* @param migrate - Custom migration function that transforms the data
|
|
12
|
+
* @param description - Optional description of what this migration does
|
|
13
|
+
* @returns A migration plan with the custom transformation
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* // Rename field: client -> httpClient
|
|
18
|
+
* createFieldTransformationMigration('v1', 'v2',
|
|
19
|
+
* ({ client, ...otherProps }) => ({ ...otherProps, httpClient: client }),
|
|
20
|
+
* 'Renames client field to httpClient'
|
|
21
|
+
* )
|
|
22
|
+
*
|
|
23
|
+
* // Transform items array
|
|
24
|
+
* createFieldTransformationMigration('v3', 'v4',
|
|
25
|
+
* ({ items, input, output, ...otherProps }) => ({
|
|
26
|
+
* ...otherProps,
|
|
27
|
+
* items: items.map(el => ({ ...el, input, output }))
|
|
28
|
+
* }),
|
|
29
|
+
* 'Moves input/output fields into each item'
|
|
30
|
+
* )
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
function createFieldTransformationMigration(fromVersion, toVersion, migrate, description) {
|
|
34
|
+
return {
|
|
35
|
+
fromVersion,
|
|
36
|
+
toVersion,
|
|
37
|
+
migrate,
|
|
38
|
+
description: description || `Custom field transformation migration from ${fromVersion} to ${toVersion}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { VersionedSchema, VersionMatchResult } from '../Types';
|
|
2
|
-
export declare function determineBestMatchingSchemaVersion(inputData: Record<string, any>, versionedSchemas: VersionedSchema<
|
|
3
|
+
export declare function determineBestMatchingSchemaVersion(inputData: Record<string, any>, versionedSchemas: VersionedSchema<z.ZodTypeAny>[]): VersionMatchResult;
|
|
3
4
|
//# sourceMappingURL=determineBestMatchingSchemaVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"determineBestMatchingSchemaVersion.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"determineBestMatchingSchemaVersion.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAK/D,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,kBAAkB,CA4CxJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.determineBestMatchingSchemaVersion = determineBestMatchingSchemaVersion;
|
|
4
|
-
const
|
|
4
|
+
const validateZodOptions_1 = require("../../Validation/validateZodOptions");
|
|
5
5
|
const getUniqueKeysFromSchemas_1 = require("./getUniqueKeysFromSchemas");
|
|
6
6
|
const getUniqueObjectKeys_1 = require("./getUniqueObjectKeys");
|
|
7
7
|
// Determining the most appropriate schema version
|
|
@@ -12,8 +12,8 @@ function determineBestMatchingSchemaVersion(inputData, versionedSchemas) {
|
|
|
12
12
|
const inputKeys = (0, getUniqueObjectKeys_1.getUniqueObjectKeys)(inputData);
|
|
13
13
|
const matchingSchemas = versionedSchemas
|
|
14
14
|
.map(({ schema, version }, idx) => {
|
|
15
|
-
const
|
|
16
|
-
const errorFields =
|
|
15
|
+
const validationResult = (0, validateZodOptions_1.validateZodOptionsRaw)(schema, inputData);
|
|
16
|
+
const errorFields = !validationResult.success ? validationResult.error.issues.filter(err => err.code !== 'invalid_value') : [];
|
|
17
17
|
return errorFields.length === 0 ? { version, index: idx } : null;
|
|
18
18
|
})
|
|
19
19
|
.filter((match) => match !== null);
|
|
@@ -27,8 +27,8 @@ function determineBestMatchingSchemaVersion(inputData, versionedSchemas) {
|
|
|
27
27
|
}
|
|
28
28
|
const schemaMatches = versionedSchemas.map(({ schema, version }, idx) => {
|
|
29
29
|
const schemaKeys = (0, getUniqueKeysFromSchemas_1.getUniqueKeysFromSchemas)([schema]);
|
|
30
|
-
const
|
|
31
|
-
const errorFields =
|
|
30
|
+
const validationResult = (0, validateZodOptions_1.validateZodOptionsRaw)(schema, inputData);
|
|
31
|
+
const errorFields = !validationResult.success ? validationResult.error.issues.filter(err => err.code !== 'invalid_value') : [];
|
|
32
32
|
const matchingKeys = inputKeys.filter(key => schemaKeys.has(key));
|
|
33
33
|
return { index: idx, version, errorFields, matchingKeys };
|
|
34
34
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare function getCurrentErrorMessage(error:
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare function getCurrentErrorMessage(error: z.ZodError, replaicingKeysMap: Map<string, string>): void;
|
|
3
3
|
//# sourceMappingURL=getCurrentErrorMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCurrentErrorMessage.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getCurrentErrorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getCurrentErrorMessage.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getCurrentErrorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,QAqB/F"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCurrentErrorMessage = getCurrentErrorMessage;
|
|
4
|
-
const
|
|
4
|
+
const formatZodError_1 = require("../../Validation/formatZodError");
|
|
5
5
|
const getKeyByMapValue_1 = require("./getKeyByMapValue");
|
|
6
6
|
function getCurrentErrorMessage(error, replaicingKeysMap) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let currentMessage = error.message;
|
|
10
|
-
if (reverseKey) {
|
|
11
|
-
currentMessage = error.message.replace(path, reverseKey);
|
|
7
|
+
if (!error || error.issues.length === 0) {
|
|
8
|
+
return;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
const messages = new Set();
|
|
11
|
+
error.issues.forEach(issue => {
|
|
12
|
+
const path = (0, formatZodError_1.formatZodPath)(issue.path);
|
|
13
|
+
const reverseKey = (0, getKeyByMapValue_1.getKeyByMapValue)(replaicingKeysMap, path);
|
|
14
|
+
let currentMessage = issue.message;
|
|
15
|
+
if (reverseKey) {
|
|
16
|
+
currentMessage = error.message.replace(path, reverseKey);
|
|
17
|
+
}
|
|
18
|
+
messages.add(currentMessage);
|
|
19
|
+
});
|
|
20
|
+
const result = Array.from(messages.values());
|
|
21
|
+
throw new Error(result.join('\n'));
|
|
14
22
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SchemaMigrationPlan } from '../Types';
|
|
2
|
+
/**
|
|
3
|
+
* Gets the latest version from a migration plans array.
|
|
4
|
+
* Returns the `toVersion` of the last migration plan in the array.
|
|
5
|
+
*
|
|
6
|
+
* @param migrationPlans - Array of migration plans
|
|
7
|
+
* @returns The latest version string (e.g., 'v4')
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const latestVersion = getLatestVersionFromMigrationPlans(optionsMigrationPlans);
|
|
12
|
+
* // Returns 'v4'
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare function getLatestVersionFromMigrationPlans(migrationPlans: SchemaMigrationPlan<Record<string, any>, Record<string, any>>[]): string;
|
|
16
|
+
//# sourceMappingURL=getLatestVersionFromMigrationPlans.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLatestVersionFromMigrationPlans.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getLatestVersionFromMigrationPlans.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,wBAAgB,kCAAkC,CAC9C,cAAc,EAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,GAChF,MAAM,CAOR"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLatestVersionFromMigrationPlans = getLatestVersionFromMigrationPlans;
|
|
4
|
+
/**
|
|
5
|
+
* Gets the latest version from a migration plans array.
|
|
6
|
+
* Returns the `toVersion` of the last migration plan in the array.
|
|
7
|
+
*
|
|
8
|
+
* @param migrationPlans - Array of migration plans
|
|
9
|
+
* @returns The latest version string (e.g., 'v4')
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const latestVersion = getLatestVersionFromMigrationPlans(optionsMigrationPlans);
|
|
14
|
+
* // Returns 'v4'
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
function getLatestVersionFromMigrationPlans(migrationPlans) {
|
|
18
|
+
if (migrationPlans.length === 0) {
|
|
19
|
+
throw new Error('Migration plans array is empty. Cannot determine latest version.');
|
|
20
|
+
}
|
|
21
|
+
const lastPlan = migrationPlans[migrationPlans.length - 1];
|
|
22
|
+
return lastPlan.toVersion;
|
|
23
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Get all the unique parameter keys of all Joi schemes in the array
|
|
4
4
|
* @param schemas array of joi schemes
|
|
5
5
|
* @returns All the unique parameter keys of all Joi schemes in the array
|
|
6
6
|
*/
|
|
7
|
-
export declare function getUniqueKeysFromSchemas(schemas:
|
|
7
|
+
export declare function getUniqueKeysFromSchemas(schemas: z.ZodTypeAny[]): Set<string>;
|
|
8
8
|
//# sourceMappingURL=getUniqueKeysFromSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUniqueKeysFromSchemas.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getUniqueKeysFromSchemas.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQ7E"}
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getUniqueKeysFromSchemas = getUniqueKeysFromSchemas;
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
function collectKeys(schema, result) {
|
|
6
|
+
if (!(schema instanceof zod_1.z.ZodObject)) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
const shape = schema.shape;
|
|
10
|
+
for (const key of Object.keys(shape)) {
|
|
11
|
+
result.add(key);
|
|
12
|
+
const fieldSchema = shape[key];
|
|
13
|
+
// если поле — вложенный объект, идём глубже
|
|
14
|
+
if (fieldSchema instanceof zod_1.z.ZodObject) {
|
|
15
|
+
collectKeys(fieldSchema, result);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
6
19
|
/**
|
|
7
20
|
* Get all the unique parameter keys of all Joi schemes in the array
|
|
8
21
|
* @param schemas array of joi schemes
|
|
@@ -11,7 +24,7 @@ const traverseObjectStructure_1 = require("./traverseObjectStructure");
|
|
|
11
24
|
function getUniqueKeysFromSchemas(schemas) {
|
|
12
25
|
const result = new Set();
|
|
13
26
|
for (const schema of schemas) {
|
|
14
|
-
(
|
|
27
|
+
collectKeys(schema, result);
|
|
15
28
|
}
|
|
16
29
|
return result;
|
|
17
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUniqueObjectKeys.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getUniqueObjectKeys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getUniqueObjectKeys.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/getUniqueObjectKeys.ts"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,YAKhE"}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getUniqueObjectKeys = getUniqueObjectKeys;
|
|
4
|
-
|
|
4
|
+
function collectUniqueObjectKeys(root, result) {
|
|
5
|
+
const recurse = (v) => collectUniqueObjectKeys(v, result);
|
|
6
|
+
if (root && typeof root === 'object') {
|
|
7
|
+
if (Array.isArray(root)) {
|
|
8
|
+
for (const item of root) {
|
|
9
|
+
recurse(item);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
for (const key of Object.keys(root)) {
|
|
14
|
+
if (result instanceof Set) {
|
|
15
|
+
result.add(key);
|
|
16
|
+
}
|
|
17
|
+
recurse(root[key]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
5
22
|
/**
|
|
6
23
|
* Get unique keys from object properties (set of options)
|
|
7
24
|
* @param rawInput object properties (set of options)
|
|
@@ -9,6 +26,6 @@ const traverseObjectStructure_1 = require("./traverseObjectStructure");
|
|
|
9
26
|
*/
|
|
10
27
|
function getUniqueObjectKeys(rawInput) {
|
|
11
28
|
const result = new Set();
|
|
12
|
-
(
|
|
29
|
+
collectUniqueObjectKeys(rawInput, result);
|
|
13
30
|
return Array.from(result);
|
|
14
31
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
import { EMigrationMode } from '../../Enums';
|
|
2
3
|
import { EVersionedSchemaType } from '../Enums';
|
|
3
4
|
import { SchemaMigrationPlan, VersionedSchema, VersionMatchResult } from '../Types';
|
|
4
5
|
type MigrateToLatestProps = {
|
|
5
6
|
rawInput: Record<string, any>;
|
|
6
7
|
migrationPlans: SchemaMigrationPlan<Record<string, any>, Record<string, any>>[];
|
|
7
|
-
versionedSchemas: VersionedSchema<
|
|
8
|
+
versionedSchemas: VersionedSchema<z.ZodTypeAny>[];
|
|
8
9
|
migrationMode: EMigrationMode;
|
|
9
10
|
};
|
|
10
11
|
type MigrateToLatestResult = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrateDataToLatestSchemaVersion.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"migrateDataToLatestSchemaVersion.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AASpF,KAAK,oBAAoB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,cAAc,EAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;IAChF,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC;IAClD,aAAa,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,KAAK,qBAAqB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,cAAc,EAAE,kBAAkB,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,oBAAoB,CAAC;CACpC,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,EAAE,oBAAoB,GAAG,qBAAqB,GAAG,IAAI,CAiElK"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.migrateDataToLatestSchemaVersion = migrateDataToLatestSchemaVersion;
|
|
4
4
|
const Enums_1 = require("../../Enums");
|
|
5
|
+
const validateZodOptions_1 = require("../../Validation/validateZodOptions");
|
|
5
6
|
const determineBestMatchingSchemaVersion_1 = require("./determineBestMatchingSchemaVersion");
|
|
6
7
|
const generateKeyMappingForInvalidKeys_1 = require("./generateKeyMappingForInvalidKeys");
|
|
7
8
|
const getCurrentErrorMessage_1 = require("./getCurrentErrorMessage");
|
|
@@ -23,9 +24,9 @@ function migrateDataToLatestSchemaVersion({ rawInput, migrationPlans, versionedS
|
|
|
23
24
|
const actualSchema = versionedSchemas[actualVersionIndex];
|
|
24
25
|
for (let idx = guessedVersion.lastVersionIndex; idx < versionedSchemas.length - 1; idx++) {
|
|
25
26
|
const currentVersionSchema = versionedSchemas[idx];
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
(0, getCurrentErrorMessage_1.getCurrentErrorMessage)(
|
|
27
|
+
const firstValidationResult = (0, validateZodOptions_1.validateZodOptionsRaw)(currentVersionSchema.schema, currentData);
|
|
28
|
+
if (!firstValidationResult.success) {
|
|
29
|
+
(0, getCurrentErrorMessage_1.getCurrentErrorMessage)(firstValidationResult.error, replacingKeysMap);
|
|
29
30
|
}
|
|
30
31
|
const fromVersion = currentVersionSchema.version;
|
|
31
32
|
const migrationPlan = migrationPlans.find(p => p.fromVersion === fromVersion);
|
|
@@ -37,10 +38,10 @@ function migrateDataToLatestSchemaVersion({ rawInput, migrationPlans, versionedS
|
|
|
37
38
|
}
|
|
38
39
|
const toVersion = versionedSchemas[idx + 1].version;
|
|
39
40
|
const migratedRaw = migrationPlan.migrate(currentData);
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
41
|
+
const validationResult = (0, validateZodOptions_1.validateZodOptions)(versionedSchemas[idx + 1].schema, migratedRaw);
|
|
42
|
+
if (!validationResult.success) {
|
|
42
43
|
throw new Error(`Migration from ${fromVersion} to ${toVersion} failed validation. ` +
|
|
43
|
-
`Error: ${
|
|
44
|
+
`Error: ${validationResult.errors.join('\n')}. ` +
|
|
44
45
|
`Migration description: ${migrationPlan.description || 'No description provided'}.`);
|
|
45
46
|
}
|
|
46
47
|
currentData = { ...migratedRaw };
|
|
@@ -49,9 +50,9 @@ function migrateDataToLatestSchemaVersion({ rawInput, migrationPlans, versionedS
|
|
|
49
50
|
console.warn('Для выполнения генерации OpenApi потребовалось мигрировать схему Ваших данных на актуальную. Для обновленмя конфигурации в файле используйте команду `npm name_cli_tool update-config`');
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
(0, getCurrentErrorMessage_1.getCurrentErrorMessage)(error, replacingKeysMap);
|
|
53
|
+
const validationResult = (0, validateZodOptions_1.validateZodOptionsRaw)(actualSchema.schema, currentData);
|
|
54
|
+
if (!validationResult.success) {
|
|
55
|
+
(0, getCurrentErrorMessage_1.getCurrentErrorMessage)(validationResult.error, replacingKeysMap);
|
|
55
56
|
}
|
|
56
57
|
return { value: currentData, guessedVersion, schemaVersion: actualSchema.version, schemaType: actualSchema.type };
|
|
57
58
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependentOptionsRefinement.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/refinements/dependentOptionsRefinement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,QA2C7E"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dependentOptionsRefinement = dependentOptionsRefinement;
|
|
4
|
+
function dependentOptionsRefinement(data, ctx) {
|
|
5
|
+
// Проверка: либо items, либо input+output должны быть указаны
|
|
6
|
+
const hasItems = data.items && data.items.length > 0;
|
|
7
|
+
const hasInputOutput = !!(data.input && data.output);
|
|
8
|
+
if (!hasItems && !hasInputOutput) {
|
|
9
|
+
ctx.addIssue({
|
|
10
|
+
code: 'custom',
|
|
11
|
+
message: 'Either "items" array or "input" + "output" must be provided',
|
|
12
|
+
path: [],
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
// Если есть items, то input и output в корне не должны быть указаны
|
|
16
|
+
if (hasItems && hasInputOutput) {
|
|
17
|
+
ctx.addIssue({
|
|
18
|
+
code: 'custom',
|
|
19
|
+
message: 'Cannot use both "items" array and "input"/"output" at the root level',
|
|
20
|
+
path: ['items'],
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
// Валидация: если excludeCoreServiceFiles === true, request не должен быть указан
|
|
24
|
+
if (data.excludeCoreServiceFiles === true && data.request) {
|
|
25
|
+
ctx.addIssue({
|
|
26
|
+
code: 'custom',
|
|
27
|
+
message: '"request" can only be used when "excludeCoreServiceFiles" is false',
|
|
28
|
+
path: ['request'],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// Валидация для каждого элемента в items
|
|
32
|
+
if (hasItems && data.items) {
|
|
33
|
+
data.items.forEach((item, index) => {
|
|
34
|
+
if (item.request && data.excludeCoreServiceFiles === true) {
|
|
35
|
+
ctx.addIssue({
|
|
36
|
+
code: 'custom',
|
|
37
|
+
message: '"request" in items can only be used when "excludeCoreServiceFiles" is false',
|
|
38
|
+
path: ['items', index, 'request'],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { unifiedOptionsShape } from '../AllVersionedSchemas/UnifiedBase';
|
|
3
|
+
export declare function singleOrMultiRefinement(data: z.infer<typeof unifiedOptionsShape>, ctx: z.RefinementCtx): void;
|
|
4
|
+
//# sourceMappingURL=singleOrMultiRefinement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleOrMultiRefinement.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/refinements/singleOrMultiRefinement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,QAmBtG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.singleOrMultiRefinement = singleOrMultiRefinement;
|
|
4
|
+
function singleOrMultiRefinement(data, ctx) {
|
|
5
|
+
const hasItems = !!data.items?.length;
|
|
6
|
+
const hasSingle = !!data.input;
|
|
7
|
+
if (hasItems && hasSingle) {
|
|
8
|
+
ctx.addIssue({
|
|
9
|
+
code: 'custom',
|
|
10
|
+
message: 'Use either items or input/output, but not both options.',
|
|
11
|
+
path: ['items'],
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
if (!hasItems && !hasSingle) {
|
|
15
|
+
ctx.addIssue({
|
|
16
|
+
code: 'custom',
|
|
17
|
+
message: 'You must specify either items or input/output',
|
|
18
|
+
path: ['input'],
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultOptions.d.ts","sourceRoot":"","sources":["../../src/common/defaultOptions.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"defaultOptions.d.ts","sourceRoot":"","sources":["../../src/common/defaultOptions.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,eAAO,MAAM,cAAc,uBAuBV,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.defaultOptions = void 0;
|
|
7
7
|
const joi_1 = __importDefault(require("joi"));
|
|
8
8
|
const HttpClient_enum_1 = require("../core/types/enums/HttpClient.enum");
|
|
9
|
+
const ValidationLibrary_enum_1 = require("../core/types/enums/ValidationLibrary.enum");
|
|
9
10
|
exports.defaultOptions = joi_1.default.object({
|
|
10
11
|
input: joi_1.default.string().required(),
|
|
11
12
|
output: joi_1.default.string().required(),
|
|
@@ -17,11 +18,11 @@ exports.defaultOptions = joi_1.default.object({
|
|
|
17
18
|
useOptions: joi_1.default.boolean().optional(),
|
|
18
19
|
useUnionTypes: joi_1.default.boolean().optional(),
|
|
19
20
|
excludeCoreServiceFiles: joi_1.default.boolean().optional(),
|
|
20
|
-
includeSchemasFiles: joi_1.default.boolean().optional(),
|
|
21
21
|
request: joi_1.default.string().optional(),
|
|
22
22
|
interfacePrefix: joi_1.default.string().optional(),
|
|
23
23
|
enumPrefix: joi_1.default.string().optional(),
|
|
24
24
|
typePrefix: joi_1.default.string().optional(),
|
|
25
25
|
useCancelableRequest: joi_1.default.boolean().optional(),
|
|
26
26
|
useSeparatedIndexes: joi_1.default.boolean().optional(),
|
|
27
|
+
validationLibrary: joi_1.default.string().valid(...Object.values(ValidationLibrary_enum_1.ValidationLibrary)).optional(),
|
|
27
28
|
}).unknown(false);
|
|
@@ -13,7 +13,6 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
13
13
|
const expected = {
|
|
14
14
|
items: [],
|
|
15
15
|
excludeCoreServiceFiles: undefined,
|
|
16
|
-
includeSchemasFiles: undefined,
|
|
17
16
|
request: undefined,
|
|
18
17
|
useOptions: undefined,
|
|
19
18
|
useCancelableRequest: undefined,
|
|
@@ -34,7 +33,6 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
34
33
|
enumPrefix: undefined,
|
|
35
34
|
excludeCoreServiceFiles: undefined,
|
|
36
35
|
httpClient: undefined,
|
|
37
|
-
includeSchemasFiles: undefined,
|
|
38
36
|
interfacePrefix: undefined,
|
|
39
37
|
items: [
|
|
40
38
|
{
|
|
@@ -55,6 +53,7 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
55
53
|
useOptions: true,
|
|
56
54
|
useSeparatedIndexes: undefined,
|
|
57
55
|
useUnionTypes: undefined,
|
|
56
|
+
validationLibrary: undefined
|
|
58
57
|
};
|
|
59
58
|
const result = (0, convertArrayToObject_1.convertArrayToObject)(input);
|
|
60
59
|
node_assert_1.default.deepStrictEqual(result, expected);
|
|
@@ -68,7 +67,6 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
68
67
|
enumPrefix: undefined,
|
|
69
68
|
excludeCoreServiceFiles: undefined,
|
|
70
69
|
httpClient: undefined,
|
|
71
|
-
includeSchemasFiles: undefined,
|
|
72
70
|
interfacePrefix: undefined,
|
|
73
71
|
items: [
|
|
74
72
|
{
|
|
@@ -97,6 +95,7 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
97
95
|
useOptions: true,
|
|
98
96
|
useSeparatedIndexes: undefined,
|
|
99
97
|
useUnionTypes: undefined,
|
|
98
|
+
validationLibrary: undefined
|
|
100
99
|
};
|
|
101
100
|
const result = (0, convertArrayToObject_1.convertArrayToObject)(input);
|
|
102
101
|
node_assert_1.default.deepStrictEqual(result, expected);
|
|
@@ -110,7 +109,6 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
110
109
|
enumPrefix: undefined,
|
|
111
110
|
excludeCoreServiceFiles: undefined,
|
|
112
111
|
httpClient: undefined,
|
|
113
|
-
includeSchemasFiles: undefined,
|
|
114
112
|
interfacePrefix: undefined,
|
|
115
113
|
items: [
|
|
116
114
|
{
|
|
@@ -139,6 +137,7 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
139
137
|
useOptions: true,
|
|
140
138
|
useSeparatedIndexes: undefined,
|
|
141
139
|
useUnionTypes: undefined,
|
|
140
|
+
validationLibrary: undefined
|
|
142
141
|
};
|
|
143
142
|
const result = (0, convertArrayToObject_1.convertArrayToObject)(input);
|
|
144
143
|
node_assert_1.default.deepStrictEqual(result, expected);
|
|
@@ -152,7 +151,6 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
152
151
|
enumPrefix: undefined,
|
|
153
152
|
excludeCoreServiceFiles: undefined,
|
|
154
153
|
httpClient: undefined,
|
|
155
|
-
includeSchemasFiles: undefined,
|
|
156
154
|
interfacePrefix: undefined,
|
|
157
155
|
items: [
|
|
158
156
|
{
|
|
@@ -181,6 +179,7 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
181
179
|
useOptions: undefined,
|
|
182
180
|
useSeparatedIndexes: undefined,
|
|
183
181
|
useUnionTypes: undefined,
|
|
182
|
+
validationLibrary: undefined
|
|
184
183
|
};
|
|
185
184
|
const result = (0, convertArrayToObject_1.convertArrayToObject)(input);
|
|
186
185
|
node_assert_1.default.deepStrictEqual(result, expected);
|
|
@@ -194,7 +193,6 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
194
193
|
enumPrefix: undefined,
|
|
195
194
|
excludeCoreServiceFiles: undefined,
|
|
196
195
|
httpClient: undefined,
|
|
197
|
-
includeSchemasFiles: undefined,
|
|
198
196
|
interfacePrefix: undefined,
|
|
199
197
|
items: [
|
|
200
198
|
{
|
|
@@ -223,6 +221,7 @@ const convertArrayToObject_1 = require("../convertArrayToObject");
|
|
|
223
221
|
useOptions: undefined,
|
|
224
222
|
useSeparatedIndexes: undefined,
|
|
225
223
|
useUnionTypes: undefined,
|
|
224
|
+
validationLibrary: undefined
|
|
226
225
|
};
|
|
227
226
|
const result = (0, convertArrayToObject_1.convertArrayToObject)(input);
|
|
228
227
|
node_assert_1.default.deepStrictEqual(result, expected);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertArrayToObject.d.ts","sourceRoot":"","sources":["../../../src/common/utils/convertArrayToObject.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"convertArrayToObject.d.ts","sourceRoot":"","sources":["../../../src/common/utils/convertArrayToObject.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA2DxH"}
|