From 74c57ee4527283b081175c047bf11edc626d6e98 Mon Sep 17 00:00:00 2001 From: Pan Shao <97225342+pshao25@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:02:49 +0800 Subject: [PATCH] Upgrade compiler to 0.57 (#4981) --- .../bumpCompiler_2024-06-25-05-27.json | 10 + common/config/rush/pnpm-lock.yaml | 329 +++++++++--------- .../openapi-to-typespec/package.json | 24 +- .../swagger-output/swagger.json | 21 +- .../arm-agrifood/swagger-output/swagger.json | 4 +- .../tsp-output/Workspace.tsp | 12 +- .../swagger-output/swagger.json | 114 +----- .../swagger-output/swagger.json | 30 +- .../arm-sphere/swagger-output/swagger.json | 66 ++-- .../arm-storage/swagger-output/swagger.json | 52 ++- .../test/arm-test/swagger-output/swagger.json | 28 +- .../test/batch/tsp-output/routes.tsp | 36 +- .../confidentialLedger/tsp-output/routes.tsp | 8 +- .../test/keyvault/tsp-output/routes.tsp | 60 ++-- .../test/loadTest/tsp-output/routes.tsp | 20 +- .../test/qnaAuthoring/tsp-output/routes.tsp | 6 +- .../test/url/tsp-output/routes.tsp | 60 ++-- .../test/webpubsub/tsp-output/main.tsp | 4 +- .../test/webpubsub/tsp-output/models.tsp | 6 + .../test/webpubsub/tsp-output/routes.tsp | 8 + 20 files changed, 415 insertions(+), 483 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/bumpCompiler_2024-06-25-05-27.json diff --git a/common/changes/@autorest/openapi-to-typespec/bumpCompiler_2024-06-25-05-27.json b/common/changes/@autorest/openapi-to-typespec/bumpCompiler_2024-06-25-05-27.json new file mode 100644 index 0000000000..c582d81818 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/bumpCompiler_2024-06-25-05-27.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Upgrade compiler version to 0.57", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index de7d2f8c70..7429df5c48 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -15,17 +15,17 @@ dependencies: specifier: ~3.0.0 version: 3.0.255 '@azure-tools/typespec-autorest': - specifier: ^0.42.0 - version: 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + specifier: ^0.43.0 + version: 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@azure-tools/typespec-azure-resource-manager@0.43.0)(@azure-tools/typespec-client-generator-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) '@azure-tools/typespec-azure-core': - specifier: ^0.42.0 - version: 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) + specifier: ^0.43.0 + version: 0.43.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0) '@azure-tools/typespec-azure-resource-manager': - specifier: ^0.42.0 - version: 0.42.0(@azure-tools/typespec-autorest@0.42.0)(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + specifier: ^0.43.0 + version: 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) '@azure-tools/typespec-client-generator-core': - specifier: ^0.42.0 - version: 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + specifier: ^0.43.0 + version: 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) '@azure-tools/uri': specifier: ~3.1.1 version: 3.1.1 @@ -168,26 +168,26 @@ dependencies: specifier: ^6.11.0 version: 6.11.0(eslint@8.53.0)(typescript@5.2.2) '@typespec/compiler': - specifier: ^0.56.0 - version: 0.56.0 + specifier: ^0.57.0 + version: 0.57.0 '@typespec/http': - specifier: ^0.56.0 - version: 0.56.0(@typespec/compiler@0.56.0) + specifier: ^0.57.0 + version: 0.57.0(@typespec/compiler@0.57.0) '@typespec/openapi': - specifier: ^0.56.0 - version: 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + specifier: ^0.57.0 + version: 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) '@typespec/openapi3': - specifier: ^0.56.0 - version: 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/versioning@0.56.0) + specifier: ^0.57.0 + version: 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/versioning@0.57.0) '@typespec/prettier-plugin-typespec': - specifier: ^0.56.0 - version: 0.56.0 + specifier: ^0.57.0 + version: 0.57.0 '@typespec/rest': - specifier: ^0.56.0 - version: 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + specifier: ^0.57.0 + version: 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) '@typespec/versioning': - specifier: ^0.56.0 - version: 0.56.0(@typespec/compiler@0.56.0) + specifier: ^0.57.0 + version: 0.57.0(@typespec/compiler@0.57.0) ajv: specifier: ^8.6.0 version: 8.12.0 @@ -396,78 +396,78 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest@0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0): - resolution: {integrity: sha512-3cB5SiIbRDvGXpadnxwqsNhQ4A9pteGTHIpVlKpENpvzIoWU9phe+uBmGJDiQ/9CQPiLk7JncER95XYVOvn/vA==} + /@azure-tools/typespec-autorest@0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@azure-tools/typespec-azure-resource-manager@0.43.0)(@azure-tools/typespec-client-generator-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0): + resolution: {integrity: sha512-tZ9uXXOdxu2y01W9n3mzXf+IEY2MQkP/JaQaKlcOx2+dbklHNQWSDU0Vm6Gmm6l//XiF9QiI8653BiuO97czyw==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.42.0 - '@azure-tools/typespec-client-generator-core': ~0.42.0 - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 - '@typespec/openapi': ~0.56.0 - '@typespec/rest': ~0.56.0 - '@typespec/versioning': ~0.56.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) - '@azure-tools/typespec-client-generator-core': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) - '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) - dev: false - - /@azure-tools/typespec-azure-core@0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0): - resolution: {integrity: sha512-8C96RkgSWtgqsaHRMWCd2iDltFJZTGmFQiTZazZj/uRy0Wn1ikjSriSN8t1puL5SiUPd0BVJP/YXiwAfjfZYDA==} + '@azure-tools/typespec-azure-core': ~0.43.0 + '@azure-tools/typespec-azure-resource-manager': ~0.43.0 + '@azure-tools/typespec-client-generator-core': ~0.43.0 + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 + '@typespec/openapi': ~0.57.0 + '@typespec/rest': ~0.57.0 + '@typespec/versioning': ~0.57.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.43.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0) + '@azure-tools/typespec-azure-resource-manager': 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) + '@azure-tools/typespec-client-generator-core': 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) + '@typespec/openapi': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/rest': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/versioning': 0.57.0(@typespec/compiler@0.57.0) + dev: false + + /@azure-tools/typespec-azure-core@0.43.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0): + resolution: {integrity: sha512-B1r0i3segJ7RuNXxcAMBy8H2t+jTkaf74dkyUWD0HIFPkhETN0uR59nuor+s+LoLU8yI4JypOFSNZt6e1rod8w==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 - '@typespec/rest': ~0.56.0 + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 + '@typespec/rest': ~0.57.0 dependencies: - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) - '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) + '@typespec/rest': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) dev: false - /@azure-tools/typespec-azure-resource-manager@0.42.0(@azure-tools/typespec-autorest@0.42.0)(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0): - resolution: {integrity: sha512-RCqcrhE1yniAih5vDFOC5K4MpDr9XmG8qBB39G49/KyEKnWOQ3Nwvt/6fXaU42D9X2L6kfEAIz/AdiSJ/H5O6w==} + /@azure-tools/typespec-azure-resource-manager@0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0): + resolution: {integrity: sha512-0GQL+/o1u+PAB63FpYz3sy3ZgZvCtk5T4sDAnICnV23v2YWIONDMUfxxd0x40xJbY6PkcwwHDpBLNMqajf2H6A==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-autorest': ~0.42.0 - '@azure-tools/typespec-azure-core': ~0.42.0 - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 - '@typespec/openapi': ~0.56.0 - '@typespec/rest': ~0.56.0 - '@typespec/versioning': ~0.56.0 - dependencies: - '@azure-tools/typespec-autorest': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) - '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) - '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + '@azure-tools/typespec-azure-core': ~0.43.0 + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 + '@typespec/openapi': ~0.57.0 + '@typespec/rest': ~0.57.0 + '@typespec/versioning': ~0.57.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.43.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) + '@typespec/openapi': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/rest': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/versioning': 0.57.0(@typespec/compiler@0.57.0) change-case: 5.4.4 pluralize: 8.0.0 dev: false - /@azure-tools/typespec-client-generator-core@0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0): - resolution: {integrity: sha512-yjT71LdErZ4/BNwTrfvqCcaZqYhZm/E5/58LibbQ/5xJusaacBjTGe5iRpDi5Xf5ETQ6twFlZ6Y1ovWwgYDZag==} + /@azure-tools/typespec-client-generator-core@0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0): + resolution: {integrity: sha512-rssB/zsg89wstzJC1MWzbd8oPpqbgoftkp9G/NP3BoMb/gCP5uRLggwlSUAgnoU2Lt0jBUKcMlqEiVLTAkY9LA==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.42.0 - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 - '@typespec/rest': ~0.56.0 - '@typespec/versioning': ~0.56.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) - '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + '@azure-tools/typespec-azure-core': ~0.43.0 + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 + '@typespec/rest': ~0.57.0 + '@typespec/versioning': ~0.57.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.43.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) + '@typespec/rest': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/versioning': 0.57.0(@typespec/compiler@0.57.0) change-case: 5.4.4 pluralize: 8.0.0 dev: false @@ -498,20 +498,12 @@ packages: '@babel/highlight': 7.23.4 dev: false - /@babel/code-frame@7.23.5: - resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.23.4 - chalk: 2.4.2 - dev: false - /@babel/code-frame@7.24.2: resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.24.5 - picocolors: 1.0.0 + picocolors: 1.0.1 dev: false /@babel/compat-data@7.23.3: @@ -524,7 +516,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 '@babel/generator': 7.23.3 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3) @@ -601,7 +593,7 @@ packages: '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 dev: false /@babel/helper-plugin-utils@7.22.5: @@ -658,7 +650,7 @@ packages: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 chalk: 2.4.2 js-tokens: 4.0.0 dev: false @@ -670,7 +662,7 @@ packages: '@babel/helper-validator-identifier': 7.24.5 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.0 + picocolors: 1.0.1 dev: false /@babel/parser@7.23.3: @@ -812,7 +804,7 @@ packages: resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 '@babel/parser': 7.23.3 '@babel/types': 7.23.3 dev: false @@ -821,7 +813,7 @@ packages: resolution: {integrity: sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 '@babel/generator': 7.23.3 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 @@ -840,7 +832,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 to-fast-properties: 2.0.0 dev: false @@ -1296,7 +1288,7 @@ packages: resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: - semver: 7.5.4 + semver: 7.6.1 dev: false /@pkgjs/parseargs@0.11.0: @@ -1721,7 +1713,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.4 + semver: 7.6.1 tsutils: 3.21.0(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -1742,7 +1734,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.4 + semver: 7.6.1 ts-api-utils: 1.0.3(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -1763,7 +1755,7 @@ packages: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) eslint: 8.53.0 eslint-scope: 5.1.1 - semver: 7.5.4 + semver: 7.6.1 transitivePeerDependencies: - supports-color - typescript @@ -1782,7 +1774,7 @@ packages: '@typescript-eslint/types': 6.11.0 '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.2.2) eslint: 8.53.0 - semver: 7.5.4 + semver: 7.6.1 transitivePeerDependencies: - supports-color - typescript @@ -1804,86 +1796,86 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler@0.56.0: - resolution: {integrity: sha512-K+VhXycoeqcoSGtB0/l1XYco4V2qRsCOOwqklVM4Yew7kTcKVfz7CT7a6a2OKWDMNg5iijZtRBoM5YF50XtQug==} + /@typespec/compiler@0.57.0: + resolution: {integrity: sha512-Z5L7J90Ol21IbzU+rBD2wzKy2vJ2Yg2FIzi+yB5rtb7/c4oBea/CgEByMVHBtT7uw45ZXJpHOiepuGSPVXw2EA==} engines: {node: '>=18.0.0'} hasBin: true dependencies: '@babel/code-frame': 7.24.2 - ajv: 8.12.0 + ajv: 8.13.0 change-case: 5.4.4 globby: 14.0.1 mustache: 4.2.0 - picocolors: 1.0.0 + picocolors: 1.0.1 prettier: 3.2.5 prompts: 2.4.2 - semver: 7.6.1 + semver: 7.6.2 vscode-languageserver: 9.0.1 vscode-languageserver-textdocument: 1.0.11 yaml: 2.4.2 yargs: 17.7.2 dev: false - /@typespec/http@0.56.0(@typespec/compiler@0.56.0): - resolution: {integrity: sha512-f/tpHRWev9bnAtNPFkfCU/5SFou9glA/rPDY0m2W5bK6EG1/6/TKKKz5FoKPA4xvc2dQ5vu/ouGLb4i5UzXvWQ==} + /@typespec/http@0.57.0(@typespec/compiler@0.57.0): + resolution: {integrity: sha512-k3bWOTPNqlRB3/TmrXVBtObmxj2J20l2FnhGXvs+tjdtbXLxCQWmvQz6xlne9nkLAtWVB/pQRUn+oMJfhWta3w==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.56.0 + '@typespec/compiler': ~0.57.0 dependencies: - '@typespec/compiler': 0.56.0 + '@typespec/compiler': 0.57.0 dev: false - /@typespec/openapi3@0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/versioning@0.56.0): - resolution: {integrity: sha512-55JPUP7dFk4iXn4fNKZEs76j7hAdlWfoMWNPsQPRJCP//KWCtNXfTP+/TTVPVv1L/6HztbXyPV0agKZwyS7gDw==} + /@typespec/openapi3@0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/versioning@0.57.0): + resolution: {integrity: sha512-spNLzwCTduPISJBTWhqsMLTjuGC3Tdh/FVI1rTGnRunB7ZXjhRyz031o1bCe2BZeW1w1sacZGfe+ba8sXqgMxA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 - '@typespec/openapi': ~0.56.0 - '@typespec/versioning': ~0.56.0 - dependencies: - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) - '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 + '@typespec/openapi': ~0.57.0 + '@typespec/versioning': ~0.57.0 + dependencies: + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) + '@typespec/openapi': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/versioning': 0.57.0(@typespec/compiler@0.57.0) yaml: 2.4.2 dev: false - /@typespec/openapi@0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0): - resolution: {integrity: sha512-q8+IHRglXBm3slvonRLSNYN2fX7plbWA+ugIiMJZTeyc3enqfxPqMGA8BCiAFV3kwP0uPPpIXbCSIVhHgkONbA==} + /@typespec/openapi@0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0): + resolution: {integrity: sha512-35wK/BqjOXSlhWuGMwoYN3FSgIYFOKtw8ot4ErcgmxAGuKaS2GkUhZvtQJXUn2ByU0Fl4jqslPmTz8SEcz7rbw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 dependencies: - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) dev: false - /@typespec/prettier-plugin-typespec@0.56.0: - resolution: {integrity: sha512-W5pnctaqSAfeynys6XZKpJ01MIcEEH6XoCMk8Z0rzXaRRoF0v5lB3w8L7s6kRMmi48P3zd942xvfxHr5H1R/0Q==} + /@typespec/prettier-plugin-typespec@0.57.0: + resolution: {integrity: sha512-nWrgv/yPGYfE4FL6ON3BpYZnvCdZYvE6yrgcr/ifqZnMBJfCLl4sk+tk3JoVysj6kTTWaFME7GQ/X/guMvbjUA==} dependencies: prettier: 3.2.5 dev: false - /@typespec/rest@0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0): - resolution: {integrity: sha512-8w4WhWDcpEQNW8bB1BHhiBxIQUChDJtyq/n9p2OI/Bm1wncd61y/ZNOtcxmlKq8uB9d+dzHiZdEfqFCR8HF8/Q==} + /@typespec/rest@0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0): + resolution: {integrity: sha512-mZj76Kf+cmH38pYA6LT8Zz7QjuR3fdQo5bc8pXhKMwLq9vRqNLz6Z9InbOeo8zY+xP0GfUwEU9kXczmCc8gyRA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.56.0 - '@typespec/http': ~0.56.0 + '@typespec/compiler': ~0.57.0 + '@typespec/http': ~0.57.0 dependencies: - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) dev: false - /@typespec/versioning@0.56.0(@typespec/compiler@0.56.0): - resolution: {integrity: sha512-j7IN9XFyGn3LH6IOJkinEvk9sDncsxiWPULOAe0VQ+D/dtCfLawDMUALnvklMDRKeD1OOUPSCjjUAp9OB0f7YA==} + /@typespec/versioning@0.57.0(@typespec/compiler@0.57.0): + resolution: {integrity: sha512-kk6zCNSwcqqYB9isNNagTy+Zv6wEIRA4NkcZ/X1riTj2zhJwKsIFNXQWm1yxpZn+BY4+1QtuaQHuBLo8HbgR/w==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.56.0 + '@typespec/compiler': ~0.57.0 dependencies: - '@typespec/compiler': 0.56.0 + '@typespec/compiler': 0.57.0 dev: false /@ungap/structured-clone@1.2.0: @@ -2181,6 +2173,15 @@ packages: uri-js: 4.4.1 dev: false + /ajv@8.13.0: + resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: false + /ajv@8.9.0: resolution: {integrity: sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==} dependencies: @@ -2580,7 +2581,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.4 + semver: 7.6.1 dev: false /bundle-name@3.0.0: @@ -4913,7 +4914,7 @@ packages: '@babel/parser': 7.23.3 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.5.4 + semver: 7.6.1 transitivePeerDependencies: - supports-color dev: false @@ -5194,7 +5195,7 @@ packages: resolution: {integrity: sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==} engines: {node: '>= 10.14.2'} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 '@jest/types': 26.6.2 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -5209,7 +5210,7 @@ packages: resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -5414,7 +5415,7 @@ packages: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.5.4 + semver: 7.6.1 transitivePeerDependencies: - supports-color dev: false @@ -5728,7 +5729,7 @@ packages: resolution: {integrity: sha512-Yj9mA8fPiVgOUpByoTZO5pNrcl5Yk37FcSHsUINpAsaBIEZIuqcCclDZJCVxqQShDsmYX8QG63svJiTbOATZwg==} engines: {node: 14 || >=16.14} dependencies: - semver: 7.5.4 + semver: 7.6.1 dev: false /lru-cache@5.1.1: @@ -5753,7 +5754,7 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} dependencies: - semver: 7.5.4 + semver: 7.6.1 dev: false /make-error@1.3.6: @@ -6116,7 +6117,7 @@ packages: resolution: {integrity: sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==} engines: {node: '>=10'} dependencies: - semver: 7.5.4 + semver: 7.6.1 dev: false /node-domexception@1.0.0: @@ -6630,7 +6631,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -6714,6 +6715,10 @@ packages: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: false + /picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + dev: false + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -7245,6 +7250,12 @@ packages: hasBin: true dev: false + /semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + dev: false + /sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: @@ -9449,15 +9460,15 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-jMP5dk+q3YF4vSbDHWpxmaBYQMN0u5ya9VPFaV7+Xz9sHBK4lzICmeo+a+1W9xEqnjhom+BDma3ZMkzfCAwNRg==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-9YYhU9b3KOm8wKYwa3zFQBE5tKLSPCSQ1+IW63Z7xEMJ4T8BIo25l0Z3dhz0pwMFx8NtftauMplKNimQVjh0UQ==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 dependencies: - '@azure-tools/typespec-autorest': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) - '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) - '@azure-tools/typespec-azure-resource-manager': 0.42.0(@azure-tools/typespec-autorest@0.42.0)(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) - '@azure-tools/typespec-client-generator-core': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + '@azure-tools/typespec-autorest': 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@azure-tools/typespec-azure-resource-manager@0.43.0)(@azure-tools/typespec-client-generator-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) + '@azure-tools/typespec-azure-core': 0.43.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0) + '@azure-tools/typespec-azure-resource-manager': 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) + '@azure-tools/typespec-client-generator-core': 0.43.0(@azure-tools/typespec-azure-core@0.43.0)(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/rest@0.57.0)(@typespec/versioning@0.57.0) '@types/fs-extra': 9.0.13 '@types/lodash': 4.14.201 '@types/node': 20.9.0 @@ -9466,13 +9477,13 @@ packages: '@types/webpack': 5.28.5(webpack-cli@5.1.4) '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) - '@typespec/compiler': 0.56.0 - '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) - '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/openapi3': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/versioning@0.56.0) - '@typespec/prettier-plugin-typespec': 0.56.0 - '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) - '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/compiler': 0.57.0 + '@typespec/http': 0.57.0(@typespec/compiler@0.57.0) + '@typespec/openapi': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/openapi3': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0)(@typespec/openapi@0.57.0)(@typespec/versioning@0.57.0) + '@typespec/prettier-plugin-typespec': 0.57.0 + '@typespec/rest': 0.57.0(@typespec/compiler@0.57.0)(@typespec/http@0.57.0) + '@typespec/versioning': 0.57.0(@typespec/compiler@0.57.0) chalk: 4.1.2 change-case: 5.0.2 change-case-all: 2.1.0 diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index cd6b09e9ea..88b882f480 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -42,16 +42,16 @@ "@azure-tools/codegen": "~2.10.0", "@autorest/extension-base": "~3.6.0", "@autorest/codemodel": "~4.20.0", - "@typespec/compiler": "^0.56.0", - "@typespec/rest": "^0.56.0", - "@typespec/http": "^0.56.0", - "@typespec/versioning": "^0.56.0", - "@typespec/prettier-plugin-typespec": "^0.56.0", - "@azure-tools/typespec-azure-core": "^0.42.0", - "@azure-tools/typespec-autorest": "^0.42.0", - "@azure-tools/typespec-azure-resource-manager": "^0.42.0", - "@typespec/openapi": "^0.56.0", - "@typespec/openapi3": "^0.56.0", + "@typespec/compiler": "^0.57.0", + "@typespec/rest": "^0.57.0", + "@typespec/http": "^0.57.0", + "@typespec/versioning": "^0.57.0", + "@typespec/prettier-plugin-typespec": "^0.57.0", + "@azure-tools/typespec-azure-core": "^0.43.0", + "@azure-tools/typespec-autorest": "^0.43.0", + "@azure-tools/typespec-azure-resource-manager": "^0.43.0", + "@typespec/openapi": "^0.57.0", + "@typespec/openapi3": "^0.57.0", "prettier": "~3.1.0", "lodash": "~4.17.20", "pluralize": "^8.0.0", @@ -68,8 +68,8 @@ "fs-extra": "^10.1.0", "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", - "@azure-tools/typespec-autorest": "^0.42.0", - "@azure-tools/typespec-client-generator-core": "^0.42.0", + "@azure-tools/typespec-autorest": "^0.43.0", + "@azure-tools/typespec-client-generator-core": "^0.43.0", "webpack-cli": "~5.1.4", "webpack": "~5.89.0", "@typescript-eslint/eslint-plugin": "^6.11.0", diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json index 1ddc7f20fc..50cc58f26a 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json @@ -480,7 +480,7 @@ ], "x-ms-enum": { "name": "AlignMode", - "modelAsString": true + "modelAsString": false } }, "AlignPolicy": { @@ -655,6 +655,17 @@ "score" ] }, + "ApiVersion": { + "type": "string", + "description": "Anomaly Detector API version (for example, v1.0).", + "enum": [ + "v1.1-preview.1" + ], + "x-ms-enum": { + "name": "ApiVersion", + "modelAsString": false + } + }, "Azure.Core.Foundations.Error": { "type": "object", "description": "The error object.", @@ -805,7 +816,7 @@ ], "x-ms-enum": { "name": "DataSchema", - "modelAsString": true + "modelAsString": false } }, "DetectRequest": { @@ -959,7 +970,7 @@ ], "x-ms-enum": { "name": "DetectionStatus", - "modelAsString": true + "modelAsString": false } }, "DiagnosticsInfo": { @@ -1454,7 +1465,7 @@ ], "x-ms-enum": { "name": "ModelStatus", - "modelAsString": true + "modelAsString": false } }, "PagedModelSnapshot": { @@ -1495,7 +1506,7 @@ ], "x-ms-enum": { "name": "TimeGranularity", - "modelAsString": true, + "modelAsString": false, "values": [ { "name": "yearly", diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json index 2f17a75df7..a0c0b0058c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json @@ -2055,7 +2055,7 @@ "kind" ] }, - "Azure.ResourceManager.Foundations.CheckNameAvailabilityReason": { + "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason": { "type": "string", "description": "Possible reasons for a name not being available.", "enum": [ @@ -2102,7 +2102,7 @@ "description": "Indicates if the resource name is available." }, "reason": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.CheckNameAvailabilityReason", + "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason", "description": "The reason why the given name is not available." }, "message": { diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 7e8b9ab52a..2594e836a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -220,12 +220,12 @@ interface Workspaces { #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("PrivateLinkResources_List") @summary(""" -Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. -Each "private link resource" is a connection endpoint (IP address) to the resource. -Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. -Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. -Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". -""") + Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + Each "private link resource" is a connection endpoint (IP address) to the resource. + Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + """) @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") @get list( diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json index a83ddf4610..7aab42171b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json @@ -314,6 +314,10 @@ "$ref": "#/definitions/DataProduct" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -720,6 +724,10 @@ "$ref": "#/definitions/DataType" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -1433,90 +1441,6 @@ "storageAccountSasToken" ] }, - "Azure.ResourceManager.Foundations.ManagedServiceIdentity": { - "type": "object", - "description": "The properties of the managed service identities assigned to this resource.", - "properties": { - "tenantId": { - "type": "string", - "description": "The Active Directory tenant id of the principal.", - "readOnly": true - }, - "principalId": { - "type": "string", - "description": "The active directory identifier of this principal.", - "readOnly": true - }, - "type": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedServiceIdentityType", - "description": "The type of managed identity assigned to this resource." - }, - "userAssignedIdentities": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentities", - "description": "The identities assigned to this resource by the user." - } - }, - "required": [ - "type" - ] - }, - "Azure.ResourceManager.Foundations.ManagedServiceIdentityType": { - "type": "string", - "description": "The kind of managed identity assigned to this resource.", - "enum": [ - "None", - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned" - ], - "x-ms-enum": { - "name": "ManagedServiceIdentityType", - "modelAsString": true, - "values": [ - { - "name": "None", - "value": "None", - "description": "No managed identity." - }, - { - "name": "SystemAssigned", - "value": "SystemAssigned", - "description": "System assigned managed identity." - }, - { - "name": "UserAssigned", - "value": "UserAssigned", - "description": "User assigned managed identity." - }, - { - "name": "SystemAndUserAssigned", - "value": "SystemAssigned, UserAssigned", - "description": "System and user assigned managed identity." - } - ] - } - }, - "Azure.ResourceManager.Foundations.UserAssignedIdentities": { - "type": "object", - "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.\",", - "additionalProperties": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentity" - } - }, - "Azure.ResourceManager.Foundations.UserAssignedIdentity": { - "type": "object", - "description": "A managed identity assigned by the user.", - "properties": { - "clientId": { - "type": "string", - "description": "The active directory client identifier for this principal." - }, - "principalId": { - "type": "string", - "description": "The active directory identifier for this principal." - } - } - }, "ConsumptionEndpointsProperties": { "type": "object", "description": "Details of Consumption Properties", @@ -1648,14 +1572,10 @@ "properties": { "$ref": "#/definitions/DataProductProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true }, "identity": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedServiceIdentity", + "$ref": "../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity", "description": "The managed service identities assigned to this resource." } }, @@ -1918,7 +1838,7 @@ "description": "The type used for update operations of the DataProduct.", "properties": { "identity": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedServiceIdentity", + "$ref": "../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity", "description": "The managed service identities assigned to this resource." }, "tags": { @@ -2031,11 +1951,7 @@ "properties": { "$ref": "#/definitions/DataProductsCatalogProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -2094,11 +2010,7 @@ "properties": { "$ref": "#/definitions/DataTypeProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json index 457ae2b932..9dc6eb5aeb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json @@ -244,6 +244,10 @@ "$ref": "#/definitions/TrafficController" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -520,6 +524,10 @@ "$ref": "#/definitions/Association" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -812,6 +820,10 @@ "$ref": "#/definitions/Frontend" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -964,11 +976,7 @@ "properties": { "$ref": "#/definitions/AssociationProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -1097,11 +1105,7 @@ "properties": { "$ref": "#/definitions/FrontendProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -1227,11 +1231,7 @@ "properties": { "$ref": "#/definitions/TrafficControllerProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json index 594a134b5c..d961fb417e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json @@ -271,6 +271,10 @@ "$ref": "#/definitions/Catalog" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -908,6 +912,10 @@ "$ref": "#/definitions/Image" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -1511,6 +1519,10 @@ "$ref": "#/definitions/Product" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -1960,6 +1972,10 @@ "$ref": "#/definitions/DeviceGroup" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -2539,6 +2555,10 @@ "$ref": "#/definitions/Deployment" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -2857,6 +2877,10 @@ "$ref": "#/definitions/Device" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -3278,11 +3302,7 @@ "properties": { "$ref": "#/definitions/CatalogProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -3343,11 +3363,7 @@ "properties": { "$ref": "#/definitions/CertificateProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -3513,11 +3529,7 @@ "properties": { "$ref": "#/definitions/DeploymentProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -3590,11 +3602,7 @@ "properties": { "$ref": "#/definitions/DeviceProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -3610,11 +3618,7 @@ "properties": { "$ref": "#/definitions/DeviceGroupProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -3877,11 +3881,7 @@ "properties": { "$ref": "#/definitions/ImageProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -4190,11 +4190,7 @@ "properties": { "$ref": "#/definitions/ProductProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json index 097705cad8..b079d1b6df 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json @@ -431,7 +431,7 @@ ], "x-ms-enum": { "name": "StorageAccountExpand", - "modelAsString": true + "modelAsString": false } }, { @@ -522,6 +522,10 @@ "$ref": "#/definitions/StorageAccount" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -5629,7 +5633,7 @@ ], "x-ms-enum": { "name": "AccessTier", - "modelAsString": true + "modelAsString": false } }, "AccountImmutabilityPolicyProperties": { @@ -5742,7 +5746,7 @@ ], "x-ms-enum": { "name": "AccountStatus", - "modelAsString": true + "modelAsString": false } }, "AccountType": { @@ -5882,9 +5886,9 @@ ] } }, - "Azure.ResourceManager.Foundations.SkuTier": { + "Azure.ResourceManager.CommonTypes.SkuTier": { "type": "string", - "description": "Available service tiers for the SKU.", + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", "enum": [ "Free", "Basic", @@ -5893,7 +5897,7 @@ ], "x-ms-enum": { "name": "SkuTier", - "modelAsString": true, + "modelAsString": false, "values": [ { "name": "Free", @@ -5918,20 +5922,6 @@ ] } }, - "Azure.ResourceManager.Foundations.UserAssignedIdentity": { - "type": "object", - "description": "A managed identity assigned by the user.", - "properties": { - "clientId": { - "type": "string", - "description": "The active directory client identifier for this principal." - }, - "principalId": { - "type": "string", - "description": "The active directory identifier for this principal." - } - } - }, "AzureEntityResource": { "type": "object", "description": "The resource model definition for an Azure Resource Manager resource with an etag.", @@ -7471,7 +7461,7 @@ ], "x-ms-enum": { "name": "HttpProtocol", - "modelAsString": true + "modelAsString": false } }, "IPRule": { @@ -7520,7 +7510,7 @@ "type": "object", "description": "Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned identity is permitted here.", "additionalProperties": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentity" + "$ref": "../../common-types/resource-management/v3/managedidentity.json#/definitions/UserAssignedIdentity" } } }, @@ -7751,7 +7741,7 @@ ], "x-ms-enum": { "name": "KeyPermission", - "modelAsString": true + "modelAsString": false } }, "KeyPolicy": { @@ -8757,7 +8747,7 @@ ], "x-ms-enum": { "name": "DefaultAction", - "modelAsString": true + "modelAsString": false } } }, @@ -9216,7 +9206,7 @@ ], "x-ms-enum": { "name": "ProvisioningState", - "modelAsString": true + "modelAsString": false } }, "PublicAccess": { @@ -9229,7 +9219,7 @@ ], "x-ms-enum": { "name": "PublicAccess", - "modelAsString": true + "modelAsString": false } }, "PublicNetworkAccess": { @@ -9328,7 +9318,7 @@ ], "x-ms-enum": { "name": "Reason", - "modelAsString": true + "modelAsString": false } }, "ReasonCode": { @@ -9842,7 +9832,7 @@ "description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType." }, "tier": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.SkuTier", + "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.SkuTier", "description": "The SKU tier. This is based on the SKU name.", "readOnly": true } @@ -9888,7 +9878,7 @@ "description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType." }, "tier": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.SkuTier", + "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.SkuTier", "description": "The SKU tier. This is based on the SKU name.", "readOnly": true }, @@ -10080,7 +10070,7 @@ "x-ms-client-flatten": true }, "identity": { - "$ref": "../../common-types/resource-management/v4/managedidentity.json#/definitions/ManagedServiceIdentity", + "$ref": "../../common-types/resource-management/v3/managedidentity.json#/definitions/ManagedServiceIdentity", "description": "The managed service identities assigned to this resource." }, "sku": { @@ -10962,7 +10952,7 @@ ], "x-ms-enum": { "name": "UsageUnit", - "modelAsString": true + "modelAsString": false } }, "VirtualNetworkRule": { diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json index 64343b1626..b2e092d434 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json @@ -247,6 +247,10 @@ "$ref": "#/definitions/Employee" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "A link to the status monitor" + }, "Retry-After": { "type": "integer", "format": "int32", @@ -597,11 +601,7 @@ "properties": { "$ref": "#/definitions/ArrayDefaultProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -657,11 +657,7 @@ "type": "object", "description": "The resource-specific properties for this resource.", "additionalProperties": {}, - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -698,11 +694,7 @@ "properties": { "$ref": "#/definitions/EmployeeProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ @@ -801,11 +793,7 @@ "properties": { "$ref": "#/definitions/EnrollProperties", "description": "The resource-specific properties for this resource.", - "x-ms-client-flatten": true, - "x-ms-mutability": [ - "read", - "create" - ] + "x-ms-client-flatten": true } }, "allOf": [ diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp index 7e0ea8b70b..89239ea545 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp @@ -114,9 +114,9 @@ interface PoolOperations { * last aggregation interval is returned. */ @summary(""" -Lists the usage metrics, aggregated by Pool across individual time intervals, -for the specified Account. -""") + Lists the usage metrics, aggregated by Pool across individual time intervals, + for the specified Account. + """) listUsageMetrics is Azure.Core.ResourceList< PoolUsageMetrics, { @@ -2134,9 +2134,9 @@ interface JobOperations { * JobPreparationTaskNotSpecified. */ @summary(""" -Lists the execution status of the Job Preparation and Job Release Task for the -specified Job across the Compute Nodes where the Job has run. -""") + Lists the execution status of the Job Preparation and Job Release Task for the + specified Job across the Compute Nodes where the Job has run. + """) @route("/jobs/{jobId}/jobpreparationandreleasetaskstatus") @get listPreparationAndReleaseTaskStatus is Azure.Core.Foundations.Operation< @@ -4358,9 +4358,9 @@ interface TaskOperations { * If the Task is not a multi-instance Task then this returns an empty collection. */ @summary(""" -Lists all of the subtasks that are associated with the specified multi-instance -Task. -""") + Lists all of the subtasks that are associated with the specified multi-instance + Task. + """) @route("/jobs/{jobId}/tasks/{taskId}/subtasksinfo") @get listSubtasks is Azure.Core.Foundations.Operation< @@ -4509,9 +4509,9 @@ Task. * will fail if the Job has completed (or is terminating or deleting). */ @summary(""" -Reactivates a Task, allowing it to run again even if its retry count has been -exhausted. -""") + Reactivates a Task, allowing it to run again even if its retry count has been + exhausted. + """) @route("/jobs/{jobId}/tasks/{taskId}/reactivate") @post reactivate is Azure.Core.Foundations.Operation< @@ -4716,9 +4716,9 @@ interface ComputeNodeOperations { * Account on a Compute Node only when it is in the idle or running state. */ @summary(""" -Updates the password and expiration time of a user Account on the specified -Compute Node. -""") + Updates the password and expiration time of a user Account on the specified + Compute Node. + """) @route("/pools/{poolId}/nodes/{nodeId}/users/{userName}") @put updateUser is Azure.Core.Foundations.Operation< @@ -5184,9 +5184,9 @@ Compute Node. * support to aid in debugging issues with the Batch service. */ @summary(""" -Upload Azure Batch service log files from the specified Compute Node to Azure -Blob Storage. -""") + Upload Azure Batch service log files from the specified Compute Node to Azure + Blob Storage. + """) uploadBatchServiceLogs is Azure.Core.ResourceCreateWithServiceProvidedName< UploadBatchServiceLogsResult, { diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp index b8b6b8b9df..4f21612aef 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp @@ -89,10 +89,10 @@ op createLedgerEntry is Azure.Core.ResourceCreateWithServiceProvidedName< * if the loading is still ongoing. */ @summary(""" -Gets the ledger entry at the specified transaction id. A collection id may -optionally be specified to indicate the collection from which to fetch the -value. -""") + Gets the ledger entry at the specified transaction id. A collection id may + optionally be specified to indicate the collection from which to fetch the + value. + """) @route("/app/transactions/{transactionId}") @get op getLedgerEntry is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp index 0df71a6de3..ecf77a427f 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp @@ -524,9 +524,9 @@ op deleteCertificateOperation is Azure.Core.Foundations.Operation< * operation requires the certificates/create permission. */ @summary(""" -Merges a certificate or a certificate chain with a key pair existing on the -server. -""") + Merges a certificate or a certificate chain with a key pair existing on the + server. + """) @route("/certificates/{certificate-name}/pending/merge") @post op mergeCertificate is Azure.Core.Foundations.Operation< @@ -585,9 +585,9 @@ op restoreCertificate is Azure.Core.Foundations.Operation< * soft-delete enabled vaults. */ @summary(""" -Lists the deleted certificates in the specified vault currently available for -recovery. -""") + Lists the deleted certificates in the specified vault currently available for + recovery. + """) @route("/deletedcertificates") @get op getDeletedCertificates is Azure.Core.Foundations.Operation< @@ -658,9 +658,9 @@ op purgeDeletedCertificate is Azure.Core.Foundations.Operation< * permission. */ @summary(""" -Recovers the deleted certificate back to its current version under -/certificates. -""") + Recovers the deleted certificate back to its current version under + /certificates. + """) @route("/deletedcertificates/{certificate-name}/recover") @post op recoverDeletedCertificate is Azure.Core.Foundations.Operation< @@ -680,9 +680,9 @@ op recoverDeletedCertificate is Azure.Core.Foundations.Operation< * key. It requires the keys/create permission. */ @summary(""" -Creates a new key, stores it, then returns key parameters and attributes to the -client. -""") + Creates a new key, stores it, then returns key parameters and attributes to the + client. + """) @route("/keys/{key-name}/create") @post op createKey is Azure.Core.Foundations.Operation< @@ -711,9 +711,9 @@ op createKey is Azure.Core.Foundations.Operation< * keys/rotate permission. */ @summary(""" -Creates a new key version, stores it, then returns key parameters, attributes -and policy to the client. -""") + Creates a new key version, stores it, then returns key parameters, attributes + and policy to the client. + """) @route("/keys/{key-name}/rotate") @post op rotateKey is Azure.Core.Foundations.Operation< @@ -735,9 +735,9 @@ op rotateKey is Azure.Core.Foundations.Operation< * of the key. This operation requires the keys/import permission. */ @summary(""" -Imports an externally created key, stores it, and returns key parameters and -attributes to the client. -""") + Imports an externally created key, stores it, and returns key parameters and + attributes to the client. + """) @route("/keys/{key-name}") @put op importKey is Azure.Core.Foundations.Operation< @@ -786,9 +786,9 @@ op deleteKey is Azure.Core.Foundations.Operation< * operation requires the keys/update permission. */ @summary(""" -The update key operation changes specified attributes of a stored key and can -be applied to any key type and key version stored in Azure Key Vault. -""") + The update key operation changes specified attributes of a stored key and can + be applied to any key type and key version stored in Azure Key Vault. + """) @route("/keys/{key-name}/{key-version}") @patch op updateKey is Azure.Core.Foundations.Operation< @@ -955,9 +955,9 @@ op restoreKey is Azure.Core.Foundations.Operation< * public key material. This operation requires the keys/encrypt permission. */ @summary(""" -Encrypts an arbitrary sequence of bytes using an encryption key that is stored -in a key vault. -""") + Encrypts an arbitrary sequence of bytes using an encryption key that is stored + in a key vault. + """) @route("/keys/{key-name}/{key-version}/encrypt") @post op encrypt is Azure.Core.Foundations.Operation< @@ -1130,9 +1130,9 @@ op wrapKey is Azure.Core.Foundations.Operation< * keys/unwrapKey permission. */ @summary(""" -Unwraps a symmetric key using the specified key that was initially used for -wrapping that key. -""") + Unwraps a symmetric key using the specified key that was initially used for + wrapping that key. + """) @route("/keys/{key-name}/{key-version}/unwrapkey") @post op unwrapKey is Azure.Core.Foundations.Operation< @@ -1595,9 +1595,9 @@ op restoreSecret is Azure.Core.Foundations.Operation< * Description of the pool setting to be updated */ @summary(""" -Updates key vault account setting, stores it, then returns the setting name and -value to the client. -""") + Updates key vault account setting, stores it, then returns the setting name and + value to the client. + """) @route("/settings/{setting-name}") @patch op updateSettings is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp index 60d6e49145..37c37fe86e 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp @@ -82,9 +82,9 @@ interface LoadTestAdministrationOperations { * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ @summary(""" -Get all load tests by the fully qualified resource Id e.g -subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. -""") + Get all load tests by the fully qualified resource Id e.g + subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + """) @route("/tests") @get listTests is Azure.Core.Foundations.Operation< @@ -133,10 +133,10 @@ subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/lo * should be provided in the request body as application/octet-stream. */ @summary(""" -Upload input file for a given test name. File size can't be more than 50 MB. -Existing file with same name for the given test will be overwritten. File -should be provided in the request body as application/octet-stream. -""") + Upload input file for a given test name. File size can't be more than 50 MB. + Existing file with same name for the given test will be overwritten. File + should be provided in the request body as application/octet-stream. + """) @route("/tests/{testId}/files/{fileName}") @put uploadTestFile is Azure.Core.Foundations.Operation< @@ -701,9 +701,9 @@ interface LoadTestRunOperations { * run. */ @summary(""" -Get associated app component (collection of azure resources) for the given test -run. -""") + Get associated app component (collection of azure resources) for the given test + run. + """) @route("/test-runs/{testRunId}/app-components") @get getAppComponents is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp index 9a1e34dc6b..8cb2f942ca 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp @@ -149,9 +149,9 @@ interface QuestionAnsweringProjectsOperations { * metadata, and assets. */ @summary(""" -Gets the status of an Export job, once job completes, returns the project -metadata, and assets. -""") + Gets the status of an Export job, once job completes, returns the project + metadata, and assets. + """) @route("/authoring/query-knowledgebases/projects/{projectName}/export/jobs/{jobId}") @get getExportStatus is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp index a09efcb667..1c46c5c936 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp @@ -407,17 +407,17 @@ interface pathsOperations { >; @doc(""" -Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the csv-array format -""") + Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + using the csv-array format + """) @route("/paths/array/ArrayPath1%2cbegin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend%2c%2c/{arrayPath}") @get arrayCsvInPath is Azure.Core.Foundations.Operation< { @doc(""" -an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the csv-array format -""") + an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + using the csv-array format + """) @path arrayPath: string[]; }, @@ -887,17 +887,17 @@ interface queriesOperations { >; @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the csv-array format -""") + Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + ''] using the csv-array format + """) @route("/queries/array/csv/string/valid") @get arrayStringCsvValid is Azure.Core.Foundations.Operation< { @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the csv-array format -""") + an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + using the csv-array format + """) @query({ name: "arrayQuery", format: "csv", @@ -966,17 +966,17 @@ using the csv-array format >; @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the ssv-array format -""") + Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + ''] using the ssv-array format + """) @route("/queries/array/ssv/string/valid") @get arrayStringSsvValid is Azure.Core.Foundations.Operation< { @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the ssv-array format -""") + an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + using the ssv-array format + """) @query({ name: "arrayQuery", format: "ssv", @@ -987,17 +987,17 @@ using the ssv-array format >; @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the tsv-array format -""") + Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + ''] using the tsv-array format + """) @route("/queries/array/tsv/string/valid") @get arrayStringTsvValid is Azure.Core.Foundations.Operation< { @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the tsv-array format -""") + an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + using the tsv-array format + """) @query({ name: "arrayQuery", format: "tsv", @@ -1008,17 +1008,17 @@ using the tsv-array format >; @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the pipes-array format -""") + Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + ''] using the pipes-array format + """) @route("/queries/array/pipes/string/valid") @get arrayStringPipesValid is Azure.Core.Foundations.Operation< { @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the pipes-array format -""") + an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + using the pipes-array format + """) @query({ name: "arrayQuery", format: "pipes", diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp index 8d576f06b9..9b324f7dab 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp @@ -32,8 +32,8 @@ namespace AzureWebPubSubServiceRESTAPI; */ enum Versions { /** - * The 2023-07-01 API version. + * The 2024-01-01 API version. */ @useDependency(Azure.Core.Versions.v1_0_Preview_1) - v2023_07_01: "2023-07-01", + v2024_01_01: "2024-01-01", } diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp index 89389eb144..d2d4511dac 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp @@ -6,6 +6,12 @@ using TypeSpec.Http; namespace AzureWebPubSubServiceRESTAPI; +union WebPubSubClientType { + string, + Default: "Default", + MQTT: "MQTT", +} + union WebPubSubPermission { string, sendToGroup: "sendToGroup", diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp index a500ab8e9b..3b9f09981b 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp @@ -124,6 +124,14 @@ interface WebPubSubOperations { }) group?: string[]; + /** + * The type of client. Case-insensitive. If not set, it's "Default". For Web + * PubSub for Socket.IO, only the default value is supported. For Web PubSub, the + * valid values are 'Default' and 'MQTT'. + */ + @query("clientType") + clientType?: WebPubSubClientType = WebPubSubClientType.Default; + /** * Accept header */