* Update to typespec

* fix tsproject

* Update decorators

* update changelog

* Update

* Address comments
This commit is contained in:
Jose Manuel Heredia Hidalgo 2023-03-14 11:02:32 -07:00 коммит произвёл GitHub
Родитель ed6068aa7b
Коммит f37ff23fd3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
135 изменённых файлов: 2270 добавлений и 8279 удалений

Просмотреть файл

@ -339,4 +339,4 @@ packages/extensions/core/test/plugins/*/expected/*.json
/SECURITY.md
# Generated cadl
packages/extensions/openapi-to-cadl/test/**/*.cadl
packages/extensions/openapi-to-cadl/test/**/*.tsp

3
.vscode/settings.json поставляемый
Просмотреть файл

@ -24,5 +24,8 @@
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[typespec]": {
"editor.defaultFormatter": "Microsoft.typespec-vscode"
}
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@autorest/openapi-to-cadl",
"comment": "Update to generate TypeSpec after Cadl -> Typespec rename",
"type": "minor"
}
],
"packageName": "@autorest/openapi-to-cadl"
}

Просмотреть файл

@ -2,18 +2,13 @@ lockfileVersion: 5.3
specifiers:
'@azure-tools/async-io': ~3.0.0
'@azure-tools/cadl-autorest': ^0.26.0
'@azure-tools/cadl-azure-core': ^0.26.0
'@azure-tools/object-comparison': ~3.0.0
'@azure-tools/tasks': ~3.0.0
'@azure-tools/typespec-autorest': ^0.27.0
'@azure-tools/typespec-azure-core': ^0.27.0
'@azure-tools/uri': ~3.1.1
'@azure/logger': ^1.0.2
'@cadl-lang/compiler': ^0.37.0
'@cadl-lang/openapi': ^0.11.0
'@cadl-lang/openapi3': ^0.14.0
'@cadl-lang/prettier-plugin-cadl': ^0.40.0
'@cadl-lang/rest': ^0.40.0
'@cadl-lang/versioning': ^0.40.0
'@rush-temp/autorest': file:./projects/autorest.tgz
'@rush-temp/cadl': file:./projects/cadl.tgz
'@rush-temp/codegen': file:./projects/codegen.tgz
@ -57,6 +52,13 @@ specifiers:
'@types/yargs': ~17.0.4
'@typescript-eslint/eslint-plugin': ^5.27.0
'@typescript-eslint/parser': ^5.27.0
'@typespec/compiler': ^0.41.0
'@typespec/http': ^0.41.0
'@typespec/openapi': ^0.41.0
'@typespec/openapi3': ^0.41.0
'@typespec/prettier-plugin-typespec': ^0.41.0
'@typespec/rest': ^0.41.0
'@typespec/versioning': ^0.41.0
ajv: ^8.6.0
ajv-errors: ^3.0.0
ajv-formats: ^2.1.0
@ -115,18 +117,13 @@ specifiers:
dependencies:
'@azure-tools/async-io': 3.0.254
'@azure-tools/cadl-autorest': 0.26.0_eff628dfb2078b6e76357553b051fccd
'@azure-tools/cadl-azure-core': 0.26.0_b88a14e40e716c313d343c9bc7dceb5b
'@azure-tools/object-comparison': 3.0.253
'@azure-tools/tasks': 3.0.255
'@azure-tools/typespec-autorest': 0.27.0_042580e3a1cdc85408d1a36060d67d08
'@azure-tools/typespec-azure-core': 0.27.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@azure-tools/uri': 3.1.1
'@azure/logger': 1.0.3
'@cadl-lang/compiler': 0.37.0
'@cadl-lang/openapi': 0.11.0_b88a14e40e716c313d343c9bc7dceb5b
'@cadl-lang/openapi3': 0.14.0_fae9714c1e0b51da3f29a9217d424fb7
'@cadl-lang/prettier-plugin-cadl': 0.40.0
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.37.0
'@cadl-lang/versioning': 0.40.0
'@rush-temp/autorest': file:projects/autorest.tgz_ts-node@10.9.1
'@rush-temp/cadl': file:projects/cadl.tgz_ts-node@10.9.1+webpack@5.40.0
'@rush-temp/codegen': file:projects/codegen.tgz_prettier@2.7.1+ts-node@10.9.1
@ -170,6 +167,13 @@ dependencies:
'@types/yargs': 17.0.22
'@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce
'@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5
'@typespec/compiler': 0.41.0
'@typespec/http': 0.41.0_@typespec+compiler@0.41.0
'@typespec/openapi': 0.41.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@typespec/openapi3': 0.41.0_f18cb4eb2c9ac5c2737b43478e239864
'@typespec/prettier-plugin-typespec': 0.41.0
'@typespec/rest': 0.41.0_@typespec+compiler@0.41.0
'@typespec/versioning': 0.41.0
ajv: 8.12.0
ajv-errors: 3.0.0_ajv@8.12.0
ajv-formats: 2.1.1
@ -244,23 +248,6 @@ packages:
proper-lockfile: 2.0.1
dev: false
/@azure-tools/cadl-autorest/0.26.0_eff628dfb2078b6e76357553b051fccd:
resolution: {integrity: sha512-CoMddqhtZ7lP6O3hbX7Qxq3QeOou64IBmuf4Iz8dcTHOaLfrSoiJshbczEgO/mV62sY5kTmdamWEIi5ZRUpvWA==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@azure-tools/cadl-azure-core': ~0.26.0
'@cadl-lang/compiler': ~0.40.0
'@cadl-lang/openapi': ~0.40.0
'@cadl-lang/rest': ~0.40.0
'@cadl-lang/versioning': ~0.40.0
dependencies:
'@azure-tools/cadl-azure-core': 0.26.0_b88a14e40e716c313d343c9bc7dceb5b
'@cadl-lang/compiler': 0.37.0
'@cadl-lang/openapi': 0.11.0_b88a14e40e716c313d343c9bc7dceb5b
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.37.0
'@cadl-lang/versioning': 0.40.0
dev: false
/@azure-tools/cadl-autorest/0.26.0_f5ff21551b215835b7e99a28886af080:
resolution: {integrity: sha512-CoMddqhtZ7lP6O3hbX7Qxq3QeOou64IBmuf4Iz8dcTHOaLfrSoiJshbczEgO/mV62sY5kTmdamWEIi5ZRUpvWA==}
engines: {node: '>=16.0.0'}
@ -290,18 +277,6 @@ packages:
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0
dev: false
/@azure-tools/cadl-azure-core/0.26.0_b88a14e40e716c313d343c9bc7dceb5b:
resolution: {integrity: sha512-PYmG/cp+QhyjuQa0jwTkkPp487d500FmPUB5rhjjx+OG080322d+uLeS9tx25dEq3GRoehEnF80qkupBjZBr1g==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@cadl-lang/compiler': ~0.40.0
'@cadl-lang/rest': ~0.40.0
dependencies:
'@cadl-lang/compiler': 0.37.0
'@cadl-lang/lint': 0.40.0_@cadl-lang+compiler@0.37.0
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.37.0
dev: false
/@azure-tools/object-comparison/3.0.253:
resolution: {integrity: sha512-lpsO1TJmHvcXO8aDWyLeGx9H37AjGXyH0tMa56JbqV2xZRDzzJ5IuAcTjweP9g5WTShLGBvzp/nbODeQkakTjQ==}
engines: {node: '>=10.12.0'}
@ -312,6 +287,39 @@ packages:
engines: {node: '>=10.12.0'}
dev: false
/@azure-tools/typespec-autorest/0.27.0_042580e3a1cdc85408d1a36060d67d08:
resolution: {integrity: sha512-BipJaTL4ouqmZrGQNPw5Nxp5VxrgYtmnZTPzQyN3HKR2b2hFYnj+ViQXhbtbnNbz5A8qny1ya3e3G8nlU4qU/Q==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@azure-tools/typespec-azure-core': ~0.27.0
'@typespec/compiler': ~0.41.0
'@typespec/http': ~0.41.0
'@typespec/openapi': ~0.41.0
'@typespec/rest': ~0.41.0
'@typespec/versioning': ~0.41.0
dependencies:
'@azure-tools/typespec-azure-core': 0.27.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@typespec/compiler': 0.41.0
'@typespec/http': 0.41.0_@typespec+compiler@0.41.0
'@typespec/openapi': 0.41.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@typespec/rest': 0.41.0_@typespec+compiler@0.41.0
'@typespec/versioning': 0.41.0
dev: false
/@azure-tools/typespec-azure-core/0.27.0_040fe82a7d8df1aa6a617fbf77f2eaa2:
resolution: {integrity: sha512-jyI7ND2XFy70N/LX4UAY8twKVQZsPkDCmRvum6sVZfZ/xBcGrl8eEDUk1mh9PHRSUGHF4UBnrxLN5CKU79JH6A==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@typespec/compiler': ~0.41.0
'@typespec/http': ~0.41.0
'@typespec/rest': ~0.41.0
dependencies:
'@typespec/compiler': 0.41.0
'@typespec/http': 0.41.0_@typespec+compiler@0.41.0
'@typespec/lint': 0.41.0_@typespec+compiler@0.41.0
'@typespec/rest': 0.41.0_@typespec+compiler@0.41.0
dev: false
/@azure-tools/uri/3.1.1:
resolution: {integrity: sha512-UgPgD+qVtm4ASYqoTDazjowimrmMGGEQqPnNk9K/8CZdi2oSLtGqX9S1++2+NDaHlq74VyxbcNMKoxgO+2CCUQ==}
engines: {node: '>=10.12.0'}
@ -713,15 +721,6 @@ packages:
yargs: 17.6.2
dev: false
/@cadl-lang/lint/0.40.0_@cadl-lang+compiler@0.37.0:
resolution: {integrity: sha512-V/V5Msuurhb7kVZsvuAKVAHq4twmC5YC5k/t7YJWETOowFXepgIneWJPH2TDyyzO9WqJjqRJVRXPTrTuKuNFsA==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@cadl-lang/compiler': ~0.40.0
dependencies:
'@cadl-lang/compiler': 0.37.0
dev: false
/@cadl-lang/lint/0.40.0_@cadl-lang+compiler@0.40.0:
resolution: {integrity: sha512-V/V5Msuurhb7kVZsvuAKVAHq4twmC5YC5k/t7YJWETOowFXepgIneWJPH2TDyyzO9WqJjqRJVRXPTrTuKuNFsA==}
engines: {node: '>=16.0.0'}
@ -742,17 +741,6 @@ packages:
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0
dev: false
/@cadl-lang/openapi/0.11.0_b88a14e40e716c313d343c9bc7dceb5b:
resolution: {integrity: sha512-miVNnGNq1VOdirTEStKIi00AMxPi/C53bGizrdqBUS7ZJ1vDQR7pq9hbPNYX8K7qAjMMSrJQykZc0xTOB/Jlow==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@cadl-lang/compiler': ~0.34.0
'@cadl-lang/rest': ~0.16.0
dependencies:
'@cadl-lang/compiler': 0.37.0
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.37.0
dev: false
/@cadl-lang/openapi3/0.14.0_62b7473d9f647402d044da26a5647f70:
resolution: {integrity: sha512-NLNeVIBFmpy3KNy1T8coftynVLOUOk4HBWYtqsaciEkrbAGRbJrNfzbC42mRGqr/yBD6Iyo03B5V3H1pKcAyEA==}
engines: {node: '>=16.0.0'}
@ -768,36 +756,12 @@ packages:
'@cadl-lang/versioning': 0.40.0
dev: false
/@cadl-lang/openapi3/0.14.0_fae9714c1e0b51da3f29a9217d424fb7:
resolution: {integrity: sha512-NLNeVIBFmpy3KNy1T8coftynVLOUOk4HBWYtqsaciEkrbAGRbJrNfzbC42mRGqr/yBD6Iyo03B5V3H1pKcAyEA==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@cadl-lang/compiler': ~0.34.0
'@cadl-lang/openapi': ~0.11.0
'@cadl-lang/rest': ~0.16.0
'@cadl-lang/versioning': ~0.7.0
dependencies:
'@cadl-lang/compiler': 0.37.0
'@cadl-lang/openapi': 0.11.0_b88a14e40e716c313d343c9bc7dceb5b
'@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.37.0
'@cadl-lang/versioning': 0.40.0
dev: false
/@cadl-lang/prettier-plugin-cadl/0.40.0:
resolution: {integrity: sha512-ZCO2UKVo4sz4J3JCEsC5po2HPZh2Ctc0S5IS9QZaRc6GsvKY29lYedFXGU5l4NBlsrRDRTt0svHjd8zuVtre9w==}
dependencies:
prettier: 2.8.4
dev: false
/@cadl-lang/rest/0.40.0_@cadl-lang+compiler@0.37.0:
resolution: {integrity: sha512-WfGq6lN87adRKsKd3XtztvOLXHzyFlDRQiEcXKfnwXia37zVwK355KX39P1RimQ9mpDsmXaGG4ETkdUSWvXe7w==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@cadl-lang/compiler': ~0.40.0
dependencies:
'@cadl-lang/compiler': 0.37.0
dev: false
/@cadl-lang/rest/0.40.0_@cadl-lang+compiler@0.40.0:
resolution: {integrity: sha512-WfGq6lN87adRKsKd3XtztvOLXHzyFlDRQiEcXKfnwXia37zVwK355KX39P1RimQ9mpDsmXaGG4ETkdUSWvXe7w==}
engines: {node: '>=16.0.0'}
@ -1632,6 +1596,99 @@ packages:
eslint-visitor-keys: 3.3.0
dev: false
/@typespec/compiler/0.41.0:
resolution: {integrity: sha512-JmSclmneBmWiv2+ROFBhAl69uylIdLVnElB3Xr/hHPza9mcMRz7HR0Zi2tvjATsvPkIUgcoUM/pVXLhNjKeMLw==}
engines: {node: '>=16.0.0'}
hasBin: true
dependencies:
'@babel/code-frame': 7.18.6
ajv: 8.11.2
change-case: 4.1.2
globby: 13.1.3
js-yaml: 4.1.0
mkdirp: 1.0.4
mustache: 4.2.0
node-fetch: 3.2.8
node-watch: 0.7.3
picocolors: 1.0.0
prettier: 2.8.4
prompts: 2.4.2
vscode-languageserver: 8.0.2
vscode-languageserver-textdocument: 1.0.8
yargs: 17.6.2
dev: false
/@typespec/http/0.41.0_@typespec+compiler@0.41.0:
resolution: {integrity: sha512-lKewobsQVlpEUWCH/jw3eodugCqR9VqSP3a7iM9IrhULjhNExLQ7GHR6GpKyxBLSMq8mqThrC0u0hLJNd0iRuQ==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@typespec/compiler': ~0.41.0
dependencies:
'@typespec/compiler': 0.41.0
dev: false
/@typespec/lint/0.41.0_@typespec+compiler@0.41.0:
resolution: {integrity: sha512-Xv54f+Nj+WWf+fq6AQk36QHO/bMKMltNwOwYXqV/51yzgc3VBk7wlHeGq+J9A7pW8WsV7T1nkdRCg2d7GaXPcw==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@typespec/compiler': ~0.41.0
dependencies:
'@typespec/compiler': 0.41.0
dev: false
/@typespec/openapi/0.41.0_040fe82a7d8df1aa6a617fbf77f2eaa2:
resolution: {integrity: sha512-0zfmsorziqlaPHxM6ZckmLUlu7L4qY/BKO//uHA49UjSVWzMfq8O4szFYtQpaBjDMhsOV5AQRAF/elz6gMcqsg==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@typespec/compiler': ~0.41.0
'@typespec/http': ~0.41.0
'@typespec/rest': ~0.41.0
dependencies:
'@typespec/compiler': 0.41.0
'@typespec/http': 0.41.0_@typespec+compiler@0.41.0
'@typespec/rest': 0.41.0_@typespec+compiler@0.41.0
dev: false
/@typespec/openapi3/0.41.0_f18cb4eb2c9ac5c2737b43478e239864:
resolution: {integrity: sha512-rsE19Tzj1JeaBB48feuv+kD5yZHT+gVBvQ71PNQ39lfWsF1+5LIlktPfMXQ9fJycA/igyPoJMPahGebQBFKekA==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@typespec/compiler': ~0.41.0
'@typespec/http': ~0.41.0
'@typespec/openapi': ~0.41.0
'@typespec/rest': ~0.41.0
'@typespec/versioning': ~0.41.0
dependencies:
'@typespec/compiler': 0.41.0
'@typespec/http': 0.41.0_@typespec+compiler@0.41.0
'@typespec/openapi': 0.41.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@typespec/rest': 0.41.0_@typespec+compiler@0.41.0
'@typespec/versioning': 0.41.0
js-yaml: 4.1.0
dev: false
/@typespec/prettier-plugin-typespec/0.41.0:
resolution: {integrity: sha512-ozI+iUf0XkXvOwt75xLS+j3oL7JIRHqOM2RPND6g8Rvd7rYzwEwT560ysu27A4wXBwxKfP4O4a8OUNxWvf1Fgw==}
dependencies:
prettier: 2.8.4
dev: false
/@typespec/rest/0.41.0_@typespec+compiler@0.41.0:
resolution: {integrity: sha512-C3pAvXDzwe42H+4pdHXV5NiCFFZX8+igTLQR5aKZUixng9sN+Uz0PTv3QWGgHSBZvP+webTCswGDfHDLJotNxA==}
engines: {node: '>=16.0.0'}
peerDependencies:
'@typespec/compiler': ~0.41.0
dependencies:
'@typespec/compiler': 0.41.0
dev: false
/@typespec/versioning/0.41.0:
resolution: {integrity: sha512-B1zHxzPVZ1ZUHE7ZDPhjjhe0tx6mk0UfPNV2sALrk5VVPFeXQSK4DJcB6vvvSpBoPOqtb81/wKENsYAM7Vfmog==}
engines: {node: '>=16.0.0'}
dependencies:
'@typespec/compiler': 0.41.0
dev: false
/@webassemblyjs/ast/1.11.0:
resolution: {integrity: sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg==}
dependencies:
@ -8586,13 +8643,15 @@ packages:
dev: false
file:projects/openapi-to-cadl.tgz_jest@29.4.3:
resolution: {integrity: sha512-St+mrnGQ2I6ClWRCm2YABImjKXdxXhPVcYVB4yC2mBLsCChoIlzyf1a2xwhzz3wlwvMj0WKV9swasWyCakCS+w==, tarball: file:projects/openapi-to-cadl.tgz}
resolution: {integrity: sha512-dvdz3wRkG53aKxMM+stcqLvjEiHQn7MvAiKUdK7zvxY2A5gdxYEI2yEaOtIcMST6hUFKB4Mz+PZXqcCml1WC9g==, tarball: file:projects/openapi-to-cadl.tgz}
id: file:projects/openapi-to-cadl.tgz
name: '@rush-temp/openapi-to-cadl'
version: 0.0.0
dependencies:
'@azure-tools/cadl-autorest': 0.26.0_f5ff21551b215835b7e99a28886af080
'@azure-tools/cadl-azure-core': 0.26.0_3be7190ba2f4450e60a8695259029fc7
'@azure-tools/typespec-autorest': 0.27.0_042580e3a1cdc85408d1a36060d67d08
'@azure-tools/typespec-azure-core': 0.27.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@cadl-lang/compiler': 0.40.0
'@cadl-lang/openapi': 0.11.0_3be7190ba2f4450e60a8695259029fc7
'@cadl-lang/openapi3': 0.14.0_62b7473d9f647402d044da26a5647f70
@ -8605,6 +8664,13 @@ packages:
'@types/webpack': 4.41.33
'@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce
'@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5
'@typespec/compiler': 0.41.0
'@typespec/http': 0.41.0_@typespec+compiler@0.41.0
'@typespec/openapi': 0.41.0_040fe82a7d8df1aa6a617fbf77f2eaa2
'@typespec/openapi3': 0.41.0_f18cb4eb2c9ac5c2737b43478e239864
'@typespec/prettier-plugin-typespec': 0.41.0
'@typespec/rest': 0.41.0_@typespec+compiler@0.41.0
'@typespec/versioning': 0.41.0
chalk: 4.1.2
eslint: 8.34.0
eslint-plugin-import: 2.26.0_eslint@8.34.0

Просмотреть файл

@ -1,6 +1,6 @@
## Autorest openapi-to-cadl Plugin Configuration
Autorest extension to scaffold a new CADL definition from an existing OpenApi document.
Autorest extension to scaffold a new TypeSpec definition from an existing OpenApi document.
To run it
@ -16,11 +16,11 @@ autorest --openapi-to-cadl --require=<path-to-readme-config>.md --use=@autorest/
This plugin will generate the following files
main.cadl - Entry point of the CADL project, it contains service information
models.cadl - Contains all the model definitions
routes.cadl - Contains all the resource endpoints
cadl-project.yaml - Contains configuration for the CADL compiler
package.json - Configuration of the CADL project
main.tsp - Entry point of the TypeSpec project, it contains service information
models.tsp - Contains all the model definitions
routes.tsp - Contains all the resource endpoints
tsproject.yaml - Contains configuration for the TypeSpec compiler
package.json - Configuration of the TypeSpec project
```yaml
version: 3.6.6

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "@autorest/openapi-to-cadl",
"version": "0.3.0",
"description": "Autorest plugin to scaffold a CADL definition from an OpenAPI document",
"description": "Autorest plugin to scaffold a Typespec definition from an OpenAPI document",
"main": "dist/main.js",
"typings": "dist/main.d.ts",
"scripts": {
@ -23,7 +23,7 @@
},
"keywords": [
"Autorest",
"cadl"
"TypeSpec"
],
"author": "Microsoft Corporation",
"license": "MIT",
@ -41,14 +41,15 @@
"@azure-tools/codegen": "~2.9.2",
"@autorest/extension-base": "~3.5.1",
"@autorest/codemodel": "~4.19.3",
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"@cadl-lang/openapi": "^0.11.0",
"@cadl-lang/openapi3": "^0.14.0",
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"@typespec/openapi": "^0.41.0",
"@typespec/openapi3": "^0.41.0",
"prettier": "~2.7.1"
},
"devDependencies": {
@ -61,7 +62,7 @@
"fs-extra": "^10.1.0",
"@types/fs-extra": "^9.0.13",
"chalk": "^4.1.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"webpack-cli": "~4.7.2",
"webpack": "~5.40.0",
"@typescript-eslint/eslint-plugin": "^5.27.0",

Просмотреть файл

@ -4,19 +4,19 @@ import { formatFile } from "../utils/format";
export async function emitCadlConfig(filePath: string): Promise<void> {
const content = `
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true
`;
const session = getSession();

Просмотреть файл

@ -10,7 +10,14 @@ export async function emitMain(filePath: string, program: CadlProgram): Promise<
}
function getServiceInformation(program: CadlProgram) {
const imports = [`import "@cadl-lang/rest";`, `import "./routes.cadl";`, ``, `using Cadl.Rest;`, `using Cadl.Http;`];
const imports = [
`import "@typespec/rest";`,
`import "@typespec/http";`,
`import "./routes.tsp";`,
``,
`using TypeSpec.Rest;`,
`using TypeSpec.Http;`,
];
const content = generateServiceInformation(program);
return [...imports, content].join("\n");

Просмотреть файл

@ -1,4 +1,3 @@
import { writeFile } from "fs/promises";
import { getSession } from "../autorest-session";
import { generateEnums } from "../generate/generate-enums";
import { generateObject } from "../generate/generate-object";
@ -17,9 +16,11 @@ export async function emitModels(filePath: string, program: CadlProgram): Promis
function generateModels(program: CadlProgram) {
const { models } = program;
const { modules, namespaces: namespacesSet } = getModelsImports(program);
const imports = [...new Set<string>([`import "@cadl-lang/rest";`, ...modules])].join("\n");
const imports = [...new Set<string>([`import "@typespec/rest";`, `import "@typespec/http";`, ...modules])].join("\n");
const namespaces = [...new Set<string>([`using Cadl.Rest;`, ...namespacesSet])].join("\n");
const namespaces = [...new Set<string>([`using TypeSpec.Rest;`, `using TypeSpec.Http;`, ...namespacesSet])].join(
"\n",
);
const enums = flattenEnums(models.enums).join("");
const objects = models.objects.map(generateObject).join("\n\n");

Просмотреть файл

@ -11,17 +11,18 @@ export async function emitPackage(filePath: string, program: CadlProgram): Promi
}
const getPackage = (name: string, description: string) => ({
name: `@cadl-api-spec/${name}`,
name: `@typespec-api-spec/${name}`,
author: "Microsoft Corporation",
description,
license: "MIT",
dependencies: {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
prettier: "^2.7.1",
},
private: true,

Просмотреть файл

@ -26,11 +26,11 @@ export async function processRequest(host: AutorestExtensionHost) {
markErrorModels(codeModel);
markResources(codeModel);
const cadlProgramDetails = getModel(codeModel);
await emitModels(getFilePath(session, "models.cadl"), cadlProgramDetails);
await emitRoutes(getFilePath(session, "routes.cadl"), cadlProgramDetails);
await emitMain(getFilePath(session, "main.cadl"), cadlProgramDetails);
await emitModels(getFilePath(session, "models.tsp"), cadlProgramDetails);
await emitRoutes(getFilePath(session, "routes.tsp"), cadlProgramDetails);
await emitMain(getFilePath(session, "main.tsp"), cadlProgramDetails);
await emitPackage(getFilePath(session, "package.json"), cadlProgramDetails);
await emitCadlConfig(getFilePath(session, "cadl-project.yaml"));
await emitCadlConfig(getFilePath(session, "tspconfig.yaml"));
}
function getOutuptDirectory(session: Session<CodeModel>) {

Просмотреть файл

@ -15,7 +15,7 @@ export function addCorePageAlias(cadlObject: CadlObject): CadlAlias | undefined
cadlObject.alias = {
alias: "Azure.Core.Page",
params: [value[0].type.replace("[]", "")],
module: "@azure-tools/cadl-azure-core",
module: "@azure-tools/typespec-azure-core",
};
return;

Просмотреть файл

@ -10,7 +10,7 @@ export function getModelDecorators(model: ObjectSchema): CadlDecorator[] {
if (paging.isPageable) {
decorators.push({
name: "pagedResult",
module: "@azure-tools/cadl-azure-core",
module: "@azure-tools/typespec-azure-core",
namespace: "Azure.Core",
});
}
@ -36,7 +36,7 @@ export function getModelDecorators(model: ObjectSchema): CadlDecorator[] {
}
decorators.push({
name: "resource",
module: "@azure-tools/cadl-azure-core",
module: "@azure-tools/typespec-azure-core",
namespace: "Azure.Core",
arguments: [resource],
});
@ -87,7 +87,7 @@ export function getEnumDecorators(enumeration: SealedChoiceSchema | ChoiceSchema
if (isSealedChoiceSchema(enumeration)) {
decorators.push({
name: "Azure.Core.fixed",
module: "@azure-tools/cadl-azure-core",
module: "@azure-tools/typespec-azure-core",
});
}

Просмотреть файл

@ -10,7 +10,7 @@ export function formatFile(content: string, filepath: string) {
export function formatCadlFile(content: string, filepath: string): string {
try {
return format(content, {
plugins: ["@cadl-lang/prettier-plugin-cadl"],
plugins: ["@typespec/prettier-plugin-typespec"],
pluginSearchDirs: ["./node_modules"],
filepath,
});

Просмотреть файл

@ -37,8 +37,8 @@ export function getModelsImports(program: CadlProgram) {
export function getRoutesImports(_program: CadlProgram) {
const imports: Imports = {
modules: [`import "@azure-tools/cadl-azure-core";`, `import "@cadl-lang/rest";`, `import "./models.cadl";`],
namespaces: [`using Cadl.Rest;`, `using Cadl.Http;`],
modules: [`import "@azure-tools/typespec-azure-core";`, `import "@typespec/rest";`, `import "./models.tsp";`],
namespaces: [`using TypeSpec.Rest;`, `using TypeSpec.Http;`],
};
return imports;

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Microsoft Cognitive Language Service - Analyze Text Authoring",
version: "2022-05-01",

Просмотреть файл

@ -1,7 +1,9 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace Azure.Language.Authoring;
@ -12,56 +14,56 @@ For building a classification model to classify text using your own data. Each
file will have only one label. For example, file 1 is classified as A and file
2 is classified as B.
""")
"CustomSingleLabelClassification",
CustomSingleLabelClassification,
@doc("""
For building a classification model to classify text using your own data. Each
file can have one or many labels. For example, file 1 is classified as A, B,
and C and file 2 is classified as B and C.
""")
"CustomMultiLabelClassification",
CustomMultiLabelClassification,
@doc("""
For building an extraction model to identify your domain categories using your
own data.
""")
"CustomEntityRecognition",
CustomEntityRecognition,
}
enum ErrorCode {
"InvalidRequest",
"InvalidArgument",
"Unauthorized",
"Forbidden",
"NotFound",
"ProjectNotFound",
"OperationNotFound",
"AzureCognitiveSearchNotFound",
"AzureCognitiveSearchIndexNotFound",
"TooManyRequests",
"AzureCognitiveSearchThrottling",
"AzureCognitiveSearchIndexLimitReached",
"InternalServerError",
"ServiceUnavailable",
"Timeout",
"QuotaExceeded",
"Conflict",
"Warning",
InvalidRequest,
InvalidArgument,
Unauthorized,
Forbidden,
NotFound,
ProjectNotFound,
OperationNotFound,
AzureCognitiveSearchNotFound,
AzureCognitiveSearchIndexNotFound,
TooManyRequests,
AzureCognitiveSearchThrottling,
AzureCognitiveSearchIndexLimitReached,
InternalServerError,
ServiceUnavailable,
Timeout,
QuotaExceeded,
Conflict,
Warning,
}
enum InnerErrorCode {
"InvalidRequest",
"InvalidParameterValue",
"KnowledgeBaseNotFound",
"AzureCognitiveSearchNotFound",
"AzureCognitiveSearchThrottling",
"ExtractionFailure",
"InvalidRequestBodyFormat",
"EmptyRequest",
"MissingInputDocuments",
"InvalidDocument",
"ModelVersionIncorrect",
"InvalidDocumentBatch",
"UnsupportedLanguageCode",
"InvalidCountryHint",
InvalidRequest,
InvalidParameterValue,
KnowledgeBaseNotFound,
AzureCognitiveSearchNotFound,
AzureCognitiveSearchThrottling,
ExtractionFailure,
InvalidRequestBodyFormat,
EmptyRequest,
MissingInputDocuments,
InvalidDocument,
ModelVersionIncorrect,
InvalidDocumentBatch,
UnsupportedLanguageCode,
InvalidCountryHint,
}
enum StringIndexType {
@ -70,7 +72,7 @@ The offset and length values will correspond to UTF-16 code units. Use this
option if your application is written in a language that support Unicode, for
example Java, JavaScript.
""")
"Utf16CodeUnit",
Utf16CodeUnit,
}
enum StringIndexTypeAutoGenerated {
@ -79,7 +81,7 @@ The offset and length values will correspond to UTF-16 code units. Use this
option if your application is written in a language that support Unicode, for
example Java, JavaScript.
""")
"Utf16CodeUnit",
Utf16CodeUnit,
}
enum EvaluationKind {

Просмотреть файл

@ -1,15 +1,16 @@
{
"name": "@cadl-api-spec/microsoft-cognitive-language-service---analyze-text-authoring",
"name": "@typespec-api-spec/microsoft-cognitive-language-service---analyze-text-authoring",
"author": "Microsoft Corporation",
"description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview\">https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.Language.Authoring;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Anomaly Detector Client",
})

Просмотреть файл

@ -1,81 +1,83 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace AnomalyDetectorClient;
enum ApiVersion {
"v1.1-preview.1",
`v1.1-preview.1`,
}
enum ImputeMode {
"auto",
"previous",
"linear",
"fixed",
"zero",
"notFill",
auto,
previous,
linear,
fixed,
zero,
notFill,
}
enum AnomalyDetectorErrorCodes {
"InvalidCustomInterval",
"BadArgument",
"InvalidGranularity",
"InvalidPeriod",
"InvalidModelArgument",
"InvalidSeries",
"InvalidJsonFormat",
"RequiredGranularity",
"RequiredSeries",
"InvalidImputeMode",
"InvalidImputeFixedValue",
InvalidCustomInterval,
BadArgument,
InvalidGranularity,
InvalidPeriod,
InvalidModelArgument,
InvalidSeries,
InvalidJsonFormat,
RequiredGranularity,
RequiredSeries,
InvalidImputeMode,
InvalidImputeFixedValue,
}
enum FillNAMethod {
"Previous",
"Subsequent",
"Linear",
"Zero",
"Fixed",
"NotFill",
Previous,
Subsequent,
Linear,
Zero,
Fixed,
NotFill,
}
@Azure.Core.fixed
enum TimeGranularity {
"yearly",
"monthly",
"weekly",
"daily",
"hourly",
yearly,
monthly,
weekly,
daily,
hourly,
perMinute: "minutely",
perSecond: "secondly",
"microsecond",
"none",
microsecond,
none,
}
@Azure.Core.fixed
enum DetectionStatus {
"CREATED",
"RUNNING",
"READY",
"FAILED",
CREATED,
RUNNING,
READY,
FAILED,
}
@Azure.Core.fixed
enum DataSchema {
"OneTable",
"MultiTable",
OneTable,
MultiTable,
}
@Azure.Core.fixed
enum AlignMode {
"Inner",
"Outer",
Inner,
Outer,
}
@Azure.Core.fixed
enum ModelStatus {
"CREATED",
"RUNNING",
"READY",
"FAILED",
CREATED,
RUNNING,
READY,
FAILED,
}
@doc("The request of entire or last anomaly detection.")

Просмотреть файл

@ -1,15 +1,16 @@
{
"name": "@cadl-api-spec/anomaly-detector-client",
"name": "@typespec-api-spec/anomaly-detector-client",
"author": "Microsoft Corporation",
"description": "The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace AnomalyDetectorClient;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/microsoft-azure-compute-management",
"author": "Microsoft Corporation",
"description": "Compute Client",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Microsoft Azure Compute Management",
version: "2022-08-01",

Просмотреть файл

@ -1,582 +1,583 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace Compute;
enum RepairAction {
"Replace",
"Restart",
"Reimage",
Replace,
Restart,
Reimage,
}
enum WindowsVMGuestPatchMode {
"Manual",
"AutomaticByOS",
"AutomaticByPlatform",
Manual,
AutomaticByOS,
AutomaticByPlatform,
}
enum WindowsPatchAssessmentMode {
"ImageDefault",
"AutomaticByPlatform",
ImageDefault,
AutomaticByPlatform,
}
enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting {
"Unknown",
"IfRequired",
"Never",
"Always",
Unknown,
IfRequired,
Never,
Always,
}
enum LinuxVMGuestPatchMode {
"ImageDefault",
"AutomaticByPlatform",
ImageDefault,
AutomaticByPlatform,
}
enum LinuxPatchAssessmentMode {
"ImageDefault",
"AutomaticByPlatform",
ImageDefault,
AutomaticByPlatform,
}
enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting {
"Unknown",
"IfRequired",
"Never",
"Always",
Unknown,
IfRequired,
Never,
Always,
}
enum DiskCreateOptionTypes {
"FromImage",
"Empty",
"Attach",
FromImage,
Empty,
Attach,
}
enum DiffDiskOptions {
"Local",
Local,
}
enum DiffDiskPlacement {
"CacheDisk",
"ResourceDisk",
CacheDisk,
ResourceDisk,
}
enum StorageAccountTypes {
"Standard_LRS",
"Premium_LRS",
"StandardSSD_LRS",
"UltraSSD_LRS",
"Premium_ZRS",
"StandardSSD_ZRS",
"PremiumV2_LRS",
Standard_LRS,
Premium_LRS,
StandardSSD_LRS,
UltraSSD_LRS,
Premium_ZRS,
StandardSSD_ZRS,
PremiumV2_LRS,
}
enum SecurityEncryptionTypes {
"VMGuestStateOnly",
"DiskWithVMGuestState",
VMGuestStateOnly,
DiskWithVMGuestState,
}
enum DiskDeleteOptionTypes {
"Delete",
"Detach",
Delete,
Detach,
}
enum IPVersion {
"IPv4",
"IPv6",
IPv4,
IPv6,
}
enum DeleteOptions {
"Delete",
"Detach",
Delete,
Detach,
}
enum PublicIPAddressSkuName {
"Basic",
"Standard",
Basic,
Standard,
}
enum PublicIPAddressSkuTier {
"Regional",
"Global",
Regional,
Global,
}
enum NetworkApiVersion {
"2020-11-01",
`2020-11-01`,
}
enum SecurityTypes {
"TrustedLaunch",
"ConfidentialVM",
TrustedLaunch,
ConfidentialVM,
}
enum VirtualMachinePriorityTypes {
"Regular",
"Low",
"Spot",
Regular,
Low,
Spot,
}
enum VirtualMachineEvictionPolicyTypes {
"Deallocate",
"Delete",
Deallocate,
Delete,
}
enum VirtualMachineScaleSetScaleInRules {
"Default",
"OldestVM",
"NewestVM",
Default,
OldestVM,
NewestVM,
}
enum OrchestrationMode {
"Uniform",
"Flexible",
Uniform,
Flexible,
}
enum ExtendedLocationTypes {
"EdgeZone",
EdgeZone,
}
enum ExpandTypesForGetVMScaleSets {
"userData",
userData,
}
enum OrchestrationServiceNames {
"AutomaticRepairs",
AutomaticRepairs,
}
enum OrchestrationServiceState {
"NotRunning",
"Running",
"Suspended",
NotRunning,
Running,
Suspended,
}
enum OrchestrationServiceStateAction {
"Resume",
"Suspend",
Resume,
Suspend,
}
enum VirtualMachineSizeTypes {
"Basic_A0",
"Basic_A1",
"Basic_A2",
"Basic_A3",
"Basic_A4",
"Standard_A0",
"Standard_A1",
"Standard_A2",
"Standard_A3",
"Standard_A4",
"Standard_A5",
"Standard_A6",
"Standard_A7",
"Standard_A8",
"Standard_A9",
"Standard_A10",
"Standard_A11",
"Standard_A1_v2",
"Standard_A2_v2",
"Standard_A4_v2",
"Standard_A8_v2",
"Standard_A2m_v2",
"Standard_A4m_v2",
"Standard_A8m_v2",
"Standard_B1s",
"Standard_B1ms",
"Standard_B2s",
"Standard_B2ms",
"Standard_B4ms",
"Standard_B8ms",
"Standard_D1",
"Standard_D2",
"Standard_D3",
"Standard_D4",
"Standard_D11",
"Standard_D12",
"Standard_D13",
"Standard_D14",
"Standard_D1_v2",
"Standard_D2_v2",
"Standard_D3_v2",
"Standard_D4_v2",
"Standard_D5_v2",
"Standard_D2_v3",
"Standard_D4_v3",
"Standard_D8_v3",
"Standard_D16_v3",
"Standard_D32_v3",
"Standard_D64_v3",
"Standard_D2s_v3",
"Standard_D4s_v3",
"Standard_D8s_v3",
"Standard_D16s_v3",
"Standard_D32s_v3",
"Standard_D64s_v3",
"Standard_D11_v2",
"Standard_D12_v2",
"Standard_D13_v2",
"Standard_D14_v2",
"Standard_D15_v2",
"Standard_DS1",
"Standard_DS2",
"Standard_DS3",
"Standard_DS4",
"Standard_DS11",
"Standard_DS12",
"Standard_DS13",
"Standard_DS14",
"Standard_DS1_v2",
"Standard_DS2_v2",
"Standard_DS3_v2",
"Standard_DS4_v2",
"Standard_DS5_v2",
"Standard_DS11_v2",
"Standard_DS12_v2",
"Standard_DS13_v2",
"Standard_DS14_v2",
"Standard_DS15_v2",
"Standard_DS13-4_v2",
"Standard_DS13-2_v2",
"Standard_DS14-8_v2",
"Standard_DS14-4_v2",
"Standard_E2_v3",
"Standard_E4_v3",
"Standard_E8_v3",
"Standard_E16_v3",
"Standard_E32_v3",
"Standard_E64_v3",
"Standard_E2s_v3",
"Standard_E4s_v3",
"Standard_E8s_v3",
"Standard_E16s_v3",
"Standard_E32s_v3",
"Standard_E64s_v3",
"Standard_E32-16_v3",
"Standard_E32-8s_v3",
"Standard_E64-32s_v3",
"Standard_E64-16s_v3",
"Standard_F1",
"Standard_F2",
"Standard_F4",
"Standard_F8",
"Standard_F16",
"Standard_F1s",
"Standard_F2s",
"Standard_F4s",
"Standard_F8s",
"Standard_F16s",
"Standard_F2s_v2",
"Standard_F4s_v2",
"Standard_F8s_v2",
"Standard_F16s_v2",
"Standard_F32s_v2",
"Standard_F64s_v2",
"Standard_F72s_v2",
"Standard_G1",
"Standard_G2",
"Standard_G3",
"Standard_G4",
"Standard_G5",
"Standard_GS1",
"Standard_GS2",
"Standard_GS3",
"Standard_GS4",
"Standard_GS5",
"Standard_GS4-8",
"Standard_GS4-4",
"Standard_GS5-16",
"Standard_GS5-8",
"Standard_H8",
"Standard_H16",
"Standard_H8m",
"Standard_H16m",
"Standard_H16r",
"Standard_H16mr",
"Standard_L4s",
"Standard_L8s",
"Standard_L16s",
"Standard_L32s",
"Standard_M64s",
"Standard_M64ms",
"Standard_M128s",
"Standard_M128ms",
"Standard_M64-32ms",
"Standard_M64-16ms",
"Standard_M128-64ms",
"Standard_M128-32ms",
"Standard_NC6",
"Standard_NC12",
"Standard_NC24",
"Standard_NC24r",
"Standard_NC6s_v2",
"Standard_NC12s_v2",
"Standard_NC24s_v2",
"Standard_NC24rs_v2",
"Standard_NC6s_v3",
"Standard_NC12s_v3",
"Standard_NC24s_v3",
"Standard_NC24rs_v3",
"Standard_ND6s",
"Standard_ND12s",
"Standard_ND24s",
"Standard_ND24rs",
"Standard_NV6",
"Standard_NV12",
"Standard_NV24",
Basic_A0,
Basic_A1,
Basic_A2,
Basic_A3,
Basic_A4,
Standard_A0,
Standard_A1,
Standard_A2,
Standard_A3,
Standard_A4,
Standard_A5,
Standard_A6,
Standard_A7,
Standard_A8,
Standard_A9,
Standard_A10,
Standard_A11,
Standard_A1_v2,
Standard_A2_v2,
Standard_A4_v2,
Standard_A8_v2,
Standard_A2m_v2,
Standard_A4m_v2,
Standard_A8m_v2,
Standard_B1s,
Standard_B1ms,
Standard_B2s,
Standard_B2ms,
Standard_B4ms,
Standard_B8ms,
Standard_D1,
Standard_D2,
Standard_D3,
Standard_D4,
Standard_D11,
Standard_D12,
Standard_D13,
Standard_D14,
Standard_D1_v2,
Standard_D2_v2,
Standard_D3_v2,
Standard_D4_v2,
Standard_D5_v2,
Standard_D2_v3,
Standard_D4_v3,
Standard_D8_v3,
Standard_D16_v3,
Standard_D32_v3,
Standard_D64_v3,
Standard_D2s_v3,
Standard_D4s_v3,
Standard_D8s_v3,
Standard_D16s_v3,
Standard_D32s_v3,
Standard_D64s_v3,
Standard_D11_v2,
Standard_D12_v2,
Standard_D13_v2,
Standard_D14_v2,
Standard_D15_v2,
Standard_DS1,
Standard_DS2,
Standard_DS3,
Standard_DS4,
Standard_DS11,
Standard_DS12,
Standard_DS13,
Standard_DS14,
Standard_DS1_v2,
Standard_DS2_v2,
Standard_DS3_v2,
Standard_DS4_v2,
Standard_DS5_v2,
Standard_DS11_v2,
Standard_DS12_v2,
Standard_DS13_v2,
Standard_DS14_v2,
Standard_DS15_v2,
`Standard_DS13-4_v2`,
`Standard_DS13-2_v2`,
`Standard_DS14-8_v2`,
`Standard_DS14-4_v2`,
Standard_E2_v3,
Standard_E4_v3,
Standard_E8_v3,
Standard_E16_v3,
Standard_E32_v3,
Standard_E64_v3,
Standard_E2s_v3,
Standard_E4s_v3,
Standard_E8s_v3,
Standard_E16s_v3,
Standard_E32s_v3,
Standard_E64s_v3,
`Standard_E32-16_v3`,
`Standard_E32-8s_v3`,
`Standard_E64-32s_v3`,
`Standard_E64-16s_v3`,
Standard_F1,
Standard_F2,
Standard_F4,
Standard_F8,
Standard_F16,
Standard_F1s,
Standard_F2s,
Standard_F4s,
Standard_F8s,
Standard_F16s,
Standard_F2s_v2,
Standard_F4s_v2,
Standard_F8s_v2,
Standard_F16s_v2,
Standard_F32s_v2,
Standard_F64s_v2,
Standard_F72s_v2,
Standard_G1,
Standard_G2,
Standard_G3,
Standard_G4,
Standard_G5,
Standard_GS1,
Standard_GS2,
Standard_GS3,
Standard_GS4,
Standard_GS5,
`Standard_GS4-8`,
`Standard_GS4-4`,
`Standard_GS5-16`,
`Standard_GS5-8`,
Standard_H8,
Standard_H16,
Standard_H8m,
Standard_H16m,
Standard_H16r,
Standard_H16mr,
Standard_L4s,
Standard_L8s,
Standard_L16s,
Standard_L32s,
Standard_M64s,
Standard_M64ms,
Standard_M128s,
Standard_M128ms,
`Standard_M64-32ms`,
`Standard_M64-16ms`,
`Standard_M128-64ms`,
`Standard_M128-32ms`,
Standard_NC6,
Standard_NC12,
Standard_NC24,
Standard_NC24r,
Standard_NC6s_v2,
Standard_NC12s_v2,
Standard_NC24s_v2,
Standard_NC24rs_v2,
Standard_NC6s_v3,
Standard_NC12s_v3,
Standard_NC24s_v3,
Standard_NC24rs_v3,
Standard_ND6s,
Standard_ND12s,
Standard_ND24s,
Standard_ND24rs,
Standard_NV6,
Standard_NV12,
Standard_NV24,
}
enum DiskDetachOptionTypes {
"ForceDetach",
ForceDetach,
}
enum DiskControllerTypes {
"SCSI",
"NVMe",
SCSI,
NVMe,
}
enum IPVersions {
"IPv4",
"IPv6",
IPv4,
IPv6,
}
enum PublicIPAllocationMethod {
"Dynamic",
"Static",
Dynamic,
Static,
}
enum HyperVGenerationType {
"V1",
"V2",
V1,
V2,
}
enum PatchOperationStatus {
"Unknown",
"InProgress",
"Failed",
"Succeeded",
"CompletedWithWarnings",
Unknown,
InProgress,
Failed,
Succeeded,
CompletedWithWarnings,
}
enum VMGuestPatchRebootBehavior {
"Unknown",
"NeverReboots",
"AlwaysRequiresReboot",
"CanRequestReboot",
Unknown,
NeverReboots,
AlwaysRequiresReboot,
CanRequestReboot,
}
enum PatchAssessmentState {
"Unknown",
"Available",
Unknown,
Available,
}
enum VMGuestPatchRebootSetting {
"IfRequired",
"Never",
"Always",
IfRequired,
Never,
Always,
}
enum VMGuestPatchClassificationWindows {
"Critical",
"Security",
"UpdateRollUp",
"FeaturePack",
"ServicePack",
"Definition",
"Tools",
"Updates",
Critical,
Security,
UpdateRollUp,
FeaturePack,
ServicePack,
Definition,
Tools,
Updates,
}
enum VMGuestPatchClassificationLinux {
"Critical",
"Security",
"Other",
Critical,
Security,
Other,
}
enum VMGuestPatchRebootStatus {
"Unknown",
"NotNeeded",
"Required",
"Started",
"Failed",
"Completed",
Unknown,
NotNeeded,
Required,
Started,
Failed,
Completed,
}
enum PatchInstallationState {
"Unknown",
"Installed",
"Failed",
"Excluded",
"NotSelected",
"Pending",
Unknown,
Installed,
Failed,
Excluded,
NotSelected,
Pending,
}
enum HyperVGenerationTypes {
"V1",
"V2",
V1,
V2,
}
enum VmDiskTypes {
"None",
"Unmanaged",
None,
Unmanaged,
}
enum ArchitectureTypes {
"x64",
"Arm64",
x64,
Arm64,
}
enum ProximityPlacementGroupType {
"Standard",
"Ultra",
Standard,
Ultra,
}
enum OperatingSystemType {
"Windows",
"Linux",
Windows,
Linux,
}
enum ConsistencyModeTypes {
"CrashConsistent",
"FileSystemConsistent",
"ApplicationConsistent",
CrashConsistent,
FileSystemConsistent,
ApplicationConsistent,
}
enum RestorePointCollectionExpandOptions {
"restorePoints",
restorePoints,
}
enum RestorePointExpandOptions {
"instanceView",
instanceView,
}
enum CapacityReservationGroupInstanceViewTypes {
"instanceView",
instanceView,
}
enum ExpandTypesForGetCapacityReservationGroups {
"virtualMachineScaleSetVMs/$ref",
"virtualMachines/$ref",
`virtualMachineScaleSetVMs/$ref`,
`virtualMachines/$ref`,
}
enum CapacityReservationInstanceViewTypes {
"instanceView",
instanceView,
}
enum ExecutionState {
"Unknown",
"Pending",
"Running",
"Failed",
"Succeeded",
"TimedOut",
"Canceled",
Unknown,
Pending,
Running,
Failed,
Succeeded,
TimedOut,
Canceled,
}
enum AvailabilitySetSkuTypes {
"Classic",
"Aligned",
Classic,
Aligned,
}
@Azure.Core.fixed
enum UpgradeMode {
"Automatic",
"Manual",
"Rolling",
Automatic,
Manual,
Rolling,
}
@Azure.Core.fixed
enum SettingNames {
"AutoLogon",
"FirstLogonCommands",
AutoLogon,
FirstLogonCommands,
}
@Azure.Core.fixed
enum ProtocolTypes {
"Http",
"Https",
Http,
Https,
}
@Azure.Core.fixed
enum CachingTypes {
"None",
"ReadOnly",
"ReadWrite",
None,
ReadOnly,
ReadWrite,
}
@Azure.Core.fixed
enum OperatingSystemTypes {
"Windows",
"Linux",
Windows,
Linux,
}
@Azure.Core.fixed
enum ResourceIdentityType {
"SystemAssigned",
"UserAssigned",
"SystemAssigned, UserAssigned",
"None",
SystemAssigned,
UserAssigned,
`SystemAssigned, UserAssigned`,
None,
}
@Azure.Core.fixed
enum StatusLevelTypes {
"Info",
"Warning",
"Error",
Info,
Warning,
Error,
}
@Azure.Core.fixed
enum VirtualMachineScaleSetSkuScaleType {
"Automatic",
"None",
Automatic,
None,
}
@Azure.Core.fixed
enum UpgradeState {
"RollingForward",
"Cancelled",
"Completed",
"Faulted",
RollingForward,
Cancelled,
Completed,
Faulted,
}
@Azure.Core.fixed
enum UpgradeOperationInvoker {
"Unknown",
"User",
"Platform",
Unknown,
User,
Platform,
}
@Azure.Core.fixed
enum RollingUpgradeStatusCode {
"RollingForward",
"Cancelled",
"Completed",
"Faulted",
RollingForward,
Cancelled,
Completed,
Faulted,
}
@Azure.Core.fixed
enum RollingUpgradeActionType {
"Start",
"Cancel",
Start,
Cancel,
}
@Azure.Core.fixed
enum MaintenanceOperationResultCodeTypes {
"None",
"RetryLater",
"MaintenanceAborted",
"MaintenanceCompleted",
None,
RetryLater,
MaintenanceAborted,
MaintenanceCompleted,
}
@Azure.Core.fixed
enum InstanceViewTypes {
"instanceView",
"userData",
instanceView,
userData,
}
@Azure.Core.fixed
enum DedicatedHostLicenseTypes {
"None",
"Windows_Server_Hybrid",
"Windows_Server_Perpetual",
None,
Windows_Server_Hybrid,
Windows_Server_Perpetual,
}
@Azure.Core.fixed
enum OperatingSystemStateTypes {
@doc("Generalized image. Needs to be provisioned during deployment time.")
"Generalized",
@doc("Specialized image. Contains already provisioned OS Disk.")
"Specialized",
Generalized,
@doc("Specialized image. Contains already provisioned OS Disk.") Specialized,
}
@Azure.Core.fixed
enum IntervalInMins {
"ThreeMins",
"FiveMins",
"ThirtyMins",
"SixtyMins",
ThreeMins,
FiveMins,
ThirtyMins,
SixtyMins,
}
@doc("The List Compute Operation operation response.")

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/microsoft-azure-compute-management",
"author": "Microsoft Corporation",
"description": "Compute Client",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Compute;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/azure-batch-service",
"author": "Microsoft Corporation",
"description": "A client for issuing REST requests to the Azure Batch service.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Azure Batch Service",
version: "2022-01-01.15.0",

Просмотреть файл

@ -1,15 +1,17 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace Azure.Batch;
@Azure.Core.fixed
enum OSType {
@doc("The Linux operating system.") "linux",
@doc("The Windows operating system.") "windows",
@doc("The Linux operating system.") linux,
@doc("The Windows operating system.") windows,
}
@Azure.Core.fixed
enum VerificationType {
@ -17,22 +19,22 @@ enum VerificationType {
The Image is guaranteed to be compatible with the associated Compute Node agent
SKU and all Batch features have been confirmed to work as expected.
""")
"verified",
verified,
@doc("""
The associated Compute Node agent SKU should have binary compatibility with the
Image, but specific functionality has not been verified.
""")
"unverified",
unverified,
}
@Azure.Core.fixed
enum CertificateState {
@doc("The Certificate is available for use in Pools.") "active",
@doc("The Certificate is available for use in Pools.") active,
@doc("""
The user has requested that the Certificate be deleted, but the delete
operation has not yet completed. You may not reference the Certificate when
creating or updating Pools.
""")
"deleting",
deleting,
@doc("""
The user requested that the Certificate be deleted, but there are Pools that
still have references to the Certificate, or it is still installed on one or
@ -47,30 +49,30 @@ the delete.
@Azure.Core.fixed
enum CertificateFormat {
@doc("The Certificate is a PFX (PKCS#12) formatted Certificate or Certificate chain.")
"pfx",
@doc("The Certificate is a base64-encoded X.509 Certificate.") "cer",
pfx,
@doc("The Certificate is a base64-encoded X.509 Certificate.") cer,
}
@Azure.Core.fixed
enum JobScheduleState {
@doc("The Job Schedule is active and will create Jobs as per its schedule.")
"active",
active,
@doc("""
The Job Schedule has terminated, either by reaching its end time or by the user
terminating it explicitly.
""")
"completed",
completed,
@doc("""
The user has disabled the Job Schedule. The scheduler will not initiate any new
Jobs will on this schedule, but any existing active Job will continue to run.
""")
"disabled",
disabled,
@doc("""
The Job Schedule has no more work to do, or has been explicitly terminated by
the user, but the termination operation is still in progress. The scheduler
will not initiate any new Jobs for this Job Schedule, nor is any existing Job
active.
""")
"terminating",
terminating,
@doc("""
The user has requested that the Job Schedule be deleted, but the delete
operation is still in progress. The scheduler will not initiate any new Jobs
@ -78,7 +80,7 @@ for this Job Schedule, and will delete any existing Jobs and Tasks under the
Job Schedule, including any active Job. The Job Schedule will be deleted when
all Jobs and Tasks under the Job Schedule have been deleted.
""")
"deleting",
deleting,
}
@Azure.Core.fixed
enum OnAllTasksComplete {
@ -110,12 +112,12 @@ enum ContainerWorkingDirectory {
Use the standard Batch service Task working directory, which will contain the
Task Resource Files populated by Batch.
""")
"taskWorkingDirectory",
taskWorkingDirectory,
@doc("""
Use the working directory defined in the container Image. Beware that this
directory will not contain the Resource Files downloaded by Batch.
""")
"containerImageDefault",
containerImageDefault,
}
@Azure.Core.fixed
enum OutputFileUploadCondition {
@ -132,12 +134,12 @@ was.
@Azure.Core.fixed
enum AutoUserScope {
@doc("Specifies that the service should create a new user for the Task.")
"task",
task,
@doc("""
Specifies that the Task runs as the common auto user Account which is created
on every Compute Node in a Pool.
""")
"pool",
pool,
}
@Azure.Core.fixed
enum ElevationLevel {
@ -147,7 +149,7 @@ enum ElevationLevel {
The user is a user with elevated access and operates with full Administrator
permissions.
""")
"admin",
admin,
}
@Azure.Core.fixed
enum PoolLifetimeOption {
@ -163,11 +165,11 @@ service creates the Pool when it creates the Job. If the 'job' option is
applied to a Job Schedule, the Batch service creates a new auto Pool for every
Job created on the schedule.
""")
"job",
job,
}
@Azure.Core.fixed
enum CachingType {
@doc("The caching mode for the disk is not enabled.") "none",
@doc("The caching mode for the disk is not enabled.") none,
@doc("The caching mode for the disk is read only.") readOnly: "readonly",
@doc("The caching mode for the disk is read and write.")
readWrite: "readwrite",
@ -191,39 +193,38 @@ encryption occurs at boot time.
}
@Azure.Core.fixed
enum NodePlacementPolicyType {
@doc("All nodes in the pool will be allocated in the same region.")
"regional",
@doc("All nodes in the pool will be allocated in the same region.") regional,
@doc("""
Nodes in the pool will be spread across different availability zones with best
effort balancing.
""")
"zonal",
zonal,
}
@Azure.Core.fixed
enum ComputeNodeFillType {
@doc("Tasks should be assigned evenly across all Compute Nodes in the Pool.")
"spread",
spread,
@doc("""
As many Tasks as possible (taskSlotsPerNode) should be assigned to each Compute
Node in the Pool before any Tasks are assigned to the next Compute Node in the
Pool.
""")
"pack",
pack,
}
@Azure.Core.fixed
enum DynamicVNetAssignmentScope {
@doc("No dynamic VNet assignment is enabled.") "none",
@doc("Dynamic VNet assignment is done per-job.") "job",
@doc("No dynamic VNet assignment is enabled.") none,
@doc("Dynamic VNet assignment is done per-job.") job,
}
@Azure.Core.fixed
enum InboundEndpointProtocol {
@doc("Use TCP for the endpoint.") "tcp",
@doc("Use UDP for the endpoint.") "udp",
@doc("Use TCP for the endpoint.") tcp,
@doc("Use UDP for the endpoint.") udp,
}
@Azure.Core.fixed
enum NetworkSecurityGroupRuleAccess {
@doc("Allow access.") "allow",
@doc("Deny access.") "deny",
@doc("Allow access.") allow,
@doc("Deny access.") deny,
}
@Azure.Core.fixed
enum IPAddressProvisioningType {
@ -259,7 +260,7 @@ this certificate will be visible to the Task as well.
The Certificate should be visible to the user accounts under which Job Tasks
are run.
""")
"task",
task,
@doc("""
The Certificate should be visible to the user accounts under which users
remotely access the Compute Node.
@ -272,7 +273,7 @@ enum LoginMode {
The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended
for long running parallel processes.
""")
"batch",
batch,
@doc("""
The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on Windows
VirtualMachineConfiguration Pools. If this option is used with an elevated user
@ -281,43 +282,43 @@ not be elevated unless the application executed by the Task command line is
configured to always require administrative privilege or to always require
maximum privilege.
""")
"interactive",
interactive,
}
@Azure.Core.fixed
enum JobState {
@doc("The Job is available to have Tasks scheduled.") "active",
@doc("The Job is available to have Tasks scheduled.") active,
@doc("""
A user has requested that the Job be disabled, but the disable operation is
still in progress (for example, waiting for Tasks to terminate).
""")
"disabling",
disabling,
@doc("""
A user has disabled the Job. No Tasks are running, and no new Tasks will be
scheduled.
""")
"disabled",
disabled,
@doc("""
A user has requested that the Job be enabled, but the enable operation is still
in progress.
""")
"enabling",
enabling,
@doc("""
The Job is about to complete, either because a Job Manager Task has completed
or because the user has terminated the Job, but the terminate operation is
still in progress (for example, because Job Release Tasks are running).
""")
"terminating",
terminating,
@doc("""
All Tasks have terminated, and the system will not accept any more Tasks or any
further changes to the Job.
""")
"completed",
completed,
@doc("""
A user has requested that the Job be deleted, but the delete operation is still
in progress (for example, because the system is still terminating running
Tasks).
""")
"deleting",
deleting,
}
@Azure.Core.fixed
enum ErrorCategory {
@ -332,53 +333,53 @@ enum DisableJobOption {
Terminate running Tasks and requeue them. The Tasks will run again when the Job
is enabled.
""")
"requeue",
requeue,
@doc("""
Terminate running Tasks. The Tasks will be completed with failureInfo
indicating that they were terminated, and will not run again.
""")
"terminate",
@doc("Allow currently running Tasks to complete.") "wait",
terminate,
@doc("Allow currently running Tasks to complete.") wait,
}
@Azure.Core.fixed
enum JobPreparationTaskState {
@doc("The Task is currently running (including retrying).") "running",
@doc("The Task is currently running (including retrying).") running,
@doc("""
The Task has exited with exit code 0, or the Task has exhausted its retry
limit, or the Batch service was unable to start the Task due to Task
preparation errors (such as resource file download failures).
""")
"completed",
completed,
}
@Azure.Core.fixed
enum TaskExecutionResult {
@doc("The Task ran successfully.") "success",
@doc("The Task ran successfully.") success,
@doc("""
There was an error during processing of the Task. The failure may have occurred
before the Task process was launched, while the Task process was executing, or
after the Task process exited.
""")
"failure",
failure,
}
@Azure.Core.fixed
enum JobReleaseTaskState {
@doc("The Task is currently running (including retrying).") "running",
@doc("The Task is currently running (including retrying).") running,
@doc("""
The Task has exited with exit code 0, or the Task has exhausted its retry
limit, or the Batch service was unable to start the Task due to Task
preparation errors (such as resource file download failures).
""")
"completed",
completed,
}
@Azure.Core.fixed
enum PoolState {
@doc("The Pool is available to run Tasks subject to the availability of Compute Nodes.")
"active",
active,
@doc("""
The user has requested that the Pool be deleted, but the delete operation has
not yet completed.
""")
"deleting",
deleting,
}
@Azure.Core.fixed
enum AllocationState {
@ -388,26 +389,26 @@ in the Pool in progress. A Pool enters this state when it is created and when
no operations are being performed on the Pool to change the number of Compute
Nodes.
""")
"steady",
steady,
@doc("""
The Pool is resizing; that is, Compute Nodes are being added to or removed from
the Pool.
""")
"resizing",
resizing,
@doc("""
The Pool was resizing, but the user has requested that the resize be stopped,
but the stop request has not yet been completed.
""")
"stopping",
stopping,
}
@Azure.Core.fixed
enum PoolIdentityType {
@doc("Batch pool has user assigned identities with it.") "UserAssigned",
@doc("Batch pool has user assigned identities with it.") UserAssigned,
@doc("""
Batch pool has no identity associated with it. Setting `None` in update pool
will remove existing identities.
""")
"None",
None,
}
@Azure.Core.fixed
enum ComputeNodeDeallocationOption {
@ -416,13 +417,13 @@ Terminate running Task processes and requeue the Tasks. The Tasks will run
again when a Compute Node is available. Remove Compute Nodes as soon as Tasks
have been terminated.
""")
"requeue",
requeue,
@doc("""
Terminate running Tasks. The Tasks will be completed with failureInfo
indicating that they were terminated, and will not run again. Remove Compute
Nodes as soon as Tasks have been terminated.
""")
"terminate",
terminate,
@doc("""
Allow currently running Tasks to complete. Schedule no new Tasks while waiting.
Remove Compute Nodes when all Tasks have completed.
@ -437,17 +438,17 @@ Compute Nodes when all Task retention periods have expired.
}
@Azure.Core.fixed
enum JobAction {
@doc("Take no action.") "none",
@doc("Take no action.") none,
@doc("""
Disable the Job. This is equivalent to calling the disable Job API, with a
disableTasks value of requeue.
""")
"disable",
disable,
@doc("""
Terminate the Job. The terminateReason in the Job's executionInfo is set to
\"TaskFailed\".
""")
"terminate",
terminate,
}
@Azure.Core.fixed
enum DependencyAction {
@ -455,9 +456,9 @@ enum DependencyAction {
Satisfy tasks waiting on this task; once all dependencies are satisfied, the
task will be scheduled to run.
""")
"satisfy",
satisfy,
@doc("Blocks tasks waiting on this task, preventing them from being scheduled.")
"block",
block,
}
@Azure.Core.fixed
enum TaskState {
@ -466,7 +467,7 @@ The Task is queued and able to run, but is not currently assigned to a Compute
Node. A Task enters this state when it is created, when it is enabled after
being disabled, or when it is awaiting a retry after a failed run.
""")
"active",
active,
@doc("""
The Task has been assigned to a Compute Node, but is waiting for a required Job
Preparation Task to complete on the Compute Node. If the Job Preparation Task
@ -474,25 +475,25 @@ succeeds, the Task will move to running. If the Job Preparation Task fails, the
Task will return to active and will be eligible to be assigned to a different
Compute Node.
""")
"preparing",
preparing,
@doc("""
The Task is running on a Compute Node. This includes task-level preparation
such as downloading resource files or deploying Packages specified on the Task
- it does not necessarily mean that the Task command line has started
executing.
""")
"running",
running,
@doc("""
The Task is no longer eligible to run, usually because the Task has finished
successfully, or the Task has finished unsuccessfully and has exhausted its
retry limit. A Task is also marked as completed if an error occurred launching
the Task, or when the Task has been terminated.
""")
"completed",
completed,
}
@Azure.Core.fixed
enum TaskAddStatus {
@doc("The Task was added successfully.") "success",
@doc("The Task was added successfully.") success,
@doc("""
The Task failed to add due to a client error and should not be retried without
modifying the request as appropriate.
@ -513,38 +514,38 @@ succeeds, the Task will move to running. If the Job Preparation Task fails, the
Task will return to active and will be eligible to be assigned to a different
Compute Node.
""")
"preparing",
preparing,
@doc("""
The Task is running on a Compute Node. This includes task-level preparation
such as downloading resource files or deploying Packages specified on the Task
- it does not necessarily mean that the Task command line has started
executing.
""")
"running",
running,
@doc("""
The Task is no longer eligible to run, usually because the Task has finished
successfully, or the Task has finished unsuccessfully and has exhausted its
retry limit. A Task is also marked as completed if an error occurred launching
the Task, or when the Task has been terminated.
""")
"completed",
completed,
}
@Azure.Core.fixed
enum ComputeNodeState {
@doc("The Compute Node is not currently running a Task.") "idle",
@doc("The Compute Node is rebooting.") "rebooting",
@doc("The Compute Node is reimaging.") "reimaging",
@doc("The Compute Node is not currently running a Task.") idle,
@doc("The Compute Node is rebooting.") rebooting,
@doc("The Compute Node is reimaging.") reimaging,
@doc("The Compute Node is running one or more Tasks (other than a StartTask).")
"running",
running,
@doc("The Compute Node cannot be used for Task execution due to errors.")
"unusable",
unusable,
@doc("""
The Batch service has obtained the underlying virtual machine from Azure
Compute, but it has not yet started to join the Pool.
""")
"creating",
creating,
@doc("The Batch service is starting on the underlying virtual machine.")
"starting",
starting,
@doc("""
The StartTask has started running on the Compute Node, but waitForSuccess is
set and the StartTask has not yet completed.
@ -559,7 +560,7 @@ waitForSuccess is set. The Compute Node is not usable for running Tasks.
The Batch service has lost contact with the Compute Node, and does not know its
true state.
""")
"unknown",
`unknown`,
@doc("""
The Compute Node is leaving the Pool, either because the user explicitly
removed it or because the Pool is resizing or autoscaling down.
@ -569,33 +570,33 @@ removed it or because the Pool is resizing or autoscaling down.
The Compute Node is not currently running a Task, and scheduling of new Tasks
to the Compute Node is disabled.
""")
"offline",
offline,
@doc("""
The Spot/Low-priority Compute Node has been preempted. Tasks which were running
on the Compute Node when it was preempted will be rescheduled when another
Compute Node becomes available.
""")
"preempted",
preempted,
}
@Azure.Core.fixed
enum SchedulingState {
@doc("Tasks can be scheduled on the Compute Node.") "enabled",
@doc("Tasks can be scheduled on the Compute Node.") enabled,
@doc("""
No new Tasks will be scheduled on the Compute Node. Tasks already running on
the Compute Node may still run to completion. All Compute Nodes start with
scheduling enabled.
""")
"disabled",
disabled,
}
@Azure.Core.fixed
enum StartTaskState {
@doc("The StartTask is currently running.") "running",
@doc("The StartTask is currently running.") running,
@doc("""
The StartTask has exited with exit code 0, or the StartTask has failed and the
retry limit has reached, or the StartTask process did not run due to Task
preparation errors (such as resource file download failures).
""")
"completed",
completed,
}
@Azure.Core.fixed
enum ComputeNodeRebootOption {
@ -604,13 +605,13 @@ Terminate running Task processes and requeue the Tasks. The Tasks will run
again when a Compute Node is available. Restart the Compute Node as soon as
Tasks have been terminated.
""")
"requeue",
requeue,
@doc("""
Terminate running Tasks. The Tasks will be completed with failureInfo
indicating that they were terminated, and will not run again. Restart the
Compute Node as soon as Tasks have been terminated.
""")
"terminate",
terminate,
@doc("""
Allow currently running Tasks to complete. Schedule no new Tasks while waiting.
Restart the Compute Node when all Tasks have completed.
@ -630,13 +631,13 @@ Terminate running Task processes and requeue the Tasks. The Tasks will run
again when a Compute Node is available. Reimage the Compute Node as soon as
Tasks have been terminated.
""")
"requeue",
requeue,
@doc("""
Terminate running Tasks. The Tasks will be completed with failureInfo
indicating that they were terminated, and will not run again. Reimage the
Compute Node as soon as Tasks have been terminated.
""")
"terminate",
terminate,
@doc("""
Allow currently running Tasks to complete. Schedule no new Tasks while waiting.
Reimage the Compute Node when all Tasks have completed.
@ -656,13 +657,13 @@ Terminate running Task processes and requeue the Tasks. The Tasks may run again
on other Compute Nodes, or when Task scheduling is re-enabled on this Compute
Node. Enter offline state as soon as Tasks have been terminated.
""")
"requeue",
requeue,
@doc("""
Terminate running Tasks. The Tasks will be completed with failureInfo
indicating that they were terminated, and will not run again. Enter offline
state as soon as Tasks have been terminated.
""")
"terminate",
terminate,
@doc("""
Allow currently running Tasks to complete. Schedule no new Tasks while waiting.
Enter offline state when all Tasks have completed.
@ -671,9 +672,9 @@ Enter offline state when all Tasks have completed.
}
@Azure.Core.fixed
enum StatusLevelTypes {
"Error",
"Info",
"Warning",
Error,
Info,
Warning,
}
@doc("The result of listing the applications available in an Account.")
@ -932,7 +933,7 @@ model NodeCounts {
leavingPool: int32;
@doc("The number of Compute Nodes in the unknown state.")
"unknown": int32;
`unknown`: int32;
@doc("The number of Compute Nodes in the unusable state.")
unusable: int32;

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/azure-batch-service",
"author": "Microsoft Corporation",
"description": "A client for issuing REST requests to the Azure Batch service.",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/autorest-complex-test-service",
"author": "Microsoft Corporation",
"description": "Test Infrastructure for AutoRest",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "AutoRest Complex Test Service",
version: "2016-02-29",

Просмотреть файл

@ -1,24 +1,26 @@
import "@cadl-lang/rest";
import "@typespec/rest";
import "@typespec/http";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace AutoRestComplexTestService;
enum CmykColors {
"cyan",
"Magenta",
"YELLOW",
"blacK",
cyan,
Magenta,
YELLOW,
blacK,
}
enum MyKind {
"Kind1",
Kind1,
}
enum GoblinSharkColor {
"pink",
"gray",
"brown",
pink,
gray,
brown,
@doc("Uppercase RED") upperRed: "RED",
@doc("Lowercase RED") lowerRed: "red",
}
@ -158,7 +160,7 @@ model DotFishMarket {
model DotSalmon extends DotFish {
location?: string;
iswild?: boolean;
"fish.type": "DotSalmon";
`fish.type`: "DotSalmon";
}
@discriminator("fishtype")

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/autorest-complex-test-service",
"author": "Microsoft Corporation",
"description": "Test Infrastructure for AutoRest",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace AutoRestComplexTestService;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/complex-model-client",
"author": "Microsoft Corporation",
"description": "Some cool documentation.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Complex Model Client",
version: "2014-04-01-preview",

Просмотреть файл

@ -1,6 +1,8 @@
import "@cadl-lang/rest";
import "@typespec/rest";
import "@typespec/http";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace ComplexModelClient;

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/complex-model-client",
"author": "Microsoft Corporation",
"description": "Some cool documentation.",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace ComplexModelClient;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/microsoft-cognitive-language-service---analyze-text-authoring",
"author": "Microsoft Corporation",
"description": "The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Microsoft Cognitive Language Service - Analyze Text Authoring",
version: "2022-05-13",

Просмотреть файл

@ -1,25 +1,27 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace Azure.Language.Authoring;
enum ConfidentialLedgerQueryState {
"Loading",
"Ready",
Loading,
Ready,
}
enum TransactionState {
"Committed",
"Pending",
Committed,
Pending,
}
enum ConfidentialLedgerUserRoleName {
"Administrator",
"Contributor",
"Reader",
Administrator,
Contributor,
Reader,
}
@doc("The governance script for the application.")

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/microsoft-cognitive-language-service---analyze-text-authoring",
"author": "Microsoft Corporation",
"description": "The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service.",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.Language.Authoring;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/azure-keyvault-service",
"author": "Microsoft Corporation",
"description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Azure Keyvault Service",
version: "7.4-preview.1",

Просмотреть файл

@ -1,7 +1,9 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.Keyvault;
@ -13,7 +15,7 @@ available against a Delete operation; the data is irretrievably lost upon
accepting a Delete operation at the entity level or higher (vault, resource
group, subscription etc.)
""")
"Purgeable",
Purgeable,
@doc("""
Denotes a vault state in which deletion is recoverable, and which also permits
immediate and permanent deletion (i.e. purge). This level guarantees the
@ -21,7 +23,7 @@ recoverability of the deleted entity during the retention interval (90 days),
unless a Purge operation is requested, or the subscription is cancelled. System
wil permanently delete it after 90 days, if not recovered
""")
"Recoverable+Purgeable",
`Recoverable+Purgeable`,
@doc("""
Denotes a vault state in which deletion is recoverable without the possibility
for immediate and permanent deletion (i.e. purge). This level guarantees the
@ -29,14 +31,14 @@ recoverability of the deleted entity during the retention interval(90 days) and
while the subscription is still available. System wil permanently delete it
after 90 days, if not recovered
""")
"Recoverable",
Recoverable,
@doc("""
Denotes a vault and subscription state in which deletion is recoverable within
retention interval (90 days), immediate and permanent deletion (i.e. purge) is
not permitted, and in which the subscription itself cannot be permanently
canceled. System wil permanently delete it after 90 days, if not recovered
""")
"Recoverable+ProtectedSubscription",
`Recoverable+ProtectedSubscription`,
@doc("""
Denotes a vault state in which deletion is recoverable, and which also permits
immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays
@ -44,7 +46,7 @@ immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays
the retention interval, unless a Purge operation is requested, or the
subscription is cancelled.
""")
"CustomizedRecoverable+Purgeable",
`CustomizedRecoverable+Purgeable`,
@doc("""
Denotes a vault state in which deletion is recoverable without the possibility
for immediate and permanent deletion (i.e. purge when 7<=
@ -52,7 +54,7 @@ SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the
deleted entity during the retention interval and while the subscription is
still available.
""")
"CustomizedRecoverable",
CustomizedRecoverable,
@doc("""
Denotes a vault and subscription state in which deletion is recoverable,
immediate and permanent deletion (i.e. purge) is not permitted, and in which
@ -61,73 +63,73 @@ SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the
deleted entity during the retention interval, and also reflects the fact that
the subscription itself cannot be cancelled.
""")
"CustomizedRecoverable+ProtectedSubscription",
`CustomizedRecoverable+ProtectedSubscription`,
}
enum JsonWebKeyType {
@doc("Elliptic Curve.") "EC",
@doc("Elliptic Curve.") EC,
@doc("Elliptic Curve with a private key which is stored in the HSM.")
"EC-HSM",
@doc("RSA (https://tools.ietf.org/html/rfc3447)") "RSA",
@doc("RSA with a private key which is stored in the HSM.") "RSA-HSM",
@doc("Octet sequence (used to represent symmetric keys)") "oct",
`EC-HSM`,
@doc("RSA (https://tools.ietf.org/html/rfc3447)") RSA,
@doc("RSA with a private key which is stored in the HSM.") `RSA-HSM`,
@doc("Octet sequence (used to represent symmetric keys)") oct,
@doc("Octet sequence (used to represent symmetric keys) which is stored the HSM.")
"oct-HSM",
@doc("Octet key pair (https://tools.ietf.org/html/rfc8037)") "OKP",
`oct-HSM`,
@doc("Octet key pair (https://tools.ietf.org/html/rfc8037)") OKP,
@doc("""
Octet key pair (https://tools.ietf.org/html/rfc8037) with a private key which
is stored in the HSM.
""")
"OKP-HSM",
`OKP-HSM`,
}
enum JsonWebKeyCurveName {
@doc("The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.") "P-256",
@doc("The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.") "P-384",
@doc("The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.") "P-521",
@doc("The SECG SECP256K1 elliptic curve.") "P-256K",
@doc("The Ed25519 Edwards curve.") "Ed25519",
@doc("The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.") `P-256`,
@doc("The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.") `P-384`,
@doc("The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.") `P-521`,
@doc("The SECG SECP256K1 elliptic curve.") `P-256K`,
@doc("The Ed25519 Edwards curve.") Ed25519,
}
enum KeyUsageType {
"digitalSignature",
"nonRepudiation",
"keyEncipherment",
"dataEncipherment",
"keyAgreement",
"keyCertSign",
"cRLSign",
"encipherOnly",
"decipherOnly",
digitalSignature,
nonRepudiation,
keyEncipherment,
dataEncipherment,
keyAgreement,
keyCertSign,
cRLSign,
encipherOnly,
decipherOnly,
}
enum JsonWebKeyOperation {
"encrypt",
"decrypt",
"sign",
"verify",
"wrapKey",
"unwrapKey",
"import",
"export",
encrypt,
decrypt,
sign,
verify,
wrapKey,
unwrapKey,
`import`,
export,
}
enum JsonWebKeyEncryptionAlgorithm {
"RSA-OAEP",
"RSA-OAEP-256",
"RSA1_5",
"A128GCM",
"A192GCM",
"A256GCM",
"A128KW",
"A192KW",
"A256KW",
"A128CBC",
"A192CBC",
"A256CBC",
"A128CBCPAD",
"A192CBCPAD",
"A256CBCPAD",
`RSA-OAEP`,
`RSA-OAEP-256`,
RSA1_5,
A128GCM,
A192GCM,
A256GCM,
A128KW,
A192KW,
A256KW,
A128CBC,
A192CBC,
A256CBC,
A128CBCPAD,
A192CBCPAD,
A256CBCPAD,
}
enum JsonWebKeySignatureAlgorithm {
@ -135,73 +137,73 @@ enum JsonWebKeySignatureAlgorithm {
RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in
https://tools.ietf.org/html/rfc7518
""")
"PS256",
PS256,
@doc("""
RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in
https://tools.ietf.org/html/rfc7518
""")
"PS384",
PS384,
@doc("""
RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in
https://tools.ietf.org/html/rfc7518
""")
"PS512",
PS512,
@doc("""
RSASSA-PKCS1-v1_5 using SHA-256, as described in
https://tools.ietf.org/html/rfc7518
""")
"RS256",
RS256,
@doc("""
RSASSA-PKCS1-v1_5 using SHA-384, as described in
https://tools.ietf.org/html/rfc7518
""")
"RS384",
RS384,
@doc("""
RSASSA-PKCS1-v1_5 using SHA-512, as described in
https://tools.ietf.org/html/rfc7518
""")
"RS512",
@doc("Reserved") "RSNULL",
RS512,
@doc("Reserved") RSNULL,
@doc("""
ECDSA using P-256 and SHA-256, as described in
https://tools.ietf.org/html/rfc7518.
""")
"ES256",
ES256,
@doc("""
ECDSA using P-384 and SHA-384, as described in
https://tools.ietf.org/html/rfc7518
""")
"ES384",
ES384,
@doc("""
ECDSA using P-521 and SHA-512, as described in
https://tools.ietf.org/html/rfc7518
""")
"ES512",
ES512,
@doc("""
ECDSA using P-256K and SHA-256, as described in
https://tools.ietf.org/html/rfc7518
""")
"ES256K",
ES256K,
@doc("""
Edwards-Curve Digital Signature Algorithm, as described in
https://tools.ietf.org/html/rfc8032.
""")
"EdDSA",
EdDSA,
}
enum KeyEncryptionAlgorithm {
"CKM_RSA_AES_KEY_WRAP",
"RSA_AES_KEY_WRAP_256",
"RSA_AES_KEY_WRAP_384",
CKM_RSA_AES_KEY_WRAP,
RSA_AES_KEY_WRAP_256,
RSA_AES_KEY_WRAP_384,
}
enum RoleDefinitionType {
"Microsoft.Authorization/roleDefinitions",
`Microsoft.Authorization/roleDefinitions`,
}
enum RoleType {
@doc("Built in role.") BuiltInRole: "AKVBuiltInRole",
@doc("Custom role.") "CustomRole",
@doc("Custom role.") CustomRole,
}
enum DataAction {
@ -281,25 +283,25 @@ enum RoleScope {
}
enum SettingTypeEnum {
"boolean",
boolean,
}
enum SasTokenType {
"account",
"service",
account,
service,
}
@Azure.Core.fixed
enum ActionType {
"EmailContacts",
"AutoRenew",
"rotate",
"notify",
EmailContacts,
AutoRenew,
rotate,
notify,
}
@Azure.Core.fixed
enum OperationStatus {
"Success",
"InProgress",
"Failed",
Success,
InProgress,
Failed,
}
model SASTokenParameter {

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/azure-keyvault-service",
"author": "Microsoft Corporation",
"description": "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.Keyvault;
@ -127,7 +127,7 @@ op DeleteCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
},
DeletedCertificateBundle
>;
@ -202,7 +202,7 @@ purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"issuer-name": string;
`issuer-name`: string;
@doc("Certificate issuer set parameter.")
@body
@ -223,7 +223,7 @@ op UpdateCertificateIssuer is Azure.Core.Foundations.Operation<
{
@doc("The name of the issuer.")
@path
"issuer-name": string;
`issuer-name`: string;
@doc("Certificate issuer update parameter.")
@body
@ -244,7 +244,7 @@ op GetCertificateIssuer is Azure.Core.Foundations.Operation<
{
@doc("The name of the issuer.")
@path
"issuer-name": string;
`issuer-name`: string;
},
IssuerBundle
>;
@ -261,7 +261,7 @@ op DeleteCertificateIssuer is Azure.Core.Foundations.Operation<
{
@doc("The name of the issuer.")
@path
"issuer-name": string;
`issuer-name`: string;
},
IssuerBundle
>;
@ -281,7 +281,7 @@ the purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("The parameters to create a certificate.")
@body
@ -308,7 +308,7 @@ the purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("The parameters to import the certificate.")
@body
@ -329,7 +329,7 @@ op GetCertificateVersions is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("""
Maximum number of results to return in a page. If not specified the service
@ -353,7 +353,7 @@ op GetCertificatePolicy is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate in a given key vault.")
@path
"certificate-name": string;
`certificate-name`: string;
},
CertificatePolicy
>;
@ -369,7 +369,7 @@ op UpdateCertificatePolicy is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate in the given vault.")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("The policy for the certificate.")
@body
@ -390,11 +390,11 @@ op UpdateCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate in the given key vault.")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("The version of the certificate.")
@path
"certificate-version": string;
`certificate-version`: string;
@doc("The parameters for certificate update.")
@body
@ -414,14 +414,14 @@ op GetCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate in the given vault.")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("""
The version of the certificate. This URI fragment is optional. If not
specified, the latest version of the certificate is returned.
""")
@path
"certificate-version": string;
`certificate-version`: string;
},
CertificateBundle
>;
@ -437,7 +437,7 @@ op UpdateCertificateOperation is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("The certificate operation response.")
@body
@ -457,7 +457,7 @@ op GetCertificateOperation is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
},
CertificateOperation
>;
@ -474,7 +474,7 @@ op DeleteCertificateOperation is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
},
CertificateOperation
>;
@ -494,7 +494,7 @@ op MergeCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
@doc("The parameters to merge certificate.")
@body
@ -515,7 +515,7 @@ op BackupCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate.")
@path
"certificate-name": string;
`certificate-name`: string;
},
BackupCertificateResult
>;
@ -578,7 +578,7 @@ op GetDeletedCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate")
@path
"certificate-name": string;
`certificate-name`: string;
},
DeletedCertificateBundle
>;
@ -596,7 +596,7 @@ op PurgeDeletedCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the certificate")
@path
"certificate-name": string;
`certificate-name`: string;
},
void
>;
@ -618,7 +618,7 @@ op RecoverDeletedCertificate is Azure.Core.Foundations.Operation<
{
@doc("The name of the deleted certificate")
@path
"certificate-name": string;
`certificate-name`: string;
},
CertificateBundle
>;
@ -643,7 +643,7 @@ the service. The value provided should not include personally identifiable or
sensitive information.
""")
@path
"key-name": string;
`key-name`: string;
@doc("The parameters to create a key.")
@body
@ -669,7 +669,7 @@ The name of key to be rotated. The system will generate a new version in the
specified key.
""")
@path
"key-name": string;
`key-name`: string;
},
KeyBundle
>;
@ -693,7 +693,7 @@ purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"key-name": string;
`key-name`: string;
@doc("The parameters to import a key.")
@body
@ -715,7 +715,7 @@ op DeleteKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key to delete.")
@path
"key-name": string;
`key-name`: string;
},
DeletedKeyBundle
>;
@ -735,11 +735,11 @@ op UpdateKey is Azure.Core.Foundations.Operation<
{
@doc("The name of key to update.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key to update.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters of the key to update.")
@body
@ -760,7 +760,7 @@ op GetKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key to get.")
@path
"key-name": string;
`key-name`: string;
@doc("""
Adding the version parameter retrieves a specific version of a key. This URI
@ -768,7 +768,7 @@ fragment is optional. If not specified, the latest version of the key is
returned.
""")
@path
"key-version": string;
`key-version`: string;
},
KeyBundle
>;
@ -784,7 +784,7 @@ op GetKeyVersions is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("""
Maximum number of results to return in a page. If not specified the service
@ -840,7 +840,7 @@ op BackupKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
},
BackupKeyResult
>;
@ -892,11 +892,11 @@ op encrypt is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for the encryption operation.")
@body
@ -925,11 +925,11 @@ op decrypt is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for the decryption operation.")
@body
@ -950,11 +950,11 @@ op sign is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for the signing operation.")
@body
@ -978,11 +978,11 @@ op verify is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for verify operations.")
@body
@ -1007,11 +1007,11 @@ op wrapKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for wrap operation.")
@body
@ -1037,11 +1037,11 @@ op unwrapKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
@doc("The version of the key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for the key operation.")
@body
@ -1061,11 +1061,11 @@ op release is Azure.Core.Foundations.Operation<
{
@doc("The name of the key to get.")
@path
"key-name": string;
`key-name`: string;
@doc("Adding the version parameter retrieves a specific version of a key.")
@path
"key-version": string;
`key-version`: string;
@doc("The parameters for the key release operation.")
@body
@ -1110,7 +1110,7 @@ op GetDeletedKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key.")
@path
"key-name": string;
`key-name`: string;
},
DeletedKeyBundle
>;
@ -1128,7 +1128,7 @@ op PurgeDeletedKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the key")
@path
"key-name": string;
`key-name`: string;
},
void
>;
@ -1147,7 +1147,7 @@ op RecoverDeletedKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the deleted key.")
@path
"key-name": string;
`key-name`: string;
},
KeyBundle
>;
@ -1163,7 +1163,7 @@ op GetKeyRotationPolicy is Azure.Core.Foundations.Operation<
{
@doc("The name of the key in a given key vault.")
@path
"key-name": string;
`key-name`: string;
},
KeyRotationPolicy
>;
@ -1179,7 +1179,7 @@ op UpdateKeyRotationPolicy is Azure.Core.Foundations.Operation<
{
@doc("The name of the key in the given vault.")
@path
"key-name": string;
`key-name`: string;
@doc("The policy for the key.")
@body
@ -1217,7 +1217,7 @@ purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"secret-name": string;
`secret-name`: string;
@doc("The parameters for setting the secret.")
@body
@ -1238,7 +1238,7 @@ op DeleteSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
},
DeletedSecretBundle
>;
@ -1256,11 +1256,11 @@ op UpdateSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
@doc("The version of the secret.")
@path
"secret-version": string;
`secret-version`: string;
@doc("The parameters for update secret operation.")
@body
@ -1280,14 +1280,14 @@ op GetSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
@doc("""
The version of the secret. This URI fragment is optional. If not specified, the
latest version of the secret is returned.
""")
@path
"secret-version": string;
`secret-version`: string;
},
SecretBundle
>;
@ -1325,7 +1325,7 @@ op GetSecretVersions is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
@doc("""
Maximum number of results to return in a page. If not specified, the service
@ -1368,7 +1368,7 @@ op GetDeletedSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
},
DeletedSecretBundle
>;
@ -1385,7 +1385,7 @@ op PurgeDeletedSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
},
void
>;
@ -1402,7 +1402,7 @@ op RecoverDeletedSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the deleted secret.")
@path
"secret-name": string;
`secret-name`: string;
},
SecretBundle
>;
@ -1419,7 +1419,7 @@ op BackupSecret is Azure.Core.Foundations.Operation<
{
@doc("The name of the secret.")
@path
"secret-name": string;
`secret-name`: string;
},
BackupSecretResult
>;
@ -1451,7 +1451,7 @@ op UpdateSettings is Azure.Core.Foundations.Operation<
{
@doc("The name of the account setting. Must be a valid settings option.")
@path
"setting-name": string;
`setting-name`: string;
@doc("The parameters to update an account setting.")
@body
@ -1468,7 +1468,7 @@ op GetSettingValue is Azure.Core.Foundations.Operation<
{
@doc("The name of the account setting. Must be a valid settings option.")
@path
"setting-name": string;
`setting-name`: string;
},
Setting
>;
@ -1529,7 +1529,7 @@ op GetDeletedStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
},
DeletedStorageBundle
>;
@ -1547,7 +1547,7 @@ op PurgeDeletedStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
},
void
>;
@ -1564,7 +1564,7 @@ op RecoverDeletedStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
},
StorageBundle
>;
@ -1580,7 +1580,7 @@ op BackupStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
},
BackupStorageResult
>;
@ -1611,7 +1611,7 @@ op DeleteStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
},
DeletedStorageBundle
>;
@ -1626,7 +1626,7 @@ op GetStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
},
StorageBundle
>;
@ -1645,7 +1645,7 @@ for the purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The parameters to create a storage account.")
@body
@ -1664,7 +1664,7 @@ op UpdateStorageAccount is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The parameters to update a storage account.")
@body
@ -1683,7 +1683,7 @@ op RegenerateStorageAccountKey is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The parameters to regenerate storage account key.")
@body
@ -1702,7 +1702,7 @@ op GetSasDefinitions is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("""
Maximum number of results to return in a page. If not specified the service
@ -1726,7 +1726,7 @@ op GetDeletedSasDefinitions is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("""
Maximum number of results to return in a page. If not specified the service
@ -1750,11 +1750,11 @@ op GetDeletedSasDefinition is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The name of the SAS definition.")
@path
"sas-definition-name": string;
`sas-definition-name`: string;
},
DeletedSasDefinitionBundle
>;
@ -1771,11 +1771,11 @@ op RecoverDeletedSasDefinition is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The name of the SAS definition.")
@path
"sas-definition-name": string;
`sas-definition-name`: string;
},
SasDefinitionBundle
>;
@ -1790,11 +1790,11 @@ op DeleteSasDefinition is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The name of the SAS definition.")
@path
"sas-definition-name": string;
`sas-definition-name`: string;
},
DeletedSasDefinitionBundle
>;
@ -1809,11 +1809,11 @@ op GetSasDefinition is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The name of the SAS definition.")
@path
"sas-definition-name": string;
`sas-definition-name`: string;
},
SasDefinitionBundle
>;
@ -1828,7 +1828,7 @@ op SetSasDefinition is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("""
The name of the SAS definition. The value you provide may be copied globally
@ -1836,7 +1836,7 @@ for the purpose of running the service. The value provided should not include
personally identifiable or sensitive information.
""")
@path
"sas-definition-name": string;
`sas-definition-name`: string;
@doc("The parameters to create a SAS definition.")
@body
@ -1855,11 +1855,11 @@ op UpdateSasDefinition is Azure.Core.Foundations.Operation<
{
@doc("The name of the storage account.")
@path
"storage-account-name": string;
`storage-account-name`: string;
@doc("The name of the SAS definition.")
@path
"sas-definition-name": string;
`sas-definition-name`: string;
@doc("The parameters to update a SAS definition.")
@body

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/notificationhubsclient",
"author": "Microsoft Corporation",
"description": "The Notification Hubs client performs operations to register and query devices, and send notifications",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "NotificationHubsClient",
version: "2020-06-01",

Просмотреть файл

@ -1,108 +1,110 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace NotificationHubsClient;
enum MSApiVersionType {
"2015-01",
"2015-04",
"2015-08",
"2016-07",
`2015-01`,
`2015-04`,
`2015-08`,
`2016-07`,
}
enum NotificationHubContentModelType {
"application/xml",
`application/xml`,
}
enum NotificationHubDescriptionModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum NotificationHubDescriptionModelAuthorizationRulesItemIType {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum NotificationHubDescriptionModelAuthorizationRulesItemClaimType {
"SharedAccessAuthorizationRule",
SharedAccessAuthorizationRule,
}
enum RegistrationEntryModelXmlnsM {
"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata",
`http://schemas.microsoft.com/ado/2007/08/dataservices/metadata`,
}
enum PlatformType {
"apns",
"wns",
"gcm",
"baidu",
"adm",
apns,
wns,
gcm,
baidu,
adm,
}
enum InstallationPatchType {
"add",
"remove",
"replace",
add,
remove,
replace,
}
enum FormatParameterType {
"apple",
"baidu",
"gcm",
"windows",
apple,
baidu,
gcm,
windows,
}
enum RegistrationContentModelType {
"application/xml",
`application/xml`,
}
enum AppleRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum AppleTemplateRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum BaiduRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum BaiduTemplateRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum GcmRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum GcmTemplateRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum WindowsRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum WindowsTemplateRegistrationContentModelXmlnsI {
"http://www.w3.org/2001/XMLSchema-instance",
`http://www.w3.org/2001/XMLSchema-instance`,
}
enum ApiVersionType {
"2015-01",
"2015-04",
"2015-08",
"2016-07",
"2020-06",
`2015-01`,
`2015-04`,
`2015-08`,
`2016-07`,
`2020-06`,
}
@Azure.Core.fixed
enum ContentType {
@doc("Content Type 'application/json;charset=utf-8'")
"application/json;charset=utf-8",
`application/json;charset=utf-8`,
@doc("Content Type 'application/xml;charset=utf-8'")
"application/xml;charset=utf-8",
`application/xml;charset=utf-8`,
}
model NotificationHubEntryModel {
@ -259,7 +261,7 @@ Set of named templates associated with the secondary tile. Applies only to the
}
model InstallationPatchModelItem {
"op": InstallationPatchType;
`op`: InstallationPatchType;
path: string;
value?: string;
}

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/notificationhubsclient",
"author": "Microsoft Corporation",
"description": "The Notification Hubs client performs operations to register and query devices, and send notifications",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace NotificationHubsClient;
@ -18,7 +18,7 @@ op DeleteNotificationHub is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -38,7 +38,7 @@ op GetNotificationHub is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -62,7 +62,7 @@ op CreateOrUpdateNotificationHub is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -70,7 +70,7 @@ op CreateOrUpdateNotificationHub is Azure.Core.Foundations.Operation<
@doc("ETag as returned by creation, update, and retrieval, or * (overwrite).")
@header
"If-Match": string;
`If-Match`: string;
@body body: NotificationHubEntryModel;
@doc("Accept header")
@ -91,7 +91,7 @@ op GetRegistrationsByTag is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -130,7 +130,7 @@ op CreateRegistrationId is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -150,7 +150,7 @@ op GetRegistrations is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -189,7 +189,7 @@ op CreateRegistration is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -213,7 +213,7 @@ op DeleteRegistration is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Registration ID parameter")
@path
@ -221,7 +221,7 @@ op DeleteRegistration is Azure.Core.Foundations.Operation<
@doc("ETag as returned by creation, update, and retrieval, or * (overwrite).")
@header
"If-Match": string;
`If-Match`: string;
@doc("Authorization Header value")
@header
@ -241,7 +241,7 @@ op GetRegistration is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Registration ID parameter")
@path
@ -269,7 +269,7 @@ op CreateOrUpdateRegistration is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Registration ID parameter")
@path
@ -299,7 +299,7 @@ op DeleteInstallation is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Installation ID parameter")
@path
@ -319,7 +319,7 @@ op GetInstallation is Azure.Core.ResourceRead<
parameters: {
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -338,7 +338,7 @@ op PatchInstallation is Azure.Core.ResourceCreateOrUpdate<
parameters: {
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -354,7 +354,7 @@ op CreateOrUpdateInstallation is Azure.Core.ResourceCreateOrReplace<
parameters: {
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -374,7 +374,7 @@ op SendMessage is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -382,15 +382,15 @@ op SendMessage is Azure.Core.Foundations.Operation<
@doc("Device handle for the PNS")
@header
"ServiceBusNotification-DeviceHandle": string;
`ServiceBusNotification-DeviceHandle`: string;
@doc("Platform type for the notification")
@header
"ServiceBusNotification-Format": FormatParameterType;
`ServiceBusNotification-Format`: FormatParameterType;
@doc("Notification message tags for targeting")
@header
"ServiceBusNotification-Tags": string;
`ServiceBusNotification-Tags`: string;
@doc("Direct Send")
@query
@ -398,43 +398,43 @@ op SendMessage is Azure.Core.Foundations.Operation<
@doc("The apns-topic header")
@header
"apns-topic": string;
`apns-topic`: string;
@doc("The apns-priority header")
@header
"apns-priority": string;
`apns-priority`: string;
@doc("The apns-push-type header")
@header
"apns-push-type": string;
`apns-push-type`: string;
@doc(" X-WNS-Cache-Policy header parameter")
@header
"X-WNS-Cache-Policy": string;
`X-WNS-Cache-Policy`: string;
@doc("X-WNS-PRIORITY header parameter")
@header
"X-WNS-PRIORITY": string;
`X-WNS-PRIORITY`: string;
@doc("X-WNS-RequestForStatus header parameter")
@header
"X-WNS-RequestForStatus": string;
`X-WNS-RequestForStatus`: string;
@doc("X-WNS-Tag header parameter")
@header
"X-WNS-Tag": string;
`X-WNS-Tag`: string;
@doc("X-WNS-TTL header parameter")
@header
"X-WNS-TTL": string;
`X-WNS-TTL`: string;
@doc("X-WNS-Type header parameter")
@header
"X-WNS-Type": string;
`X-WNS-Type`: string;
@doc("Upload file type")
@header
"Content-Type": ContentType;
`Content-Type`: ContentType;
@doc("The notification message body")
@body
@ -454,7 +454,7 @@ op SendMessage is Azure.Core.Foundations.Operation<
@doc("API Version")
@header
"x-ms-version": MSApiVersionType;
`x-ms-version`: MSApiVersionType;
@doc("Authorization Header value")
@header
@ -462,15 +462,15 @@ op SendMessage is Azure.Core.Foundations.Operation<
@doc("Device handle for the PNS")
@header
"ServiceBusNotification-DeviceHandle": string;
`ServiceBusNotification-DeviceHandle`: string;
@doc("Platform type for the notification")
@header
"ServiceBusNotification-Format": FormatParameterType;
`ServiceBusNotification-Format`: FormatParameterType;
@doc("Notification message tags for targeting")
@header
"ServiceBusNotification-Tags": string;
`ServiceBusNotification-Tags`: string;
@doc("Direct Send")
@query
@ -478,43 +478,43 @@ op SendMessage is Azure.Core.Foundations.Operation<
@doc("The apns-topic header")
@header
"apns-topic": string;
`apns-topic`: string;
@doc("The apns-priority header")
@header
"apns-priority": string;
`apns-priority`: string;
@doc("The apns-push-type header")
@header
"apns-push-type": string;
`apns-push-type`: string;
@doc(" X-WNS-Cache-Policy header parameter")
@header
"X-WNS-Cache-Policy": string;
`X-WNS-Cache-Policy`: string;
@doc("X-WNS-PRIORITY header parameter")
@header
"X-WNS-PRIORITY": string;
`X-WNS-PRIORITY`: string;
@doc("X-WNS-RequestForStatus header parameter")
@header
"X-WNS-RequestForStatus": string;
`X-WNS-RequestForStatus`: string;
@doc("X-WNS-Tag header parameter")
@header
"X-WNS-Tag": string;
`X-WNS-Tag`: string;
@doc("X-WNS-TTL header parameter")
@header
"X-WNS-TTL": string;
`X-WNS-TTL`: string;
@doc("X-WNS-Type header parameter")
@header
"X-WNS-Type": string;
`X-WNS-Type`: string;
@doc("Upload file type")
@header
"Content-Type": ContentType;
`Content-Type`: ContentType;
@doc("The notification message body")
@body

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/openai",
"author": "Microsoft Corporation",
"description": "Azure OpenAI APIs for completions and search",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "OpenAI",
version: "2022-06-01-preview",

Просмотреть файл

@ -1,6 +1,8 @@
import "@cadl-lang/rest";
import "@typespec/rest";
import "@typespec/http";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.AI.OpenAI;
@ -83,7 +85,7 @@ have logprobs returned. Minimum of 0 and maximum of 100 allowed.
logprobs?: int32;
@doc("The name of the model to use")
"model"?: string;
`model`?: string;
@doc("Echo back the prompt in addition to the completion")
echo?: boolean;
@ -142,7 +144,7 @@ model PathsMaorw9DeploymentsDeploymentIdCompletionsPostResponses200ContentApplic
id?: string;
object?: string;
created?: int32;
"model"?: string;
`model`?: string;
choices?: Post200ApplicationJsonPropertiesItemsItem[];
}
@ -197,7 +199,7 @@ lists
inputType?: string;
@doc("ID of the model to use")
"model"?: string;
`model`?: string;
}
@doc("""

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/openai",
"author": "Microsoft Corporation",
"description": "Azure OpenAI APIs for completions and search",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.AI.OpenAI;
@ -14,7 +14,7 @@ interface completionsOperations {
@post
create is Azure.Core.Foundations.Operation<
{
@path "deployment-id": string;
@path `deployment-id`: string;
@body
body: Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplicationJsonSchema;
},
@ -31,7 +31,7 @@ interface embeddingsOperations {
{
@doc("deployment id of the model which was deployed")
@path
"deployment-id": string;
`deployment-id`: string;
@body
body: Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema;
},

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,16 +0,0 @@
{
"name": "@cadl-api-spec/autorest-paging-test-service",
"author": "Microsoft Corporation",
"description": "Long-running Operation for AutoRest",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "AutoRest Paging Test Service",
version: "1.0.0",

Просмотреть файл

@ -1,23 +1,25 @@
import "@cadl-lang/rest";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
namespace AutoRestPagingTestService;
enum OperationResultStatus {
"Succeeded",
"Failed",
"canceled",
"Accepted",
"Creating",
"Created",
"Updating",
"Updated",
"Deleting",
"Deleted",
"OK",
Succeeded,
Failed,
canceled,
Accepted,
Creating,
Created,
Updating,
Updated,
Deleting,
Deleted,
OK,
}
model ProductResultValue is Azure.Core.Page<Product>;

Просмотреть файл

@ -0,0 +1,17 @@
{
"name": "@typespec-api-spec/autorest-paging-test-service",
"author": "Microsoft Corporation",
"description": "Long-running Operation for AutoRest",
"license": "MIT",
"dependencies": {
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true
}

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace AutoRestPagingTestService;
@ -45,7 +45,7 @@ returns a next link. Second (and final) call, will give you an items list of 1.
@get
getMultiplePages is Azure.Core.Foundations.Operation<
{
@header "client-request-id": string;
@header `client-request-id`: string;
@doc("Sets the maximum number of items to return in the response.")
@header
@ -132,7 +132,7 @@ a ProductResult
@get
getOdataMultiplePages is Azure.Core.Foundations.Operation<
{
@header "client-request-id": string;
@header `client-request-id`: string;
@doc("Sets the maximum number of items to return in the response.")
@header
@ -153,7 +153,7 @@ seconds. The default is 30 seconds.
@get
getMultiplePagesWithOffset is Azure.Core.Foundations.Operation<
{
@header "client-request-id": string;
@header `client-request-id`: string;
@doc("Sets the maximum number of items to return in the response.")
@header
@ -257,7 +257,7 @@ parameters grouped
@post
GetMultiplePagesLRO is Azure.Core.Foundations.Operation<
{
@header "client-request-id": string;
@header `client-request-id`: string;
@doc("Sets the maximum number of items to return in the response.")
@header

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "QnA Maker",
version: "2022-07-01-preview",

Просмотреть файл

@ -1,55 +1,57 @@
import "@cadl-lang/rest";
import "@typespec/rest";
import "@typespec/http";
using Cadl.Rest;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.Language.QnAMaker;
enum RankerKind {
@doc("Question only ranker.") "QuestionOnly",
@doc("Default ranker.") "Default",
@doc("Question only ranker.") QuestionOnly,
@doc("Default ranker.") Default,
}
enum LogicalOperationKind {
"AND",
"OR",
AND,
OR,
}
enum ErrorCode {
"InvalidRequest",
"InvalidArgument",
"Unauthorized",
"Forbidden",
"NotFound",
"ProjectNotFound",
"OperationNotFound",
"AzureCognitiveSearchNotFound",
"AzureCognitiveSearchIndexNotFound",
"TooManyRequests",
"AzureCognitiveSearchThrottling",
"AzureCognitiveSearchIndexLimitReached",
"InternalServerError",
"ServiceUnavailable",
"Timeout",
"QuotaExceeded",
"Conflict",
"Warning",
InvalidRequest,
InvalidArgument,
Unauthorized,
Forbidden,
NotFound,
ProjectNotFound,
OperationNotFound,
AzureCognitiveSearchNotFound,
AzureCognitiveSearchIndexNotFound,
TooManyRequests,
AzureCognitiveSearchThrottling,
AzureCognitiveSearchIndexLimitReached,
InternalServerError,
ServiceUnavailable,
Timeout,
QuotaExceeded,
Conflict,
Warning,
}
enum InnerErrorCode {
"InvalidRequest",
"InvalidParameterValue",
"KnowledgeBaseNotFound",
"AzureCognitiveSearchNotFound",
"AzureCognitiveSearchThrottling",
"ExtractionFailure",
"InvalidRequestBodyFormat",
"EmptyRequest",
"MissingInputDocuments",
"InvalidDocument",
"ModelVersionIncorrect",
"InvalidDocumentBatch",
"UnsupportedLanguageCode",
"InvalidCountryHint",
InvalidRequest,
InvalidParameterValue,
KnowledgeBaseNotFound,
AzureCognitiveSearchNotFound,
AzureCognitiveSearchThrottling,
ExtractionFailure,
InvalidRequestBodyFormat,
EmptyRequest,
MissingInputDocuments,
InvalidDocument,
ModelVersionIncorrect,
InvalidDocumentBatch,
UnsupportedLanguageCode,
InvalidCountryHint,
}
enum StringIndexType {
@ -59,19 +61,19 @@ and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this
option if your application is written in .Net Framework or .Net Core and you
will be using StringInfo.
""")
"TextElements_v8",
TextElements_v8,
@doc("""
Returned offset and length values will correspond to Unicode code points. Use
this option if your application is written in a language that support Unicode,
for example Python.
""")
"UnicodeCodePoint",
UnicodeCodePoint,
@doc("""
Returned offset and length values will correspond to UTF-16 code units. Use
this option if your application is written in a language that support Unicode,
for example Java, JavaScript.
""")
"Utf16CodeUnit",
Utf16CodeUnit,
}
@doc("Parameters to query a knowledge base.")

Просмотреть файл

@ -1,15 +1,16 @@
{
"name": "@cadl-api-spec/qna-maker",
"name": "@typespec-api-spec/qna-maker",
"author": "Microsoft Corporation",
"description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\">https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview</a>.",
"license": "MIT",
"dependencies": {
"@cadl-lang/compiler": "^0.40.0",
"@cadl-lang/rest": "^0.40.0",
"@cadl-lang/versioning": "^0.40.0",
"@cadl-lang/prettier-plugin-cadl": "^0.40.0",
"@azure-tools/cadl-azure-core": "^0.26.0",
"@azure-tools/cadl-autorest": "^0.26.0",
"@typespec/compiler": "^0.41.0",
"@typespec/rest": "^0.41.0",
"@typespec/http": "^0.41.0",
"@typespec/versioning": "^0.41.0",
"@typespec/prettier-plugin-typespec": "^0.41.0",
"@azure-tools/typespec-azure-core": "^0.27.0",
"@azure-tools/typespec-autorest": "^0.27.0",
"prettier": "^2.7.1"
},
"private": true

Просмотреть файл

@ -1,9 +1,9 @@
import "@azure-tools/cadl-azure-core";
import "@cadl-lang/rest";
import "./models.cadl";
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
namespace Azure.Language.QnAMaker;

Просмотреть файл

@ -0,0 +1,14 @@
emitters:
"@azure-tools/typespec-autorest": true
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code
# "@azure-tools/typespec-java": true
# Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code
# "@azure-tools/typespec-csharp": true
# Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code
# "@azure-tools/typespec-ts": true

Просмотреть файл

@ -1,14 +0,0 @@
emitters:
"@azure-tools/cadl-autorest": true
# Uncomment this line and add "@azure-tools/cadl-python" to your package.json to generate Python code
# "@azure-tools/cadl-python":
# "basic-setup-py": true
# "package-version":
# "package-name":
# "output-path":
# Uncomment this line and add "@azure-tools/cadl-java" to your package.json to generate Java code
# "@azure-tools/cadl-java": true
# Uncomment this line and add "@azure-tools/cadl-csharp" to your package.json to generate C# code
# "@azure-tools/cadl-csharp": true
# Uncomment this line and add "@azure-tools/cadl-typescript" to your package.json to generate Typescript code
# "@azure-tools/cadl-typescript": true

Просмотреть файл

@ -1,8 +1,9 @@
import "@cadl-lang/rest";
import "./routes.cadl";
import "@typespec/rest";
import "@typespec/http";
import "./routes.tsp";
using Cadl.Rest;
using Cadl.Http;
using TypeSpec.Rest;
using TypeSpec.Http;
@service({
title: "Microsoft Cognitive Language Service - Question Answering - Authoring",
version: "2023-04-01",

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше