@azure-tools/typespec-ts 0.13.0 → 0.13.1-alpha.20230609.1
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/CHANGELOG.md +8 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +37 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/modelUtils.d.ts +2 -0
- package/dist/src/modelUtils.d.ts.map +1 -1
- package/dist/src/modelUtils.js +82 -13
- package/dist/src/modelUtils.js.map +1 -1
- package/dist/src/modular/buildApiIndex.d.ts.map +1 -1
- package/dist/src/modular/buildApiIndex.js +1 -1
- package/dist/src/modular/buildApiIndex.js.map +1 -1
- package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
- package/dist/src/modular/buildClassicalClient.js +6 -6
- package/dist/src/modular/buildClassicalClient.js.map +1 -1
- package/dist/src/modular/buildClientContext.d.ts.map +1 -1
- package/dist/src/modular/buildClientContext.js +9 -3
- package/dist/src/modular/buildClientContext.js.map +1 -1
- package/dist/src/modular/buildCodeModel.d.ts.map +1 -1
- package/dist/src/modular/buildCodeModel.js +190 -169
- package/dist/src/modular/buildCodeModel.js.map +1 -1
- package/dist/src/modular/buildOperations.d.ts.map +1 -1
- package/dist/src/modular/buildOperations.js +20 -2
- package/dist/src/modular/buildOperations.js.map +1 -1
- package/dist/src/modular/buildRootIndex.js +2 -2
- package/dist/src/modular/buildRootIndex.js.map +1 -1
- package/dist/src/modular/buildSharedTypes.d.ts.map +1 -1
- package/dist/src/modular/buildSharedTypes.js +8 -10
- package/dist/src/modular/buildSharedTypes.js.map +1 -1
- package/dist/src/modular/emitModels.d.ts.map +1 -1
- package/dist/src/modular/emitModels.js +19 -6
- package/dist/src/modular/emitModels.js.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/clientHelpers.js +2 -11
- package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
- package/dist/src/modular/helpers/credentialHelpers.js +1 -1
- package/dist/src/modular/helpers/credentialHelpers.js.map +1 -1
- package/dist/src/modular/helpers/fixmeHelpers.d.ts +2 -0
- package/dist/src/modular/helpers/fixmeHelpers.d.ts.map +1 -0
- package/dist/src/modular/helpers/fixmeHelpers.js +4 -0
- package/dist/src/modular/helpers/fixmeHelpers.js.map +1 -0
- package/dist/src/modular/helpers/namingHelpers.d.ts +10 -1
- package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/namingHelpers.js +20 -0
- package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.d.ts +2 -0
- package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/operationHelpers.js +117 -35
- package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
- package/dist/src/modular/helpers/parameterHelpers.js +1 -1
- package/dist/src/modular/helpers/parameterHelpers.js.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
- package/dist/src/modular/helpers/typeHelpers.js +31 -12
- package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
- package/dist/src/modular/modularCodeModel.d.ts +2 -1
- package/dist/src/modular/modularCodeModel.d.ts.map +1 -1
- package/dist/src/operationUtil.d.ts +1 -1
- package/dist/src/operationUtil.d.ts.map +1 -1
- package/dist/src/operationUtil.js +21 -3
- package/dist/src/operationUtil.js.map +1 -1
- package/dist/src/transform/transform.d.ts.map +1 -1
- package/dist/src/transform/transform.js +2 -2
- package/dist/src/transform/transform.js.map +1 -1
- package/dist/src/transform/transformApiVersionInfo.js +9 -0
- package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
- package/dist/src/transform/transformHelperFunctionDetails.js +27 -1
- package/dist/src/transform/transformHelperFunctionDetails.js.map +1 -1
- package/dist/src/transform/transformParameters.d.ts +1 -0
- package/dist/src/transform/transformParameters.d.ts.map +1 -1
- package/dist/src/transform/transformParameters.js +36 -35
- package/dist/src/transform/transformParameters.js.map +1 -1
- package/dist/src/transform/transformPaths.d.ts.map +1 -1
- package/dist/src/transform/transformPaths.js +9 -0
- package/dist/src/transform/transformPaths.js.map +1 -1
- package/dist/src/transform/transformResponses.d.ts.map +1 -1
- package/dist/src/transform/transformResponses.js +10 -1
- package/dist/src/transform/transformResponses.js.map +1 -1
- package/dist/src/transform/transformSchemas.d.ts.map +1 -1
- package/dist/src/transform/transformSchemas.js +9 -0
- package/dist/src/transform/transformSchemas.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -15
- package/src/index.ts +47 -2
- package/src/modelUtils.ts +90 -15
- package/src/modular/buildApiIndex.ts +3 -1
- package/src/modular/buildClassicalClient.ts +8 -6
- package/src/modular/buildClientContext.ts +11 -3
- package/src/modular/buildCodeModel.ts +221 -196
- package/src/modular/buildOperations.ts +23 -1
- package/src/modular/buildRootIndex.ts +2 -2
- package/src/modular/buildSharedTypes.ts +8 -10
- package/src/modular/emitModels.ts +14 -0
- package/src/modular/helpers/clientHelpers.ts +3 -13
- package/src/modular/helpers/credentialHelpers.ts +1 -1
- package/src/modular/helpers/fixmeHelpers.ts +3 -0
- package/src/modular/helpers/namingHelpers.ts +35 -1
- package/src/modular/helpers/operationHelpers.ts +173 -66
- package/src/modular/helpers/parameterHelpers.ts +1 -1
- package/src/modular/helpers/typeHelpers.ts +33 -12
- package/src/modular/modularCodeModel.ts +3 -1
- package/src/operationUtil.ts +24 -3
- package/src/transform/transform.ts +4 -1
- package/src/transform/transformApiVersionInfo.ts +8 -0
- package/src/transform/transformHelperFunctionDetails.ts +25 -1
- package/src/transform/transformParameters.ts +52 -41
- package/src/transform/transformPaths.ts +8 -0
- package/src/transform/transformResponses.ts +9 -1
- package/src/transform/transformSchemas.ts +8 -0
- package/.eslintrc.json +0 -23
- package/.prettierignore +0 -1
- package/.prettierrc +0 -7
- package/.rush/temp/operation/build/all.log +0 -1
- package/.rush/temp/operation/build/state.json +0 -3
- package/.rush/temp/package-deps_build.json +0 -442
- package/.rush/temp/shrinkwrap-deps.json +0 -490
- package/CONTRIBUTING.md +0 -137
- package/test/commands/cadl-ranch-list.ts +0 -116
- package/test/commands/check-clean-tree.ts +0 -55
- package/test/commands/childProcessOnExit.ts +0 -16
- package/test/commands/gen-cadl-ranch.ts +0 -25
- package/test/commands/run.ts +0 -31
- package/test/integration/arrayItemTypes.spec.ts +0 -96
- package/test/integration/authApiKey.spec.ts +0 -38
- package/test/integration/authOauth2.spec.ts +0 -65
- package/test/integration/authUnion.spec.ts +0 -72
- package/test/integration/azurecore.spec.ts +0 -170
- package/test/integration/collectionFormat.spec.ts +0 -118
- package/test/integration/dictionary.spec.ts +0 -106
- package/test/integration/extensibleEnums.spec.ts +0 -61
- package/test/integration/fixedEnums.spec.ts +0 -52
- package/test/integration/generated/arrays/itemTypes/src/arrayItemTypesClient.ts +0 -35
- package/test/integration/generated/arrays/itemTypes/src/clientDefinitions.ts +0 -165
- package/test/integration/generated/arrays/itemTypes/src/index.ts +0 -13
- package/test/integration/generated/arrays/itemTypes/src/logger.ts +0 -5
- package/test/integration/generated/arrays/itemTypes/src/models.ts +0 -9
- package/test/integration/generated/arrays/itemTypes/src/outputModels.ts +0 -9
- package/test/integration/generated/arrays/itemTypes/src/parameters.ts +0 -86
- package/test/integration/generated/arrays/itemTypes/src/responses.ts +0 -115
- package/test/integration/generated/arrays/itemTypes/tspconfig.yaml +0 -15
- package/test/integration/generated/authentication/apiKey/.eslintrc.json +0 -11
- package/test/integration/generated/authentication/apiKey/README.md +0 -56
- package/test/integration/generated/authentication/apiKey/api-extractor.json +0 -18
- package/test/integration/generated/authentication/apiKey/karma.conf.js +0 -133
- package/test/integration/generated/authentication/apiKey/package.json +0 -103
- package/test/integration/generated/authentication/apiKey/rollup.config.js +0 -118
- package/test/integration/generated/authentication/apiKey/src/authApiKeyClient.ts +0 -45
- package/test/integration/generated/authentication/apiKey/src/clientDefinitions.ts +0 -33
- package/test/integration/generated/authentication/apiKey/src/index.ts +0 -12
- package/test/integration/generated/authentication/apiKey/src/logger.ts +0 -5
- package/test/integration/generated/authentication/apiKey/src/outputModels.ts +0 -6
- package/test/integration/generated/authentication/apiKey/src/parameters.ts +0 -7
- package/test/integration/generated/authentication/apiKey/src/responses.ts +0 -21
- package/test/integration/generated/authentication/apiKey/test/public/sampleTest.spec.ts +0 -23
- package/test/integration/generated/authentication/apiKey/test/public/utils/env.browser.ts +0 -2
- package/test/integration/generated/authentication/apiKey/test/public/utils/env.ts +0 -6
- package/test/integration/generated/authentication/apiKey/test/public/utils/recordedClient.ts +0 -29
- package/test/integration/generated/authentication/apiKey/tsconfig.json +0 -25
- package/test/integration/generated/authentication/apiKey/tspconfig.yaml +0 -13
- package/test/integration/generated/authentication/oauth2/karma.conf.js +0 -133
- package/test/integration/generated/authentication/oauth2/src/authOauth2Client.ts +0 -45
- package/test/integration/generated/authentication/oauth2/src/clientDefinitions.ts +0 -33
- package/test/integration/generated/authentication/oauth2/src/index.ts +0 -12
- package/test/integration/generated/authentication/oauth2/src/logger.ts +0 -5
- package/test/integration/generated/authentication/oauth2/src/outputModels.ts +0 -6
- package/test/integration/generated/authentication/oauth2/src/parameters.ts +0 -7
- package/test/integration/generated/authentication/oauth2/src/responses.ts +0 -21
- package/test/integration/generated/authentication/oauth2/test/public/sampleTest.spec.ts +0 -23
- package/test/integration/generated/authentication/oauth2/test/public/utils/env.browser.ts +0 -2
- package/test/integration/generated/authentication/oauth2/test/public/utils/env.ts +0 -6
- package/test/integration/generated/authentication/oauth2/test/public/utils/recordedClient.ts +0 -29
- package/test/integration/generated/authentication/oauth2/tspconfig.yaml +0 -15
- package/test/integration/generated/authentication/union/karma.conf.js +0 -133
- package/test/integration/generated/authentication/union/src/authUnionClient.ts +0 -46
- package/test/integration/generated/authentication/union/src/clientDefinitions.ts +0 -27
- package/test/integration/generated/authentication/union/src/index.ts +0 -11
- package/test/integration/generated/authentication/union/src/logger.ts +0 -5
- package/test/integration/generated/authentication/union/src/parameters.ts +0 -7
- package/test/integration/generated/authentication/union/src/responses.ts +0 -14
- package/test/integration/generated/authentication/union/test/public/sampleTest.spec.ts +0 -23
- package/test/integration/generated/authentication/union/test/public/utils/env.browser.ts +0 -2
- package/test/integration/generated/authentication/union/test/public/utils/env.ts +0 -6
- package/test/integration/generated/authentication/union/test/public/utils/recordedClient.ts +0 -29
- package/test/integration/generated/authentication/union/tspconfig.yaml +0 -15
- package/test/integration/generated/azure/core/.eslintrc.json +0 -11
- package/test/integration/generated/azure/core/README.md +0 -56
- package/test/integration/generated/azure/core/api-extractor.json +0 -18
- package/test/integration/generated/azure/core/package.json +0 -81
- package/test/integration/generated/azure/core/rollup.config.js +0 -118
- package/test/integration/generated/azure/core/src/azureCoreClient.ts +0 -35
- package/test/integration/generated/azure/core/src/clientDefinitions.ts +0 -108
- package/test/integration/generated/azure/core/src/index.ts +0 -16
- package/test/integration/generated/azure/core/src/isUnexpected.ts +0 -178
- package/test/integration/generated/azure/core/src/logger.ts +0 -5
- package/test/integration/generated/azure/core/src/models.ts +0 -18
- package/test/integration/generated/azure/core/src/outputModels.ts +0 -38
- package/test/integration/generated/azure/core/src/paginateHelper.ts +0 -204
- package/test/integration/generated/azure/core/src/parameters.ts +0 -68
- package/test/integration/generated/azure/core/src/responses.ts +0 -158
- package/test/integration/generated/azure/core/src/serializeHelper.ts +0 -16
- package/test/integration/generated/azure/core/tsconfig.json +0 -25
- package/test/integration/generated/azure/core/tspconfig.yaml +0 -15
- package/test/integration/generated/azure/core-traits/.eslintrc.json +0 -11
- package/test/integration/generated/azure/core-traits/README.md +0 -56
- package/test/integration/generated/azure/core-traits/api-extractor.json +0 -18
- package/test/integration/generated/azure/core-traits/package.json +0 -80
- package/test/integration/generated/azure/core-traits/rollup.config.js +0 -118
- package/test/integration/generated/azure/core-traits/src/azureCoreTraitsClient.ts +0 -35
- package/test/integration/generated/azure/core-traits/src/clientDefinitions.ts +0 -22
- package/test/integration/generated/azure/core-traits/src/index.ts +0 -13
- package/test/integration/generated/azure/core-traits/src/isUnexpected.ts +0 -97
- package/test/integration/generated/azure/core-traits/src/logger.ts +0 -5
- package/test/integration/generated/azure/core-traits/src/outputModels.ts +0 -25
- package/test/integration/generated/azure/core-traits/src/parameters.ts +0 -26
- package/test/integration/generated/azure/core-traits/src/responses.ts +0 -32
- package/test/integration/generated/azure/core-traits/tsconfig.json +0 -25
- package/test/integration/generated/azure/core-traits/tspconfig.yaml +0 -15
- package/test/integration/generated/dictionary/.eslintrc.json +0 -11
- package/test/integration/generated/dictionary/README.md +0 -56
- package/test/integration/generated/dictionary/api-extractor.json +0 -18
- package/test/integration/generated/dictionary/package.json +0 -80
- package/test/integration/generated/dictionary/rollup.config.js +0 -118
- package/test/integration/generated/dictionary/src/clientDefinitions.ts +0 -180
- package/test/integration/generated/dictionary/src/dictClient.ts +0 -33
- package/test/integration/generated/dictionary/src/index.ts +0 -13
- package/test/integration/generated/dictionary/src/logger.ts +0 -5
- package/test/integration/generated/dictionary/src/models.ts +0 -9
- package/test/integration/generated/dictionary/src/outputModels.ts +0 -9
- package/test/integration/generated/dictionary/src/parameters.ts +0 -94
- package/test/integration/generated/dictionary/src/responses.ts +0 -126
- package/test/integration/generated/dictionary/tsconfig.json +0 -25
- package/test/integration/generated/dictionary/tspconfig.yaml +0 -15
- package/test/integration/generated/enums/extensible/.eslintrc.json +0 -11
- package/test/integration/generated/enums/extensible/README.md +0 -56
- package/test/integration/generated/enums/extensible/api-extractor.json +0 -18
- package/test/integration/generated/enums/extensible/package.json +0 -80
- package/test/integration/generated/enums/extensible/rollup.config.js +0 -118
- package/test/integration/generated/enums/extensible/src/clientDefinitions.ts +0 -45
- package/test/integration/generated/enums/extensible/src/index.ts +0 -11
- package/test/integration/generated/enums/extensible/src/logger.ts +0 -5
- package/test/integration/generated/enums/extensible/src/parameters.ts +0 -23
- package/test/integration/generated/enums/extensible/src/responses.ts +0 -26
- package/test/integration/generated/enums/extensible/src/typeEnumExtensible.ts +0 -35
- package/test/integration/generated/enums/extensible/tsconfig.json +0 -25
- package/test/integration/generated/enums/extensible/tspconfig.yaml +0 -14
- package/test/integration/generated/enums/fixed/.eslintrc.json +0 -11
- package/test/integration/generated/enums/fixed/README.md +0 -56
- package/test/integration/generated/enums/fixed/api-extractor.json +0 -18
- package/test/integration/generated/enums/fixed/package.json +0 -80
- package/test/integration/generated/enums/fixed/rollup.config.js +0 -118
- package/test/integration/generated/enums/fixed/src/clientDefinitions.ts +0 -43
- package/test/integration/generated/enums/fixed/src/index.ts +0 -11
- package/test/integration/generated/enums/fixed/src/logger.ts +0 -5
- package/test/integration/generated/enums/fixed/src/parameters.ts +0 -36
- package/test/integration/generated/enums/fixed/src/responses.ts +0 -27
- package/test/integration/generated/enums/fixed/src/typeEnumFixed.ts +0 -35
- package/test/integration/generated/enums/fixed/tsconfig.json +0 -25
- package/test/integration/generated/enums/fixed/tspconfig.yaml +0 -14
- package/test/integration/generated/hello/.eslintrc.json +0 -11
- package/test/integration/generated/hello/README.md +0 -56
- package/test/integration/generated/hello/api-extractor.json +0 -18
- package/test/integration/generated/hello/package.json +0 -80
- package/test/integration/generated/hello/rollup.config.js +0 -118
- package/test/integration/generated/hello/src/clientDefinitions.ts +0 -19
- package/test/integration/generated/hello/src/hello.ts +0 -29
- package/test/integration/generated/hello/src/index.ts +0 -11
- package/test/integration/generated/hello/src/parameters.ts +0 -6
- package/test/integration/generated/hello/src/responses.ts +0 -10
- package/test/integration/generated/hello/tsconfig.json +0 -25
- package/test/integration/generated/hello/tspconfig.yaml +0 -14
- package/test/integration/generated/internal/src/clientDefinitions.ts +0 -53
- package/test/integration/generated/internal/src/index.ts +0 -12
- package/test/integration/generated/internal/src/internalClient.ts +0 -35
- package/test/integration/generated/internal/src/logger.ts +0 -5
- package/test/integration/generated/internal/src/outputModels.ts +0 -17
- package/test/integration/generated/internal/src/parameters.ts +0 -45
- package/test/integration/generated/internal/src/responses.ts +0 -33
- package/test/integration/generated/internal/tspconfig.yaml +0 -14
- package/test/integration/generated/lro/lroCore/.eslintrc.json +0 -11
- package/test/integration/generated/lro/lroCore/README.md +0 -56
- package/test/integration/generated/lro/lroCore/api-extractor.json +0 -18
- package/test/integration/generated/lro/lroCore/package.json +0 -82
- package/test/integration/generated/lro/lroCore/rollup.config.js +0 -118
- package/test/integration/generated/lro/lroCore/src/clientDefinitions.ts +0 -54
- package/test/integration/generated/lro/lroCore/src/index.ts +0 -15
- package/test/integration/generated/lro/lroCore/src/isUnexpected.ts +0 -135
- package/test/integration/generated/lro/lroCore/src/logger.ts +0 -5
- package/test/integration/generated/lro/lroCore/src/models.ts +0 -8
- package/test/integration/generated/lro/lroCore/src/outputModels.ts +0 -50
- package/test/integration/generated/lro/lroCore/src/parameters.ts +0 -25
- package/test/integration/generated/lro/lroCore/src/pollingHelper.ts +0 -113
- package/test/integration/generated/lro/lroCore/src/responses.ts +0 -109
- package/test/integration/generated/lro/lroCore/src/specsAzureCoreLroStandard.ts +0 -35
- package/test/integration/generated/lro/lroCore/tsconfig.json +0 -25
- package/test/integration/generated/lro/lroCore/tspconfig.yaml +0 -14
- package/test/integration/generated/lro/lroRPC/.eslintrc.json +0 -11
- package/test/integration/generated/lro/lroRPC/README.md +0 -56
- package/test/integration/generated/lro/lroRPC/api-extractor.json +0 -18
- package/test/integration/generated/lro/lroRPC/package.json +0 -82
- package/test/integration/generated/lro/lroRPC/rollup.config.js +0 -118
- package/test/integration/generated/lro/lroRPC/src/clientDefinitions.ts +0 -79
- package/test/integration/generated/lro/lroRPC/src/index.ts +0 -15
- package/test/integration/generated/lro/lroRPC/src/isUnexpected.ts +0 -153
- package/test/integration/generated/lro/lroRPC/src/logger.ts +0 -5
- package/test/integration/generated/lro/lroRPC/src/models.ts +0 -8
- package/test/integration/generated/lro/lroRPC/src/outputModels.ts +0 -40
- package/test/integration/generated/lro/lroRPC/src/parameters.ts +0 -20
- package/test/integration/generated/lro/lroRPC/src/pollingHelper.ts +0 -127
- package/test/integration/generated/lro/lroRPC/src/responses.ts +0 -124
- package/test/integration/generated/lro/lroRPC/src/specsAzureCoreLroRpc.ts +0 -35
- package/test/integration/generated/lro/lroRPC/tsconfig.json +0 -25
- package/test/integration/generated/lro/lroRPC/tspconfig.yaml +0 -14
- package/test/integration/generated/models/inheritance/.eslintrc.json +0 -11
- package/test/integration/generated/models/inheritance/README.md +0 -56
- package/test/integration/generated/models/inheritance/api-extractor.json +0 -18
- package/test/integration/generated/models/inheritance/package.json +0 -80
- package/test/integration/generated/models/inheritance/rollup.config.js +0 -118
- package/test/integration/generated/models/inheritance/src/clientDefinitions.ts +0 -81
- package/test/integration/generated/models/inheritance/src/index.ts +0 -13
- package/test/integration/generated/models/inheritance/src/logger.ts +0 -5
- package/test/integration/generated/models/inheritance/src/models.ts +0 -52
- package/test/integration/generated/models/inheritance/src/outputModels.ts +0 -52
- package/test/integration/generated/models/inheritance/src/parameters.ts +0 -35
- package/test/integration/generated/models/inheritance/src/responses.ts +0 -56
- package/test/integration/generated/models/inheritance/src/typeModelInheritance.ts +0 -35
- package/test/integration/generated/models/inheritance/tsconfig.json +0 -25
- package/test/integration/generated/models/inheritance/tspconfig.yaml +0 -14
- package/test/integration/generated/models/propertyNullable/.eslintrc.json +0 -11
- package/test/integration/generated/models/propertyNullable/README.md +0 -56
- package/test/integration/generated/models/propertyNullable/api-extractor.json +0 -18
- package/test/integration/generated/models/propertyNullable/package.json +0 -80
- package/test/integration/generated/models/propertyNullable/rollup.config.js +0 -118
- package/test/integration/generated/models/propertyNullable/src/clientDefinitions.ts +0 -227
- package/test/integration/generated/models/propertyNullable/src/index.ts +0 -13
- package/test/integration/generated/models/propertyNullable/src/logger.ts +0 -5
- package/test/integration/generated/models/propertyNullable/src/models.ts +0 -56
- package/test/integration/generated/models/propertyNullable/src/outputModels.ts +0 -56
- package/test/integration/generated/models/propertyNullable/src/parameters.ts +0 -197
- package/test/integration/generated/models/propertyNullable/src/responses.ts +0 -144
- package/test/integration/generated/models/propertyNullable/src/typePropertyNullable.ts +0 -35
- package/test/integration/generated/models/propertyNullable/tsconfig.json +0 -25
- package/test/integration/generated/models/propertyNullable/tspconfig.yaml +0 -14
- package/test/integration/generated/models/propertyOptional/.eslintrc.json +0 -11
- package/test/integration/generated/models/propertyOptional/README.md +0 -56
- package/test/integration/generated/models/propertyOptional/api-extractor.json +0 -18
- package/test/integration/generated/models/propertyOptional/package.json +0 -80
- package/test/integration/generated/models/propertyOptional/rollup.config.js +0 -118
- package/test/integration/generated/models/propertyOptional/src/clientDefinitions.ts +0 -263
- package/test/integration/generated/models/propertyOptional/src/index.ts +0 -13
- package/test/integration/generated/models/propertyOptional/src/logger.ts +0 -5
- package/test/integration/generated/models/propertyOptional/src/models.ts +0 -46
- package/test/integration/generated/models/propertyOptional/src/outputModels.ts +0 -46
- package/test/integration/generated/models/propertyOptional/src/parameters.ts +0 -125
- package/test/integration/generated/models/propertyOptional/src/responses.ts +0 -169
- package/test/integration/generated/models/propertyOptional/src/typePropertyOptional.ts +0 -35
- package/test/integration/generated/models/propertyOptional/tsconfig.json +0 -25
- package/test/integration/generated/models/propertyOptional/tspconfig.yaml +0 -14
- package/test/integration/generated/models/propertyTypes/.eslintrc.json +0 -11
- package/test/integration/generated/models/propertyTypes/README.md +0 -56
- package/test/integration/generated/models/propertyTypes/api-extractor.json +0 -18
- package/test/integration/generated/models/propertyTypes/package.json +0 -80
- package/test/integration/generated/models/propertyTypes/rollup.config.js +0 -118
- package/test/integration/generated/models/propertyTypes/src/clientDefinitions.ts +0 -310
- package/test/integration/generated/models/propertyTypes/src/index.ts +0 -13
- package/test/integration/generated/models/propertyTypes/src/logger.ts +0 -5
- package/test/integration/generated/models/propertyTypes/src/models.ts +0 -123
- package/test/integration/generated/models/propertyTypes/src/outputModels.ts +0 -123
- package/test/integration/generated/models/propertyTypes/src/parameters.ts +0 -189
- package/test/integration/generated/models/propertyTypes/src/responses.ts +0 -234
- package/test/integration/generated/models/propertyTypes/src/typePropertyValueTypes.ts +0 -35
- package/test/integration/generated/models/propertyTypes/tsconfig.json +0 -25
- package/test/integration/generated/models/propertyTypes/tspconfig.yaml +0 -14
- package/test/integration/generated/models/usage/.eslintrc.json +0 -11
- package/test/integration/generated/models/usage/README.md +0 -56
- package/test/integration/generated/models/usage/api-extractor.json +0 -18
- package/test/integration/generated/models/usage/package.json +0 -80
- package/test/integration/generated/models/usage/rollup.config.js +0 -118
- package/test/integration/generated/models/usage/src/clientDefinitions.ts +0 -41
- package/test/integration/generated/models/usage/src/index.ts +0 -13
- package/test/integration/generated/models/usage/src/logger.ts +0 -5
- package/test/integration/generated/models/usage/src/models.ts +0 -12
- package/test/integration/generated/models/usage/src/outputModels.ts +0 -12
- package/test/integration/generated/models/usage/src/parameters.ts +0 -19
- package/test/integration/generated/models/usage/src/responses.ts +0 -22
- package/test/integration/generated/models/usage/src/typeModelUsage.ts +0 -35
- package/test/integration/generated/models/usage/tsconfig.json +0 -25
- package/test/integration/generated/models/usage/tspconfig.yaml +0 -14
- package/test/integration/generated/models/visibility/.eslintrc.json +0 -11
- package/test/integration/generated/models/visibility/README.md +0 -56
- package/test/integration/generated/models/visibility/api-extractor.json +0 -18
- package/test/integration/generated/models/visibility/package.json +0 -80
- package/test/integration/generated/models/visibility/rollup.config.js +0 -118
- package/test/integration/generated/models/visibility/src/clientDefinitions.ts +0 -40
- package/test/integration/generated/models/visibility/src/index.ts +0 -13
- package/test/integration/generated/models/visibility/src/logger.ts +0 -5
- package/test/integration/generated/models/visibility/src/models.ts +0 -14
- package/test/integration/generated/models/visibility/src/outputModels.ts +0 -16
- package/test/integration/generated/models/visibility/src/parameters.ts +0 -41
- package/test/integration/generated/models/visibility/src/responses.ts +0 -36
- package/test/integration/generated/models/visibility/src/typeModelVisibility.ts +0 -35
- package/test/integration/generated/models/visibility/tsconfig.json +0 -25
- package/test/integration/generated/models/visibility/tspconfig.yaml +0 -14
- package/test/integration/generated/parameters/collection-format/src/clientDefinitions.ts +0 -63
- package/test/integration/generated/parameters/collection-format/src/collectionFormatClient.ts +0 -35
- package/test/integration/generated/parameters/collection-format/src/index.ts +0 -12
- package/test/integration/generated/parameters/collection-format/src/logger.ts +0 -5
- package/test/integration/generated/parameters/collection-format/src/parameters.ts +0 -71
- package/test/integration/generated/parameters/collection-format/src/responses.ts +0 -34
- package/test/integration/generated/parameters/collection-format/src/serializeHelper.ts +0 -28
- package/test/integration/generated/parameters/collection-format/tspconfig.yaml +0 -14
- package/test/integration/generated/parameters/spread/src/clientDefinitions.ts +0 -61
- package/test/integration/generated/parameters/spread/src/index.ts +0 -12
- package/test/integration/generated/parameters/spread/src/logger.ts +0 -5
- package/test/integration/generated/parameters/spread/src/models.ts +0 -7
- package/test/integration/generated/parameters/spread/src/parameters.ts +0 -61
- package/test/integration/generated/parameters/spread/src/parametersSpread.ts +0 -35
- package/test/integration/generated/parameters/spread/src/responses.ts +0 -25
- package/test/integration/generated/parameters/spread/tspconfig.yaml +0 -12
- package/test/integration/generated/projection/src/clientDefinitions.ts +0 -71
- package/test/integration/generated/projection/src/index.ts +0 -12
- package/test/integration/generated/projection/src/logger.ts +0 -5
- package/test/integration/generated/projection/src/models.ts +0 -22
- package/test/integration/generated/projection/src/parameters.ts +0 -48
- package/test/integration/generated/projection/src/projectionClient.ts +0 -35
- package/test/integration/generated/projection/src/responses.ts +0 -34
- package/test/integration/generated/projection/tspconfig.yaml +0 -14
- package/test/integration/generated/resiliency/srvDriven1/.eslintrc.json +0 -11
- package/test/integration/generated/resiliency/srvDriven1/README.md +0 -56
- package/test/integration/generated/resiliency/srvDriven1/api-extractor.json +0 -18
- package/test/integration/generated/resiliency/srvDriven1/package.json +0 -80
- package/test/integration/generated/resiliency/srvDriven1/rollup.config.js +0 -118
- package/test/integration/generated/resiliency/srvDriven1/src/clientDefinitions.ts +0 -46
- package/test/integration/generated/resiliency/srvDriven1/src/index.ts +0 -11
- package/test/integration/generated/resiliency/srvDriven1/src/logger.ts +0 -5
- package/test/integration/generated/resiliency/srvDriven1/src/parameters.ts +0 -30
- package/test/integration/generated/resiliency/srvDriven1/src/responses.ts +0 -19
- package/test/integration/generated/resiliency/srvDriven1/src/serviceDrivenOldClient.ts +0 -43
- package/test/integration/generated/resiliency/srvDriven1/tsconfig.json +0 -25
- package/test/integration/generated/resiliency/srvDriven1/tspconfig.yaml +0 -15
- package/test/integration/generated/resiliency/srvDriven2/.eslintrc.json +0 -11
- package/test/integration/generated/resiliency/srvDriven2/README.md +0 -65
- package/test/integration/generated/resiliency/srvDriven2/api-extractor.json +0 -18
- package/test/integration/generated/resiliency/srvDriven2/package.json +0 -80
- package/test/integration/generated/resiliency/srvDriven2/rollup.config.js +0 -118
- package/test/integration/generated/resiliency/srvDriven2/src/clientDefinitions.ts +0 -57
- package/test/integration/generated/resiliency/srvDriven2/src/index.ts +0 -11
- package/test/integration/generated/resiliency/srvDriven2/src/logger.ts +0 -5
- package/test/integration/generated/resiliency/srvDriven2/src/parameters.ts +0 -45
- package/test/integration/generated/resiliency/srvDriven2/src/responses.ts +0 -24
- package/test/integration/generated/resiliency/srvDriven2/src/serviceDrivenNewClient.ts +0 -43
- package/test/integration/generated/resiliency/srvDriven2/tsconfig.json +0 -25
- package/test/integration/generated/resiliency/srvDriven2/tspconfig.yaml +0 -15
- package/test/integration/generated/server/path/multiple/src/clientDefinitions.ts +0 -35
- package/test/integration/generated/server/path/multiple/src/index.ts +0 -11
- package/test/integration/generated/server/path/multiple/src/logger.ts +0 -5
- package/test/integration/generated/server/path/multiple/src/multipleParamInServerPathClient.ts +0 -43
- package/test/integration/generated/server/path/multiple/src/parameters.ts +0 -7
- package/test/integration/generated/server/path/multiple/src/responses.ts +0 -14
- package/test/integration/generated/server/path/multiple/tspconfig.yaml +0 -14
- package/test/integration/generated/server/path/single/src/clientDefinitions.ts +0 -19
- package/test/integration/generated/server/path/single/src/index.ts +0 -11
- package/test/integration/generated/server/path/single/src/logger.ts +0 -5
- package/test/integration/generated/server/path/single/src/parameters.ts +0 -6
- package/test/integration/generated/server/path/single/src/responses.ts +0 -9
- package/test/integration/generated/server/path/single/src/singleParamInServerPathClient.ts +0 -38
- package/test/integration/generated/server/path/single/tspconfig.yaml +0 -14
- package/test/integration/generated/specialWords/src/clientDefinitions.ts +0 -61
- package/test/integration/generated/specialWords/src/index.ts +0 -13
- package/test/integration/generated/specialWords/src/logger.ts +0 -5
- package/test/integration/generated/specialWords/src/models.ts +0 -17
- package/test/integration/generated/specialWords/src/outputModels.ts +0 -17
- package/test/integration/generated/specialWords/src/parameters.ts +0 -37
- package/test/integration/generated/specialWords/src/responses.ts +0 -31
- package/test/integration/generated/specialWords/src/specialWordsClient.ts +0 -35
- package/test/integration/generated/specialWords/tspconfig.yaml +0 -14
- package/test/integration/generated/unions/src/clientDefinitions.ts +0 -53
- package/test/integration/generated/unions/src/index.ts +0 -12
- package/test/integration/generated/unions/src/logger.ts +0 -5
- package/test/integration/generated/unions/src/models.ts +0 -27
- package/test/integration/generated/unions/src/parameters.ts +0 -34
- package/test/integration/generated/unions/src/responses.ts +0 -24
- package/test/integration/generated/unions/src/unionsClient.ts +0 -35
- package/test/integration/generated/unions/tspconfig.yaml +0 -14
- package/test/integration/internal.spec.ts +0 -76
- package/test/integration/lroCore.spec.ts +0 -89
- package/test/integration/modelInheritance.spec.ts +0 -192
- package/test/integration/modelPropertyNullable.spec.ts +0 -115
- package/test/integration/modelPropertyOptional.spec.ts +0 -362
- package/test/integration/modelPropertyType.spec.ts +0 -135
- package/test/integration/modelUsage.spec.ts +0 -47
- package/test/integration/projection.spec.ts +0 -102
- package/test/integration/resiliencyDpgCustomization.spec.ts +0 -147
- package/test/integration/server.spec.ts +0 -59
- package/test/integration/specialWords.spec.ts +0 -73
- package/test/integration/spreadParameters.spec.ts +0 -82
- package/test/integration/unions.spec.ts +0 -69
- package/test/tsconfig.json +0 -4
- package/test/unit/apiVersion.spec.ts +0 -400
- package/test/unit/azureCoreOperationsGenerator.spec.ts +0 -71
- package/test/unit/clientDefinitionGenerator.spec.ts +0 -73
- package/test/unit/clientFactoryGenerator.spec.ts +0 -404
- package/test/unit/docsGenerator.spec.ts +0 -201
- package/test/unit/modelsGenerator.spec.ts +0 -1529
- package/test/unit/parametersGenerator.spec.ts +0 -561
- package/test/unit/responsesGenerator.spec.ts +0 -462
- package/test/unit/spreadAndAlias.spec.ts +0 -200
- package/test/unit/util/emitUtil.ts +0 -166
- package/test/unit/util/testUtil.ts +0 -88
- package/test/util/customBearerTokenTestingPolicy.ts +0 -78
- package/test/util/matrix.ts +0 -48
- package/tsconfig.json +0 -36
- package/tsconfig.test.json +0 -7
- package/typespec-ts.build.log +0 -1
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
5
|
-
import cjs from "@rollup/plugin-commonjs";
|
|
6
|
-
import sourcemaps from "rollup-plugin-sourcemaps";
|
|
7
|
-
import multiEntry from "@rollup/plugin-multi-entry";
|
|
8
|
-
import json from "@rollup/plugin-json";
|
|
9
|
-
|
|
10
|
-
import nodeBuiltins from "builtin-modules";
|
|
11
|
-
|
|
12
|
-
// #region Warning Handler
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* A function that can determine whether a rollup warning should be ignored. If
|
|
16
|
-
* the function returns `true`, then the warning will not be displayed.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function ignoreNiseSinonEval(warning) {
|
|
20
|
-
return (
|
|
21
|
-
warning.code === "EVAL" &&
|
|
22
|
-
warning.id &&
|
|
23
|
-
(warning.id.includes("node_modules/nise") ||
|
|
24
|
-
warning.id.includes("node_modules/sinon")) === true
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function ignoreChaiCircularDependency(warning) {
|
|
29
|
-
return (
|
|
30
|
-
warning.code === "CIRCULAR_DEPENDENCY" &&
|
|
31
|
-
warning.importer &&
|
|
32
|
-
warning.importer.includes("node_modules/chai") === true
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Construct a warning handler for the shared rollup configuration
|
|
40
|
-
* that ignores certain warnings that are not relevant to testing.
|
|
41
|
-
*/
|
|
42
|
-
function makeOnWarnForTesting() {
|
|
43
|
-
return (warning, warn) => {
|
|
44
|
-
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
|
|
45
|
-
if (warningInhibitors.every((inhib) => !inhib(warning))) {
|
|
46
|
-
warn(warning);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// #endregion
|
|
52
|
-
|
|
53
|
-
function makeBrowserTestConfig() {
|
|
54
|
-
const config = {
|
|
55
|
-
input: {
|
|
56
|
-
include: ["dist-esm/test/**/*.spec.js"],
|
|
57
|
-
exclude: ["dist-esm/test/**/node/**"],
|
|
58
|
-
},
|
|
59
|
-
output: {
|
|
60
|
-
file: `dist-test/index.browser.js`,
|
|
61
|
-
format: "umd",
|
|
62
|
-
sourcemap: true,
|
|
63
|
-
},
|
|
64
|
-
preserveSymlinks: false,
|
|
65
|
-
plugins: [
|
|
66
|
-
multiEntry({ exports: false }),
|
|
67
|
-
nodeResolve({
|
|
68
|
-
mainFields: ["module", "browser"],
|
|
69
|
-
}),
|
|
70
|
-
cjs(),
|
|
71
|
-
json(),
|
|
72
|
-
sourcemaps(),
|
|
73
|
-
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
|
74
|
-
],
|
|
75
|
-
onwarn: makeOnWarnForTesting(),
|
|
76
|
-
// Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
|
|
77
|
-
// rollup started respecting the "sideEffects" field in package.json. Since
|
|
78
|
-
// our package.json sets "sideEffects=false", this also applies to test
|
|
79
|
-
// code, which causes all tests to be removed by tree-shaking.
|
|
80
|
-
treeshake: false,
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
return config;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const defaultConfigurationOptions = {
|
|
87
|
-
disableBrowserBundle: false,
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export function makeConfig(pkg, options) {
|
|
91
|
-
options = {
|
|
92
|
-
...defaultConfigurationOptions,
|
|
93
|
-
...(options || {}),
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const baseConfig = {
|
|
97
|
-
// Use the package's module field if it has one
|
|
98
|
-
input: pkg["module"] || "dist-esm/src/index.js",
|
|
99
|
-
external: [
|
|
100
|
-
...nodeBuiltins,
|
|
101
|
-
...Object.keys(pkg.dependencies),
|
|
102
|
-
...Object.keys(pkg.devDependencies),
|
|
103
|
-
],
|
|
104
|
-
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
|
105
|
-
preserveSymlinks: false,
|
|
106
|
-
plugins: [sourcemaps(), nodeResolve()],
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
const config = [baseConfig];
|
|
110
|
-
|
|
111
|
-
if (!options.disableBrowserBundle) {
|
|
112
|
-
config.push(makeBrowserTestConfig());
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
return config;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export default makeConfig(require("./package.json"));
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
AddOperationParameters,
|
|
6
|
-
FromNoneParameters,
|
|
7
|
-
FromOneRequiredParameters,
|
|
8
|
-
FromOneOptionalParameters,
|
|
9
|
-
} from "./parameters";
|
|
10
|
-
import {
|
|
11
|
-
AddOperation204Response,
|
|
12
|
-
FromNone204Response,
|
|
13
|
-
FromOneRequired204Response,
|
|
14
|
-
FromOneOptional204Response,
|
|
15
|
-
} from "./responses";
|
|
16
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
17
|
-
|
|
18
|
-
export interface AddOperation {
|
|
19
|
-
/** Added operation */
|
|
20
|
-
delete(
|
|
21
|
-
options?: AddOperationParameters
|
|
22
|
-
): StreamableMethod<AddOperation204Response>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface FromNone {
|
|
26
|
-
/** Test that grew up from accepting no parameters to an optional input parameter */
|
|
27
|
-
head(options?: FromNoneParameters): StreamableMethod<FromNone204Response>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface FromOneRequired {
|
|
31
|
-
/** Operation that grew up from accepting one required parameter to accepting a required parameter and an optional parameter. */
|
|
32
|
-
get(
|
|
33
|
-
options: FromOneRequiredParameters
|
|
34
|
-
): StreamableMethod<FromOneRequired204Response>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface FromOneOptional {
|
|
38
|
-
/** Tests that we can grow up an operation from accepting one optional parameter to accepting two optional parameters. */
|
|
39
|
-
get(
|
|
40
|
-
options?: FromOneOptionalParameters
|
|
41
|
-
): StreamableMethod<FromOneOptional204Response>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface Routes {
|
|
45
|
-
/** Resource for '/add-operation' has methods for the following verbs: delete */
|
|
46
|
-
(path: "/add-operation"): AddOperation;
|
|
47
|
-
/** Resource for '/add-optional-param/from-none' has methods for the following verbs: head */
|
|
48
|
-
(path: "/add-optional-param/from-none"): FromNone;
|
|
49
|
-
/** Resource for '/add-optional-param/from-one-required' has methods for the following verbs: get */
|
|
50
|
-
(path: "/add-optional-param/from-one-required"): FromOneRequired;
|
|
51
|
-
/** Resource for '/add-optional-param/from-one-optional' has methods for the following verbs: get */
|
|
52
|
-
(path: "/add-optional-param/from-one-optional"): FromOneOptional;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export type ServiceDrivenNewClient = Client & {
|
|
56
|
-
path: Routes;
|
|
57
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import ServiceDrivenNewClient from "./serviceDrivenNewClient";
|
|
5
|
-
|
|
6
|
-
export * from "./serviceDrivenNewClient";
|
|
7
|
-
export * from "./parameters";
|
|
8
|
-
export * from "./responses";
|
|
9
|
-
export * from "./clientDefinitions";
|
|
10
|
-
|
|
11
|
-
export default ServiceDrivenNewClient;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { RequestParameters } from "@azure-rest/core-client";
|
|
5
|
-
|
|
6
|
-
export type AddOperationParameters = RequestParameters;
|
|
7
|
-
|
|
8
|
-
export interface FromNoneQueryParamProperties {
|
|
9
|
-
/** I'm a new input optional parameter */
|
|
10
|
-
"new-parameter"?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface FromNoneQueryParam {
|
|
14
|
-
queryParameters?: FromNoneQueryParamProperties;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type FromNoneParameters = FromNoneQueryParam & RequestParameters;
|
|
18
|
-
|
|
19
|
-
export interface FromOneRequiredQueryParamProperties {
|
|
20
|
-
/** I am a required parameter */
|
|
21
|
-
parameter: string;
|
|
22
|
-
/** I'm a new input optional parameter */
|
|
23
|
-
"new-parameter"?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface FromOneRequiredQueryParam {
|
|
27
|
-
queryParameters: FromOneRequiredQueryParamProperties;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type FromOneRequiredParameters = FromOneRequiredQueryParam &
|
|
31
|
-
RequestParameters;
|
|
32
|
-
|
|
33
|
-
export interface FromOneOptionalQueryParamProperties {
|
|
34
|
-
/** I am an optional parameter */
|
|
35
|
-
parameter?: string;
|
|
36
|
-
/** I'm a new input optional parameter */
|
|
37
|
-
"new-parameter"?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface FromOneOptionalQueryParam {
|
|
41
|
-
queryParameters?: FromOneOptionalQueryParamProperties;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type FromOneOptionalParameters = FromOneOptionalQueryParam &
|
|
45
|
-
RequestParameters;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { HttpResponse } from "@azure-rest/core-client";
|
|
5
|
-
|
|
6
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
7
|
-
export interface AddOperation204Response extends HttpResponse {
|
|
8
|
-
status: "204";
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
12
|
-
export interface FromNone204Response extends HttpResponse {
|
|
13
|
-
status: "204";
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
17
|
-
export interface FromOneRequired204Response extends HttpResponse {
|
|
18
|
-
status: "204";
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
22
|
-
export interface FromOneOptional204Response extends HttpResponse {
|
|
23
|
-
status: "204";
|
|
24
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { getClient, ClientOptions } from "@azure-rest/core-client";
|
|
5
|
-
import { logger } from "./logger";
|
|
6
|
-
import { ServiceDrivenNewClient } from "./clientDefinitions";
|
|
7
|
-
|
|
8
|
-
export interface ServiceDrivenNewClientOptions extends ClientOptions {
|
|
9
|
-
apiVersion?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Initialize a new instance of `ServiceDrivenNewClient`
|
|
14
|
-
* @param serviceDeploymentVersion - Pass in either 'v1' or 'v2'. This represents a version of the service deployment in history. 'v1' is for the deployment when the service had only one api version. 'v2' is for the deployment when the service had api-versions 'v1' and 'v2'.
|
|
15
|
-
* @param options - the parameter for all optional parameters
|
|
16
|
-
*/
|
|
17
|
-
export default function createClient(
|
|
18
|
-
serviceDeploymentVersion: string,
|
|
19
|
-
options: ServiceDrivenNewClientOptions = {}
|
|
20
|
-
): ServiceDrivenNewClient {
|
|
21
|
-
const apiVersion = options.apiVersion ?? "v2";
|
|
22
|
-
const baseUrl =
|
|
23
|
-
options.baseUrl ??
|
|
24
|
-
`http://localhost:3000/resiliency/service-driven/client:v2/service:${serviceDeploymentVersion}/api-version:${apiVersion}`;
|
|
25
|
-
const userAgentInfo = `azsdk-js-srv-driven-2-rest/1.0.0`;
|
|
26
|
-
const userAgentPrefix =
|
|
27
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
28
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
29
|
-
: `${userAgentInfo}`;
|
|
30
|
-
options = {
|
|
31
|
-
...options,
|
|
32
|
-
userAgentOptions: {
|
|
33
|
-
userAgentPrefix,
|
|
34
|
-
},
|
|
35
|
-
loggingOptions: {
|
|
36
|
-
logger: options.loggingOptions?.logger ?? logger.info,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const client = getClient(baseUrl, options) as ServiceDrivenNewClient;
|
|
41
|
-
|
|
42
|
-
return client;
|
|
43
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2017",
|
|
4
|
-
"module": "es6",
|
|
5
|
-
"lib": [],
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"inlineSources": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"importHelpers": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"alwaysStrict": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"noImplicitReturns": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"forceConsistentCasingInFileNames": true,
|
|
18
|
-
"moduleResolution": "node",
|
|
19
|
-
"allowSyntheticDefaultImports": true,
|
|
20
|
-
"esModuleInterop": true,
|
|
21
|
-
"outDir": "./dist-esm",
|
|
22
|
-
"declarationDir": "./types"
|
|
23
|
-
},
|
|
24
|
-
"include": ["./src/**/*.ts"]
|
|
25
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
emit:
|
|
2
|
-
- "@azure-tools/typespec-ts"
|
|
3
|
-
options:
|
|
4
|
-
"@azure-tools/typespec-ts":
|
|
5
|
-
"emitter-output-dir": "{project-root}"
|
|
6
|
-
generateMetadata: true
|
|
7
|
-
generateTest: false
|
|
8
|
-
addCredentials: false
|
|
9
|
-
azureSdkForJs: false
|
|
10
|
-
isCadlTest: true
|
|
11
|
-
title: ServiceDrivenNewClient
|
|
12
|
-
packageDetails:
|
|
13
|
-
name: "@msinternal/srv-driven-2"
|
|
14
|
-
description: "Srv Driven 2 Test Service"
|
|
15
|
-
version: "1.0.0"
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
NoOperationParamsParameters,
|
|
6
|
-
WithOperationPathParamParameters,
|
|
7
|
-
} from "./parameters";
|
|
8
|
-
import {
|
|
9
|
-
NoOperationParams204Response,
|
|
10
|
-
WithOperationPathParam204Response,
|
|
11
|
-
} from "./responses";
|
|
12
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
13
|
-
|
|
14
|
-
export interface NoOperationParams {
|
|
15
|
-
get(
|
|
16
|
-
options?: NoOperationParamsParameters
|
|
17
|
-
): StreamableMethod<NoOperationParams204Response>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface WithOperationPathParam {
|
|
21
|
-
get(
|
|
22
|
-
options?: WithOperationPathParamParameters
|
|
23
|
-
): StreamableMethod<WithOperationPathParam204Response>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface Routes {
|
|
27
|
-
/** Resource for '/' has methods for the following verbs: get */
|
|
28
|
-
(path: "/"): NoOperationParams;
|
|
29
|
-
/** Resource for '/\{keyword\}' has methods for the following verbs: get */
|
|
30
|
-
(path: "/{keyword}", keyword: string): WithOperationPathParam;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type MultipleParamInServerPathClient = Client & {
|
|
34
|
-
path: Routes;
|
|
35
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import MultipleParamInServerPathClient from "./multipleParamInServerPathClient";
|
|
5
|
-
|
|
6
|
-
export * from "./multipleParamInServerPathClient";
|
|
7
|
-
export * from "./parameters";
|
|
8
|
-
export * from "./responses";
|
|
9
|
-
export * from "./clientDefinitions";
|
|
10
|
-
|
|
11
|
-
export default MultipleParamInServerPathClient;
|
package/test/integration/generated/server/path/multiple/src/multipleParamInServerPathClient.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { getClient, ClientOptions } from "@azure-rest/core-client";
|
|
5
|
-
import { logger } from "./logger";
|
|
6
|
-
import { MultipleParamInServerPathClient } from "./clientDefinitions";
|
|
7
|
-
|
|
8
|
-
export interface MultipleParamInServerPathClientOptions extends ClientOptions {
|
|
9
|
-
apiVersion?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Initialize a new instance of `MultipleParamInServerPathClient`
|
|
14
|
-
* @param endpoint - Pass in http://localhost:3000 for endpoint.
|
|
15
|
-
* @param options - the parameter for all optional parameters
|
|
16
|
-
*/
|
|
17
|
-
export default function createClient(
|
|
18
|
-
endpoint: string,
|
|
19
|
-
options: MultipleParamInServerPathClientOptions = {}
|
|
20
|
-
): MultipleParamInServerPathClient {
|
|
21
|
-
const apiVersion = options.apiVersion ?? "v1.0";
|
|
22
|
-
const baseUrl =
|
|
23
|
-
options.baseUrl ?? `${endpoint}/server/path/multiple/${apiVersion}`;
|
|
24
|
-
|
|
25
|
-
const userAgentInfo = `azsdk-js-multipleparam-rest/1.0.0-beta.1`;
|
|
26
|
-
const userAgentPrefix =
|
|
27
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
28
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
29
|
-
: `${userAgentInfo}`;
|
|
30
|
-
options = {
|
|
31
|
-
...options,
|
|
32
|
-
userAgentOptions: {
|
|
33
|
-
userAgentPrefix,
|
|
34
|
-
},
|
|
35
|
-
loggingOptions: {
|
|
36
|
-
logger: options.loggingOptions?.logger ?? logger.info,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const client = getClient(baseUrl, options) as MultipleParamInServerPathClient;
|
|
41
|
-
|
|
42
|
-
return client;
|
|
43
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { RequestParameters } from "@azure-rest/core-client";
|
|
5
|
-
|
|
6
|
-
export type NoOperationParamsParameters = RequestParameters;
|
|
7
|
-
export type WithOperationPathParamParameters = RequestParameters;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { HttpResponse } from "@azure-rest/core-client";
|
|
5
|
-
|
|
6
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
7
|
-
export interface NoOperationParams204Response extends HttpResponse {
|
|
8
|
-
status: "204";
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
12
|
-
export interface WithOperationPathParam204Response extends HttpResponse {
|
|
13
|
-
status: "204";
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
emit:
|
|
2
|
-
- "@azure-tools/typespec-ts"
|
|
3
|
-
options:
|
|
4
|
-
"@azure-tools/typespec-ts":
|
|
5
|
-
"emitter-output-dir": "{project-root}"
|
|
6
|
-
generateMetadata: false
|
|
7
|
-
generateTest: false
|
|
8
|
-
addCredentials: false
|
|
9
|
-
azureSdkForJs: false
|
|
10
|
-
isCadlTest: true
|
|
11
|
-
title: MultipleParamInServerPathClient
|
|
12
|
-
packageDetails:
|
|
13
|
-
name: "@msinternal/multipleparam"
|
|
14
|
-
description: "MultipleParameter Test Service"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { MyOpParameters } from "./parameters";
|
|
5
|
-
import { MyOp200Response } from "./responses";
|
|
6
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
7
|
-
|
|
8
|
-
export interface MyOp {
|
|
9
|
-
head(options?: MyOpParameters): StreamableMethod<MyOp200Response>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface Routes {
|
|
13
|
-
/** Resource for '/server/path/single/myOp' has methods for the following verbs: head */
|
|
14
|
-
(path: "/server/path/single/myOp"): MyOp;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type SingleParamInServerPathClient = Client & {
|
|
18
|
-
path: Routes;
|
|
19
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import SingleParamInServerPathClient from "./singleParamInServerPathClient";
|
|
5
|
-
|
|
6
|
-
export * from "./singleParamInServerPathClient";
|
|
7
|
-
export * from "./parameters";
|
|
8
|
-
export * from "./responses";
|
|
9
|
-
export * from "./clientDefinitions";
|
|
10
|
-
|
|
11
|
-
export default SingleParamInServerPathClient;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { getClient, ClientOptions } from "@azure-rest/core-client";
|
|
5
|
-
import { logger } from "./logger";
|
|
6
|
-
import { SingleParamInServerPathClient } from "./clientDefinitions";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Initialize a new instance of `SingleParamInServerPathClient`
|
|
10
|
-
* @param endpoint - Need to be set as 'http://localhost:3000' in client.
|
|
11
|
-
* @param options - the parameter for all optional parameters
|
|
12
|
-
*/
|
|
13
|
-
export default function createClient(
|
|
14
|
-
endpoint: string,
|
|
15
|
-
options: ClientOptions = {}
|
|
16
|
-
): SingleParamInServerPathClient {
|
|
17
|
-
const baseUrl = options.baseUrl ?? `${endpoint}`;
|
|
18
|
-
options.apiVersion = options.apiVersion ?? "1.0.0";
|
|
19
|
-
|
|
20
|
-
const userAgentInfo = `azsdk-js-singleparam-rest/1.0.0-beta.1`;
|
|
21
|
-
const userAgentPrefix =
|
|
22
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
23
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
24
|
-
: `${userAgentInfo}`;
|
|
25
|
-
options = {
|
|
26
|
-
...options,
|
|
27
|
-
userAgentOptions: {
|
|
28
|
-
userAgentPrefix,
|
|
29
|
-
},
|
|
30
|
-
loggingOptions: {
|
|
31
|
-
logger: options.loggingOptions?.logger ?? logger.info,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const client = getClient(baseUrl, options) as SingleParamInServerPathClient;
|
|
36
|
-
|
|
37
|
-
return client;
|
|
38
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
emit:
|
|
2
|
-
- "@azure-tools/typespec-ts"
|
|
3
|
-
options:
|
|
4
|
-
"@azure-tools/typespec-ts":
|
|
5
|
-
"emitter-output-dir": "{project-root}"
|
|
6
|
-
generateMetadata: false
|
|
7
|
-
generateTest: false
|
|
8
|
-
addCredentials: false
|
|
9
|
-
azureSdkForJs: false
|
|
10
|
-
isCadlTest: true
|
|
11
|
-
title: SingleParamInServerPathClient
|
|
12
|
-
packageDetails:
|
|
13
|
-
name: "@msinternal/singleparam"
|
|
14
|
-
description: "SingleParameter Test Service"
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
OperationForParameters,
|
|
6
|
-
ParameterGetWithIfParameters,
|
|
7
|
-
ParameterGetWithFilterParameters,
|
|
8
|
-
ModelGetParameters,
|
|
9
|
-
ModelPutParameters,
|
|
10
|
-
} from "./parameters";
|
|
11
|
-
import {
|
|
12
|
-
OperationFor204Response,
|
|
13
|
-
ParameterGetWithIf204Response,
|
|
14
|
-
ParameterGetWithFilter204Response,
|
|
15
|
-
ModelGet200Response,
|
|
16
|
-
ModelPut204Response,
|
|
17
|
-
} from "./responses";
|
|
18
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
19
|
-
|
|
20
|
-
export interface OperationFor {
|
|
21
|
-
get(
|
|
22
|
-
options?: OperationForParameters
|
|
23
|
-
): StreamableMethod<OperationFor204Response>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface ParameterGetWithIf {
|
|
27
|
-
get(
|
|
28
|
-
options: ParameterGetWithIfParameters
|
|
29
|
-
): StreamableMethod<ParameterGetWithIf204Response>;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ParameterGetWithFilter {
|
|
33
|
-
get(
|
|
34
|
-
options: ParameterGetWithFilterParameters
|
|
35
|
-
): StreamableMethod<ParameterGetWithFilter204Response>;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface ModelGet {
|
|
39
|
-
get(options?: ModelGetParameters): StreamableMethod<ModelGet200Response>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface ModelPut {
|
|
43
|
-
put(options: ModelPutParameters): StreamableMethod<ModelPut204Response>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface Routes {
|
|
47
|
-
/** Resource for '/special-words/operation/for' has methods for the following verbs: get */
|
|
48
|
-
(path: "/special-words/operation/for"): OperationFor;
|
|
49
|
-
/** Resource for '/special-words/parameter/if' has methods for the following verbs: get */
|
|
50
|
-
(path: "/special-words/parameter/if"): ParameterGetWithIf;
|
|
51
|
-
/** Resource for '/special-words/parameter/filter' has methods for the following verbs: get */
|
|
52
|
-
(path: "/special-words/parameter/filter"): ParameterGetWithFilter;
|
|
53
|
-
/** Resource for '/special-words/model/get' has methods for the following verbs: get */
|
|
54
|
-
(path: "/special-words/model/get"): ModelGet;
|
|
55
|
-
/** Resource for '/special-words/model/put' has methods for the following verbs: put */
|
|
56
|
-
(path: "/special-words/model/put"): ModelPut;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type SpecialWordsClient = Client & {
|
|
60
|
-
path: Routes;
|
|
61
|
-
};
|