@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,28 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
export function buildMultiCollection(
|
|
5
|
-
queryParameters: string[],
|
|
6
|
-
parameterName: string
|
|
7
|
-
) {
|
|
8
|
-
return queryParameters
|
|
9
|
-
.map((item, index) => {
|
|
10
|
-
if (index === 0) {
|
|
11
|
-
return item;
|
|
12
|
-
}
|
|
13
|
-
return `${parameterName}=${item}`;
|
|
14
|
-
})
|
|
15
|
-
.join("&");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function buildPipeCollection(queryParameters: string[]): string {
|
|
19
|
-
return queryParameters.join("|");
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function buildSsvCollection(queryParameters: string[]): string {
|
|
23
|
-
return queryParameters.join(" ");
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function buildTsvCollection(queryParameters: string[]) {
|
|
27
|
-
return queryParameters.join("\t");
|
|
28
|
-
}
|
|
@@ -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: CollectionFormatClient
|
|
12
|
-
packageDetails:
|
|
13
|
-
name: "@msinternal/collectionFormat"
|
|
14
|
-
description: "CollectionFormat Test Service"
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
ModelSpreadAsRequestBodyParameters,
|
|
6
|
-
AliasSpreadAsRequestBodyParameters,
|
|
7
|
-
AliasSpreadAsRequestParameterParameters,
|
|
8
|
-
AliasSpreadWithMultipleParametersParameters,
|
|
9
|
-
} from "./parameters";
|
|
10
|
-
import {
|
|
11
|
-
ModelSpreadAsRequestBody204Response,
|
|
12
|
-
AliasSpreadAsRequestBody204Response,
|
|
13
|
-
AliasSpreadAsRequestParameter204Response,
|
|
14
|
-
AliasSpreadWithMultipleParameters204Response,
|
|
15
|
-
} from "./responses";
|
|
16
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
17
|
-
|
|
18
|
-
export interface ModelSpreadAsRequestBody {
|
|
19
|
-
put(
|
|
20
|
-
options?: ModelSpreadAsRequestBodyParameters
|
|
21
|
-
): StreamableMethod<ModelSpreadAsRequestBody204Response>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface AliasSpreadAsRequestBody {
|
|
25
|
-
put(
|
|
26
|
-
options?: AliasSpreadAsRequestBodyParameters
|
|
27
|
-
): StreamableMethod<AliasSpreadAsRequestBody204Response>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface AliasSpreadAsRequestParameter {
|
|
31
|
-
put(
|
|
32
|
-
options: AliasSpreadAsRequestParameterParameters
|
|
33
|
-
): StreamableMethod<AliasSpreadAsRequestParameter204Response>;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface AliasSpreadWithMultipleParameters {
|
|
37
|
-
put(
|
|
38
|
-
options: AliasSpreadWithMultipleParametersParameters
|
|
39
|
-
): StreamableMethod<AliasSpreadWithMultipleParameters204Response>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface Routes {
|
|
43
|
-
/** Resource for '/parameters/spread/model/request-body' has methods for the following verbs: put */
|
|
44
|
-
(path: "/parameters/spread/model/request-body"): ModelSpreadAsRequestBody;
|
|
45
|
-
/** Resource for '/parameters/spread/alias/request-body' has methods for the following verbs: put */
|
|
46
|
-
(path: "/parameters/spread/alias/request-body"): AliasSpreadAsRequestBody;
|
|
47
|
-
/** Resource for '/parameters/spread/alias/request-parameter/\{id\}' has methods for the following verbs: put */
|
|
48
|
-
(
|
|
49
|
-
path: "/parameters/spread/alias/request-parameter/{id}",
|
|
50
|
-
id: string
|
|
51
|
-
): AliasSpreadAsRequestParameter;
|
|
52
|
-
/** Resource for '/parameters/spread/alias/multiple-parameters/\{id\}' has methods for the following verbs: put */
|
|
53
|
-
(
|
|
54
|
-
path: "/parameters/spread/alias/multiple-parameters/{id}",
|
|
55
|
-
id: string
|
|
56
|
-
): AliasSpreadWithMultipleParameters;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type ParametersSpreadClient = Client & {
|
|
60
|
-
path: Routes;
|
|
61
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import ParametersSpread from "./parametersSpread";
|
|
5
|
-
|
|
6
|
-
export * from "./parametersSpread";
|
|
7
|
-
export * from "./parameters";
|
|
8
|
-
export * from "./responses";
|
|
9
|
-
export * from "./clientDefinitions";
|
|
10
|
-
export * from "./models";
|
|
11
|
-
|
|
12
|
-
export default ParametersSpread;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
|
|
5
|
-
import { RequestParameters } from "@azure-rest/core-client";
|
|
6
|
-
import { BodyParameter } from "./models";
|
|
7
|
-
|
|
8
|
-
export interface ModelSpreadAsRequestBodyBodyParam {
|
|
9
|
-
body?: BodyParameter;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type ModelSpreadAsRequestBodyParameters =
|
|
13
|
-
ModelSpreadAsRequestBodyBodyParam & RequestParameters;
|
|
14
|
-
|
|
15
|
-
export interface AliasSpreadAsRequestBodyBodyParam {
|
|
16
|
-
body?: { name: string };
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type AliasSpreadAsRequestBodyParameters =
|
|
20
|
-
AliasSpreadAsRequestBodyBodyParam & RequestParameters;
|
|
21
|
-
|
|
22
|
-
export interface AliasSpreadAsRequestParameterHeaders {
|
|
23
|
-
"x-ms-test-header": string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface AliasSpreadAsRequestParameterBodyParam {
|
|
27
|
-
body?: { name: string };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface AliasSpreadAsRequestParameterHeaderParam {
|
|
31
|
-
headers: RawHttpHeadersInput & AliasSpreadAsRequestParameterHeaders;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type AliasSpreadAsRequestParameterParameters =
|
|
35
|
-
AliasSpreadAsRequestParameterHeaderParam &
|
|
36
|
-
AliasSpreadAsRequestParameterBodyParam &
|
|
37
|
-
RequestParameters;
|
|
38
|
-
|
|
39
|
-
export interface AliasSpreadWithMultipleParametersHeaders {
|
|
40
|
-
"x-ms-test-header": string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface AliasSpreadWithMultipleParametersBodyParam {
|
|
44
|
-
body?: {
|
|
45
|
-
prop1: string;
|
|
46
|
-
prop2: string;
|
|
47
|
-
prop3: string;
|
|
48
|
-
prop4: string;
|
|
49
|
-
prop5: string;
|
|
50
|
-
prop6: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface AliasSpreadWithMultipleParametersHeaderParam {
|
|
55
|
-
headers: RawHttpHeadersInput & AliasSpreadWithMultipleParametersHeaders;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type AliasSpreadWithMultipleParametersParameters =
|
|
59
|
-
AliasSpreadWithMultipleParametersHeaderParam &
|
|
60
|
-
AliasSpreadWithMultipleParametersBodyParam &
|
|
61
|
-
RequestParameters;
|
|
@@ -1,35 +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 { ParametersSpreadClient } from "./clientDefinitions";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Initialize a new instance of `ParametersSpreadClient`
|
|
10
|
-
* @param options - the parameter for all optional parameters
|
|
11
|
-
*/
|
|
12
|
-
export default function createClient(
|
|
13
|
-
options: ClientOptions = {}
|
|
14
|
-
): ParametersSpreadClient {
|
|
15
|
-
const baseUrl = options.baseUrl ?? `http://localhost:3000`;
|
|
16
|
-
options.apiVersion = options.apiVersion ?? "1.0.0";
|
|
17
|
-
const userAgentInfo = `azsdk-js-parameterSpread-rest/1.0.0-beta.1`;
|
|
18
|
-
const userAgentPrefix =
|
|
19
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
20
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
21
|
-
: `${userAgentInfo}`;
|
|
22
|
-
options = {
|
|
23
|
-
...options,
|
|
24
|
-
userAgentOptions: {
|
|
25
|
-
userAgentPrefix,
|
|
26
|
-
},
|
|
27
|
-
loggingOptions: {
|
|
28
|
-
logger: options.loggingOptions?.logger ?? logger.info,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const client = getClient(baseUrl, options) as ParametersSpreadClient;
|
|
33
|
-
|
|
34
|
-
return client;
|
|
35
|
-
}
|
|
@@ -1,25 +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 ModelSpreadAsRequestBody204Response 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 AliasSpreadAsRequestBody204Response 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 AliasSpreadAsRequestParameter204Response 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 AliasSpreadWithMultipleParameters204Response
|
|
23
|
-
extends HttpResponse {
|
|
24
|
-
status: "204";
|
|
25
|
-
}
|
|
@@ -1,12 +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
|
-
packageDetails:
|
|
12
|
-
name: "@msinternal/parameterSpread"
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
PropertyJsonParameters,
|
|
6
|
-
PropertyClientParameters,
|
|
7
|
-
PropertyLanguageParameters,
|
|
8
|
-
PropertyJsonAndClientParameters,
|
|
9
|
-
OperationParameters,
|
|
10
|
-
ParameterParameters,
|
|
11
|
-
} from "./parameters";
|
|
12
|
-
import {
|
|
13
|
-
PropertyJson204Response,
|
|
14
|
-
PropertyClient204Response,
|
|
15
|
-
PropertyLanguage204Response,
|
|
16
|
-
PropertyJsonAndClient204Response,
|
|
17
|
-
Operation204Response,
|
|
18
|
-
Parameter204Response,
|
|
19
|
-
} from "./responses";
|
|
20
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
21
|
-
|
|
22
|
-
export interface Json {
|
|
23
|
-
post(
|
|
24
|
-
options?: PropertyJsonParameters
|
|
25
|
-
): StreamableMethod<PropertyJson204Response>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface _client {
|
|
29
|
-
post(
|
|
30
|
-
options?: PropertyClientParameters
|
|
31
|
-
): StreamableMethod<PropertyClient204Response>;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface Language {
|
|
35
|
-
post(
|
|
36
|
-
options?: PropertyLanguageParameters
|
|
37
|
-
): StreamableMethod<PropertyLanguage204Response>;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface JsonAndClient {
|
|
41
|
-
post(
|
|
42
|
-
options?: PropertyJsonAndClientParameters
|
|
43
|
-
): StreamableMethod<PropertyJsonAndClient204Response>;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface Operation {
|
|
47
|
-
post(options?: OperationParameters): StreamableMethod<Operation204Response>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface Parameter {
|
|
51
|
-
post(options: ParameterParameters): StreamableMethod<Parameter204Response>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface Routes {
|
|
55
|
-
/** Resource for '/projection/projected-name/property/json' has methods for the following verbs: post */
|
|
56
|
-
(path: "/projection/projected-name/property/json"): Json;
|
|
57
|
-
/** Resource for '/projection/projected-name/property/client' has methods for the following verbs: post */
|
|
58
|
-
(path: "/projection/projected-name/property/client"): _client;
|
|
59
|
-
/** Resource for '/projection/projected-name/property/language' has methods for the following verbs: post */
|
|
60
|
-
(path: "/projection/projected-name/property/language"): Language;
|
|
61
|
-
/** Resource for '/projection/projected-name/property/json-and-client' has methods for the following verbs: post */
|
|
62
|
-
(path: "/projection/projected-name/property/json-and-client"): JsonAndClient;
|
|
63
|
-
/** Resource for '/projection/projected-name/operation' has methods for the following verbs: post */
|
|
64
|
-
(path: "/projection/projected-name/operation"): Operation;
|
|
65
|
-
/** Resource for '/projection/projected-name/parameter' has methods for the following verbs: post */
|
|
66
|
-
(path: "/projection/projected-name/parameter"): Parameter;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type ProjectionClient = Client & {
|
|
70
|
-
path: Routes;
|
|
71
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import ProjectionClient from "./projectionClient";
|
|
5
|
-
|
|
6
|
-
export * from "./projectionClient";
|
|
7
|
-
export * from "./parameters";
|
|
8
|
-
export * from "./responses";
|
|
9
|
-
export * from "./clientDefinitions";
|
|
10
|
-
export * from "./models";
|
|
11
|
-
|
|
12
|
-
export default ProjectionClient;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
export interface JsonProjectedNameModel {
|
|
5
|
-
/** Pass in true */
|
|
6
|
-
wireName: boolean;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ClientProjectedNameModel {
|
|
10
|
-
/** Pass in true */
|
|
11
|
-
defaultName: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface LanguageProjectedNameModel {
|
|
15
|
-
/** Pass in true */
|
|
16
|
-
defaultName: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface JsonAndClientProjectedNameModel {
|
|
20
|
-
/** Pass in true */
|
|
21
|
-
wireName: boolean;
|
|
22
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
|
|
4
|
-
import { RequestParameters } from "@azure-rest/core-client";
|
|
5
|
-
import {
|
|
6
|
-
JsonProjectedNameModel,
|
|
7
|
-
ClientProjectedNameModel,
|
|
8
|
-
LanguageProjectedNameModel,
|
|
9
|
-
JsonAndClientProjectedNameModel,
|
|
10
|
-
} from "./models";
|
|
11
|
-
|
|
12
|
-
export interface PropertyJsonBodyParam {
|
|
13
|
-
body?: JsonProjectedNameModel;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type PropertyJsonParameters = PropertyJsonBodyParam & RequestParameters;
|
|
17
|
-
|
|
18
|
-
export interface PropertyClientBodyParam {
|
|
19
|
-
body?: ClientProjectedNameModel;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type PropertyClientParameters = PropertyClientBodyParam &
|
|
23
|
-
RequestParameters;
|
|
24
|
-
|
|
25
|
-
export interface PropertyLanguageBodyParam {
|
|
26
|
-
body?: LanguageProjectedNameModel;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type PropertyLanguageParameters = PropertyLanguageBodyParam &
|
|
30
|
-
RequestParameters;
|
|
31
|
-
|
|
32
|
-
export interface PropertyJsonAndClientBodyParam {
|
|
33
|
-
body?: JsonAndClientProjectedNameModel;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export type PropertyJsonAndClientParameters = PropertyJsonAndClientBodyParam &
|
|
37
|
-
RequestParameters;
|
|
38
|
-
export type OperationParameters = RequestParameters;
|
|
39
|
-
|
|
40
|
-
export interface ParameterQueryParamProperties {
|
|
41
|
-
"default-name": string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface ParameterQueryParam {
|
|
45
|
-
queryParameters: ParameterQueryParamProperties;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type ParameterParameters = ParameterQueryParam & RequestParameters;
|
|
@@ -1,35 +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 { ProjectionClient } from "./clientDefinitions";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Initialize a new instance of `ProjectionClient`
|
|
10
|
-
* @param options - the parameter for all optional parameters
|
|
11
|
-
*/
|
|
12
|
-
export default function createClient(
|
|
13
|
-
options: ClientOptions = {}
|
|
14
|
-
): ProjectionClient {
|
|
15
|
-
const baseUrl = options.baseUrl ?? `http://localhost:3000`;
|
|
16
|
-
options.apiVersion = options.apiVersion ?? "1.0.0";
|
|
17
|
-
const userAgentInfo = `azsdk-js-projection-rest/1.0.0-beta.1`;
|
|
18
|
-
const userAgentPrefix =
|
|
19
|
-
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
20
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
21
|
-
: `${userAgentInfo}`;
|
|
22
|
-
options = {
|
|
23
|
-
...options,
|
|
24
|
-
userAgentOptions: {
|
|
25
|
-
userAgentPrefix,
|
|
26
|
-
},
|
|
27
|
-
loggingOptions: {
|
|
28
|
-
logger: options.loggingOptions?.logger ?? logger.info,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const client = getClient(baseUrl, options) as ProjectionClient;
|
|
33
|
-
|
|
34
|
-
return client;
|
|
35
|
-
}
|
|
@@ -1,34 +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 PropertyJson204Response 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 PropertyClient204Response 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 PropertyLanguage204Response 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 PropertyJsonAndClient204Response extends HttpResponse {
|
|
23
|
-
status: "204";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
27
|
-
export interface Operation204Response extends HttpResponse {
|
|
28
|
-
status: "204";
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** There is no content to send for this request, but the headers may be useful. */
|
|
32
|
-
export interface Parameter204Response extends HttpResponse {
|
|
33
|
-
status: "204";
|
|
34
|
-
}
|
|
@@ -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: ProjectionClient
|
|
12
|
-
packageDetails:
|
|
13
|
-
name: "@msinternal/projection"
|
|
14
|
-
description: "Projection Test Service"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"plugins": ["@azure/azure-sdk"],
|
|
3
|
-
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
|
|
4
|
-
"rules": {
|
|
5
|
-
"@azure/azure-sdk/ts-modules-only-named": "warn",
|
|
6
|
-
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
|
|
7
|
-
"@azure/azure-sdk/ts-package-json-types": "warn",
|
|
8
|
-
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
|
|
9
|
-
"tsdoc/syntax": "warn"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# ServiceDrivenOld REST client library for JavaScript
|
|
2
|
-
|
|
3
|
-
Test that we can grow up a service spec and service deployment into a multi-versioned service with full client support.
|
|
4
|
-
|
|
5
|
-
**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**
|
|
6
|
-
|
|
7
|
-
Key links:
|
|
8
|
-
|
|
9
|
-
- [Package (NPM)](https://www.npmjs.com/package/@msinternal/srv-driven-1)
|
|
10
|
-
|
|
11
|
-
## Getting started
|
|
12
|
-
|
|
13
|
-
### Currently supported environments
|
|
14
|
-
|
|
15
|
-
- LTS versions of Node.js
|
|
16
|
-
|
|
17
|
-
### Prerequisites
|
|
18
|
-
|
|
19
|
-
- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.
|
|
20
|
-
|
|
21
|
-
### Install the `@msinternal/srv-driven-1` package
|
|
22
|
-
|
|
23
|
-
Install the ServiceDrivenOld REST client REST client library for JavaScript with `npm`:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npm install @msinternal/srv-driven-1
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### Create and authenticate a `ServiceDrivenOldClient`
|
|
30
|
-
|
|
31
|
-
To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
|
|
32
|
-
provide an instance of the desired credential type obtained from the
|
|
33
|
-
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.
|
|
34
|
-
|
|
35
|
-
To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
|
|
36
|
-
|
|
37
|
-
After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
|
|
38
|
-
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
|
|
39
|
-
can be used to authenticate the client.
|
|
40
|
-
|
|
41
|
-
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
|
|
42
|
-
AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
|
|
43
|
-
|
|
44
|
-
## Troubleshooting
|
|
45
|
-
|
|
46
|
-
### Logging
|
|
47
|
-
|
|
48
|
-
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
49
|
-
|
|
50
|
-
```javascript
|
|
51
|
-
const { setLogLevel } = require("@azure/logger");
|
|
52
|
-
|
|
53
|
-
setLogLevel("info");
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"mainEntryPointFilePath": "./types/index.d.ts",
|
|
4
|
-
"docModel": { "enabled": true },
|
|
5
|
-
"apiReport": { "enabled": true, "reportFolder": "./review" },
|
|
6
|
-
"dtsRollup": {
|
|
7
|
-
"enabled": true,
|
|
8
|
-
"untrimmedFilePath": "",
|
|
9
|
-
"publicTrimmedFilePath": "./types/srv-driven-1.d.ts"
|
|
10
|
-
},
|
|
11
|
-
"messages": {
|
|
12
|
-
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
|
|
13
|
-
"extractorMessageReporting": {
|
|
14
|
-
"ae-missing-release-tag": { "logLevel": "none" },
|
|
15
|
-
"ae-unresolved-link": { "logLevel": "none" }
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|