1. support new flatten decorator and add `client.tsp`: fix
https://github.com/Azure/autorest/issues/4850
2. fix doc comment escape issue: fix #4876
3. support new location resource expression: fix:
https://github.com/Azure/autorest/issues/4880
This commit is contained in:
Chenjie Shi 2024-02-09 08:33:44 +08:00 коммит произвёл GitHub
Родитель 1579900a2a
Коммит 81026f1b0d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
94 изменённых файлов: 897 добавлений и 449 удалений

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

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@autorest/openapi-to-typespec",
"comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem.",
"type": "minor"
}
],
"packageName": "@autorest/openapi-to-typespec"
}

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

@ -15,14 +15,14 @@ dependencies:
specifier: ~3.0.0
version: 3.0.255
'@azure-tools/typespec-autorest':
specifier: ^0.38.0
version: 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0)
specifier: ^0.39.0
version: 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0)
'@azure-tools/typespec-azure-core':
specifier: ^0.38.0
version: 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0)
specifier: ^0.39.0
version: 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)
'@azure-tools/typespec-azure-resource-manager':
specifier: ^0.38.0
version: 0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0)
specifier: ^0.39.0
version: 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0)
'@azure-tools/uri':
specifier: ~3.1.1
version: 3.1.1
@ -165,26 +165,26 @@ dependencies:
specifier: ^6.11.0
version: 6.11.0(eslint@8.53.0)(typescript@5.2.2)
'@typespec/compiler':
specifier: ^0.52.0
version: 0.52.0
specifier: ^0.53.0
version: 0.53.0
'@typespec/http':
specifier: ^0.52.0
version: 0.52.0(@typespec/compiler@0.52.0)
specifier: ^0.53.0
version: 0.53.0(@typespec/compiler@0.53.0)
'@typespec/openapi':
specifier: ^0.52.0
version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
specifier: ^0.53.0
version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/openapi3':
specifier: ^0.52.0
version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0)
specifier: ^0.53.0
version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0)
'@typespec/prettier-plugin-typespec':
specifier: ^0.52.0
version: 0.52.0
specifier: ^0.53.0
version: 0.53.0
'@typespec/rest':
specifier: ^0.52.0
version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
specifier: ^0.53.0
version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/versioning':
specifier: ^0.52.0
version: 0.52.0(@typespec/compiler@0.52.0)
specifier: ^0.53.0
version: 0.53.0(@typespec/compiler@0.53.0)
ajv:
specifier: ^8.6.0
version: 8.12.0
@ -393,57 +393,58 @@ packages:
engines: {node: '>=10.12.0'}
dev: false
/@azure-tools/typespec-autorest@0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0):
resolution: {integrity: sha512-lBxuAtmE9kCeafSqwsiAp1sjVTEl4PdxxLq22zbQag2/ISLjVAXCae62+qULzqpY7pbDU03f/4tjvf4W7EPwXQ==}
/@azure-tools/typespec-autorest@0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0):
resolution: {integrity: sha512-jfCPzqroiVD0jHPPJX2IpdC7U0Q2yx5QYzucCp1GcOYKbRKNO3vcIEVHArn9rSKbJQR7IKDozEeubMMHINjsnQ==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@azure-tools/typespec-azure-core': ~0.38.0
'@typespec/compiler': ~0.52.0
'@typespec/http': ~0.52.0
'@typespec/openapi': ~0.52.0
'@typespec/rest': ~0.52.0
'@typespec/versioning': ~0.52.0
'@azure-tools/typespec-azure-core': ~0.39.0
'@azure-tools/typespec-client-generator-core': ~0.39.0
'@typespec/compiler': ~0.53.0
'@typespec/http': ~0.53.0
'@typespec/openapi': ~0.53.0
'@typespec/rest': ~0.53.0
'@typespec/versioning': ~0.53.0
dependencies:
'@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0)
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0)
'@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
'@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0)
dev: false
/@azure-tools/typespec-azure-core@0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0):
resolution: {integrity: sha512-ASM+njC2lpzPykzw2OicWIaAOH+OBe3bVMrufEnINBjlr7owAtudvjrTLLWmAVMBciL/YOF579KdyjxTbaxJ5A==}
/@azure-tools/typespec-azure-core@0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0):
resolution: {integrity: sha512-M7CwPdTRUu6jGiEbZg4K/ikUjJxoBJ8ii393dDoxCBhwsYElRm7rCtdzuLJ584gSNZkGtR/1Jd2wl3xRoaCqXg==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@typespec/compiler': ~0.52.0
'@typespec/http': ~0.52.0
'@typespec/rest': ~0.52.0
'@typespec/compiler': ~0.53.0
'@typespec/http': ~0.53.0
'@typespec/rest': ~0.53.0
dependencies:
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
'@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
dev: false
/@azure-tools/typespec-azure-resource-manager@0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0):
resolution: {integrity: sha512-jWMwIzT5WCokIW0IOTi/yqc5UsO47Mw+k9CGBwSmggYug/hmDELz+AfNyL/0T+rM2eF+5R/IrMKFI4Hq/OE9vQ==}
/@azure-tools/typespec-azure-resource-manager@0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0):
resolution: {integrity: sha512-vX7Xxg5lnSxFArVFR7MTLqGJkiYuwaaA6w2q4N735kAgfGe+VFpOF/EqkChGnz4/iqDSDMwT3cr39oV4tmJnPw==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@azure-tools/typespec-autorest': ~0.38.0
'@azure-tools/typespec-azure-core': ~0.38.0
'@typespec/compiler': ~0.52.0
'@typespec/http': ~0.52.0
'@typespec/openapi': ~0.52.0
'@typespec/rest': ~0.52.0
'@typespec/versioning': ~0.52.0
'@azure-tools/typespec-autorest': ~0.39.0
'@azure-tools/typespec-azure-core': ~0.39.0
'@typespec/compiler': ~0.53.0
'@typespec/http': ~0.53.0
'@typespec/openapi': ~0.53.0
'@typespec/rest': ~0.53.0
'@typespec/versioning': ~0.53.0
dependencies:
'@azure-tools/typespec-autorest': 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0)
'@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0)
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0)
'@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0)
'@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
'@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0)
dev: false
/@azure-tools/uri@3.1.1:
@ -472,14 +473,6 @@ packages:
'@babel/highlight': 7.22.20
dev: false
/@babel/code-frame@7.22.13:
resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/highlight': 7.22.20
chalk: 2.4.2
dev: false
/@babel/code-frame@7.23.5:
resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==}
engines: {node: '>=6.9.0'}
@ -498,7 +491,7 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@ampproject/remapping': 2.2.1
'@babel/code-frame': 7.22.13
'@babel/code-frame': 7.23.5
'@babel/generator': 7.23.3
'@babel/helper-compilation-targets': 7.22.15
'@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3)
@ -780,7 +773,7 @@ packages:
resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.22.13
'@babel/code-frame': 7.23.5
'@babel/parser': 7.23.3
'@babel/types': 7.23.3
dev: false
@ -789,7 +782,7 @@ packages:
resolution: {integrity: sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.22.13
'@babel/code-frame': 7.23.5
'@babel/generator': 7.23.3
'@babel/helper-environment-visitor': 7.22.20
'@babel/helper-function-name': 7.23.0
@ -1772,8 +1765,8 @@ packages:
eslint-visitor-keys: 3.4.3
dev: false
/@typespec/compiler@0.52.0:
resolution: {integrity: sha512-36cZ5RWxRjL4SUe41KjPh3j3RQibpUoOzHcSllQJ3ByTSZdXv1zckMHLiRfaAbTXUADSAn2GMs4ZO3s8GdOGIQ==}
/@typespec/compiler@0.53.0:
resolution: {integrity: sha512-07zb6mXwMX7ps7q+ubwBNb8Vz4ewmqrymAwnWZcl40r2VMsyZIQZM9ZPao87imCA+fWiPOKblIzRB7OVq3XOPg==}
engines: {node: '>=18.0.0'}
hasBin: true
dependencies:
@ -1792,66 +1785,66 @@ packages:
yargs: 17.7.2
dev: false
/@typespec/http@0.52.0(@typespec/compiler@0.52.0):
resolution: {integrity: sha512-8UluHzYV3zZFSRuKYeQombaJzYMAq8lcM7ysOY6zxmagRxv/L2LAG5iMu7iSrM48I7PR+WVhXSonRA0xhHctfw==}
/@typespec/http@0.53.0(@typespec/compiler@0.53.0):
resolution: {integrity: sha512-Hdwbxr6KgzmJdULbbcwWaSSrWlduuMuEVUVdlytxyo9K+aoUCcPl0thR5Ez2VRh02/IJl3xG4n5wXgOwWb3amA==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@typespec/compiler': ~0.52.0
'@typespec/compiler': ~0.53.0
dependencies:
'@typespec/compiler': 0.52.0
'@typespec/compiler': 0.53.0
dev: false
/@typespec/openapi3@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0):
resolution: {integrity: sha512-PPhNdpKQD2iHJemOaRUhnaeFWa4ApW4HtcZI+jrg4hyNSIwDYxL0OwwRohKjRUKM98iacpXvEh+5rKtkPiY2Qw==}
/@typespec/openapi3@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0):
resolution: {integrity: sha512-wcgwYJP/UPwuYlJbCSbhI3+G+RnZaaj5xwUEDD2QPkIhIiwhETyuXaN0ZFTSQWUTmypXt/e21KPUwHO03RpIdA==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@typespec/compiler': ~0.52.0
'@typespec/http': ~0.52.0
'@typespec/openapi': ~0.52.0
'@typespec/versioning': ~0.52.0
'@typespec/compiler': ~0.53.0
'@typespec/http': ~0.53.0
'@typespec/openapi': ~0.53.0
'@typespec/versioning': ~0.53.0
dependencies:
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
'@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0)
yaml: 2.3.4
dev: false
/@typespec/openapi@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0):
resolution: {integrity: sha512-2Otnu9glehxvp6TU7NOHEniBDDKufV03XTmeVGgGEmu/j+cveAMg8lA1/O0RBpS2oHGsCFnMEuPcR8M1c0LI+Q==}
/@typespec/openapi@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0):
resolution: {integrity: sha512-FRHb6Wi4Yf1HGm3EnhhXZ0Bw+EIPam6ptxRy7NDRxyMnzHsOphGcv8mDIZk6MPSy8xPasbFNwaRC1TXpxVhQBw==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@typespec/compiler': ~0.52.0
'@typespec/http': ~0.52.0
'@typespec/compiler': ~0.53.0
'@typespec/http': ~0.53.0
dependencies:
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
dev: false
/@typespec/prettier-plugin-typespec@0.52.0:
resolution: {integrity: sha512-6l4LylxfCVvAdbCiqFqJwPYyRkzV+TjZ/gQsOPqNlqxTDsMq61A6QT01BSftocJWRTFdSXP4Z3r2LP9E8FoNrg==}
/@typespec/prettier-plugin-typespec@0.53.0:
resolution: {integrity: sha512-ARLKZubDWKafpHavrtBrGtwkmisuBIsZGqpBrZPGQ5NTS8KAWSCAkouZ+HvDZ+S17kP/a3kADJnxgKhQMTmjEA==}
dependencies:
prettier: 3.1.1
dev: false
/@typespec/rest@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0):
resolution: {integrity: sha512-dLsY0fS60IVaAt4eCRcvEqorX/miPVV33du3dETTYYmbHtfEbvBKgTj/m6OH4noey7oaihlvLz5kYyLv8Am7zA==}
/@typespec/rest@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0):
resolution: {integrity: sha512-aA75Ol2pRvUjtRqQvFHmFG52pkeif3m+tboLAT00AekTxOPZ3rqQmlE12ne4QF8KjgHA6denqH4f/XyDoRJOJQ==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@typespec/compiler': ~0.52.0
'@typespec/http': ~0.52.0
'@typespec/compiler': ~0.53.0
'@typespec/http': ~0.53.0
dependencies:
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
dev: false
/@typespec/versioning@0.52.0(@typespec/compiler@0.52.0):
resolution: {integrity: sha512-Vr4WHaZiDOxJqRp8/u6X0R45E+rFKEprYmSZX0o5bzetj0cVjOIEbQZvDJCif1Uz0S3K0KKfqf/kYmdYWMJ7Dw==}
/@typespec/versioning@0.53.0(@typespec/compiler@0.53.0):
resolution: {integrity: sha512-nrrLXCWPDrrClAfpCMzQ3YPTbKQmjPC3LSeMjq+wPiMq+1PW95ulOGD4QiCBop+4wKhMCJHnqqSzVauT1LjdvQ==}
engines: {node: '>=18.0.0'}
peerDependencies:
'@typespec/compiler': ~0.52.0
'@typespec/compiler': ~0.53.0
dependencies:
'@typespec/compiler': 0.52.0
'@typespec/compiler': 0.53.0
dev: false
/@ungap/structured-clone@1.2.0:
@ -5162,7 +5155,7 @@ packages:
resolution: {integrity: sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==}
engines: {node: '>= 10.14.2'}
dependencies:
'@babel/code-frame': 7.22.13
'@babel/code-frame': 7.23.5
'@jest/types': 26.6.2
'@types/stack-utils': 2.0.3
chalk: 4.1.2
@ -5177,7 +5170,7 @@ packages:
resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@babel/code-frame': 7.22.13
'@babel/code-frame': 7.23.5
'@jest/types': 29.6.3
'@types/stack-utils': 2.0.3
chalk: 4.1.2
@ -6598,7 +6591,7 @@ packages:
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
engines: {node: '>=8'}
dependencies:
'@babel/code-frame': 7.22.13
'@babel/code-frame': 7.23.5
error-ex: 1.3.2
json-parse-even-better-errors: 2.3.1
lines-and-columns: 1.2.4
@ -9410,14 +9403,14 @@ packages:
dev: false
file:projects/openapi-to-typespec.tgz(jest@29.7.0):
resolution: {integrity: sha512-KvfNMg+QS2PURPUPNr32nxEeDtcKBbiOIitXRN55kRdADozPRn83lfm8IBi6OTDajBw5nfv6UOWT163f0jfqcw==, tarball: file:projects/openapi-to-typespec.tgz}
resolution: {integrity: sha512-iVH6kegt5UtBjQgeWeabDI/24my7TkNLpazOi2HQumK3e4H0EVV5vygE1RPNoq/oFuYqlgV6/n6OmUQRyaM5aQ==, tarball: file:projects/openapi-to-typespec.tgz}
id: file:projects/openapi-to-typespec.tgz
name: '@rush-temp/openapi-to-typespec'
version: 0.0.0
dependencies:
'@azure-tools/typespec-autorest': 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0)
'@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0)
'@azure-tools/typespec-azure-resource-manager': 0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0)
'@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0)
'@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)
'@azure-tools/typespec-azure-resource-manager': 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0)
'@types/fs-extra': 9.0.13
'@types/lodash': 4.14.201
'@types/node': 20.9.0
@ -9426,13 +9419,13 @@ packages:
'@types/webpack': 5.28.5(webpack-cli@5.1.4)
'@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2)
'@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2)
'@typespec/compiler': 0.52.0
'@typespec/http': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/openapi3': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0)
'@typespec/prettier-plugin-typespec': 0.52.0
'@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)
'@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0)
'@typespec/compiler': 0.53.0
'@typespec/http': 0.53.0(@typespec/compiler@0.53.0)
'@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/openapi3': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0)
'@typespec/prettier-plugin-typespec': 0.53.0
'@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)
'@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0)
chalk: 4.1.2
change-case: 5.0.2
change-case-all: 2.1.0
@ -9453,6 +9446,7 @@ packages:
webpack: 5.89.0(webpack-cli@5.1.4)
webpack-cli: 5.1.4(webpack@5.89.0)
transitivePeerDependencies:
- '@azure-tools/typespec-client-generator-core'
- '@swc/core'
- '@swc/wasm'
- '@types/eslint'

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

@ -41,16 +41,16 @@
"@azure-tools/codegen": "~2.10.0",
"@autorest/extension-base": "~3.6.0",
"@autorest/codemodel": "~4.20.0",
"@typespec/compiler": "^0.52.0",
"@typespec/rest": "^0.52.0",
"@typespec/http": "^0.52.0",
"@typespec/versioning": "^0.52.0",
"@typespec/prettier-plugin-typespec": "^0.52.0",
"@azure-tools/typespec-azure-core": "^0.38.0",
"@azure-tools/typespec-autorest": "^0.38.0",
"@azure-tools/typespec-azure-resource-manager": "^0.38.0",
"@typespec/openapi": "^0.52.0",
"@typespec/openapi3": "^0.52.0",
"@typespec/compiler": "^0.53.0",
"@typespec/rest": "^0.53.0",
"@typespec/http": "^0.53.0",
"@typespec/versioning": "^0.53.0",
"@typespec/prettier-plugin-typespec": "^0.53.0",
"@azure-tools/typespec-azure-core": "^0.39.0",
"@azure-tools/typespec-autorest": "^0.39.0",
"@azure-tools/typespec-azure-resource-manager": "^0.39.0",
"@typespec/openapi": "^0.53.0",
"@typespec/openapi3": "^0.53.0",
"prettier": "~3.1.0",
"lodash": "~4.17.20",
"pluralize": "^8.0.0",
@ -67,7 +67,7 @@
"fs-extra": "^10.1.0",
"@types/fs-extra": "^9.0.13",
"chalk": "^4.1.0",
"@azure-tools/typespec-autorest": "^0.38.0",
"@azure-tools/typespec-autorest": "^0.39.0",
"webpack-cli": "~5.1.4",
"webpack": "~5.89.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",

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

@ -3,7 +3,7 @@ import { getSession } from "../autorest-session";
import { generateArmResource, generateArmResourceExamples } from "../generate/generate-arm-resource";
import { TypespecProgram, TspArmResource } from "../interfaces";
import { formatTypespecFile } from "../utils/format";
import { getNamespace } from "../utils/namespace";
import { getNamespaceStatement } from "../utils/namespace";
export async function emitArmResources(program: TypespecProgram, basePath: string) {
// Create a file per resource
@ -18,7 +18,7 @@ export async function emitArmResources(program: TypespecProgram, basePath: strin
"\n",
namespaces.join("\n"),
"\n",
getNamespace(program),
getNamespaceStatement(program),
generatedResource,
].join("\n");
session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) });

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

@ -0,0 +1,23 @@
import { getSession } from "../autorest-session";
import { generateObjectClientDecorator } from "../generate/generate-client";
import { TypespecProgram } from "../interfaces";
import { formatTypespecFile } from "../utils/format";
import { getClientImports } from "../utils/imports";
import { getNamespace } from "../utils/namespace";
export async function emitClient(filePath: string, program: TypespecProgram): Promise<void> {
const content = generateClient(program);
const session = getSession();
session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) });
}
function generateClient(program: TypespecProgram) {
const { models } = program;
const { modules, namespaces: namespacesSet } = getClientImports(program);
const imports = [...new Set<string>([`import "./main.tsp";`, ...modules])].join("\n");
const namespaces = [...new Set<string>([...namespacesSet, `using ${getNamespace(program)};`])].join("\n");
const objects = models.objects.map(generateObjectClientDecorator).join("\n\n");
return [imports, "\n", namespaces, "\n", objects].join("\n");
}

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

@ -5,7 +5,7 @@ import { TypespecEnum, TypespecProgram } from "../interfaces";
import { getOptions } from "../options";
import { formatTypespecFile } from "../utils/format";
import { getModelsImports } from "../utils/imports";
import { getNamespace } from "../utils/namespace";
import { getNamespaceStatement } from "../utils/namespace";
export async function emitModels(filePath: string, program: TypespecProgram): Promise<void> {
const content = generateModels(program);
@ -32,7 +32,7 @@ function generateModels(program: TypespecProgram) {
"\n",
namespaces,
"\n",
getNamespace(program),
getNamespaceStatement(program),
isArm ? "\ninterface Operations extends Azure.ResourceManager.Operations {} \n" : "\n",
enums,
"\n",

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

@ -3,7 +3,7 @@ import { generateOperationGroup } from "../generate/generate-operations";
import { TypespecProgram } from "../interfaces";
import { formatTypespecFile } from "../utils/format";
import { getRoutesImports } from "../utils/imports";
import { getNamespace } from "../utils/namespace";
import { getNamespaceStatement } from "../utils/namespace";
export async function emitRoutes(filePath: string, program: TypespecProgram): Promise<void> {
if (program.operationGroups.length === 0) {
@ -19,5 +19,5 @@ function generateRoutes(program: TypespecProgram) {
const { modules, namespaces } = getRoutesImports(program);
const content = operationGroups.map(generateOperationGroup);
return [...modules, "\n", ...namespaces, "\n", getNamespace(program), "\n", ...content].join("\n");
return [...modules, "\n", ...namespaces, "\n", getNamespaceStatement(program), "\n", ...content].join("\n");
}

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

@ -39,6 +39,7 @@ export async function emitTypespecConfig(filePath: string, programDetails: Types
options:
'@azure-tools/typespec-autorest':
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/${swaggerName}"

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

@ -46,6 +46,10 @@ function generateArmResourceModel(resource: TspArmResource): string {
definitions.push(`@parentResource(${resource.resourceParent.name})`);
}
if (resource.locationParent) {
definitions.push(`@parentResource("${resource.locationParent}")`);
}
if (
getArmCommonTypeVersion() &&
!resource.propertiesPropertyRequired &&

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

@ -0,0 +1,16 @@
import { TypespecObject } from "../interfaces";
import { generateAugmentedDecorators } from "../utils/decorators";
export function generateObjectClientDecorator(typespecObject: TypespecObject) {
const definitions: string[] = [];
for (const property of typespecObject.properties) {
const decorators = generateAugmentedDecorators(
`${typespecObject.name}.${property.name}`,
property.augmentedDecorators,
);
decorators && definitions.push(decorators);
}
return definitions.join("\n");
}

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

@ -1,7 +1,7 @@
import { TypespecProgram, EndpointParameter, Auth } from "../interfaces";
import { getOptions } from "../options";
import { generateDocs } from "../utils/docs";
import { getNamespace } from "../utils/namespace";
import { getNamespaceStatement } from "../utils/namespace";
const VALID_VERSIONS = ["v3", "v4", "v5"];
@ -62,7 +62,7 @@ export function generateServiceInformation(program: TypespecProgram) {
const serviceDoc = generateDocs(serviceInformation);
serviceDoc && definitions.push(serviceDoc);
definitions.push(getNamespace(program));
definitions.push(getNamespaceStatement(program));
if (serviceInformation.versions) {
definitions.push("");

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

@ -125,6 +125,11 @@ export interface WithFixMe {
fixMe?: string[];
}
export interface WithSuppressDirective {
suppressionCode?: string;
suppressionMessage?: string;
}
export type TypespecParameterLocation = "path" | "query" | "header" | "body";
export interface TypespecParameter extends TypespecDataType {
kind: "parameter";
@ -141,10 +146,11 @@ export interface TypespecObjectProperty extends TypespecDataType {
isOptional: boolean;
type: string;
decorators?: TypespecDecorator[];
augmentedDecorators?: TypespecDecorator[];
defaultValue?: any;
}
export interface TypespecDecorator extends WithFixMe {
export interface TypespecDecorator extends WithFixMe, WithSuppressDirective {
name: string;
arguments?: (string | number)[] | DecoratorArgument[];
module?: string;
@ -248,4 +254,5 @@ export interface TspArmResource extends TypespecObject {
normalOperations: TypespecOperation[];
optionalStandardProperties: string[];
baseModelName?: string;
locationParent?: string;
}

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

@ -7,6 +7,7 @@ import { AutoRestExtension, AutorestExtensionHost, Session, startSession } from
import { OpenAPI3Document } from "@azure-tools/openapi";
import { setArmCommonTypeVersion, setSession } from "./autorest-session";
import { emitArmResources } from "./emiters/emit-arm-resources";
import { emitClient } from "./emiters/emit-client";
import { emitMain } from "./emiters/emit-main";
import { emitModels } from "./emiters/emit-models";
@ -36,6 +37,7 @@ export async function processConverter(host: AutorestExtensionHost) {
await emitMain(getFilePath(session, "main.tsp"), programDetails);
await emitPackage(getFilePath(session, "package.json"), programDetails);
await emitTypespecConfig(getFilePath(session, "tspconfig.yaml"), programDetails);
await emitClient(getFilePath(session, "client.tsp"), programDetails);
}
function getOutuptDirectory(session: Session<CodeModel>) {

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

@ -123,6 +123,7 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour
normalOperations: operations[1],
optionalStandardProperties: getArmCommonTypeVersion() ? getResourceOptionalStandardProperties(schema) : [],
baseModelName,
locationParent: getLocationParent(schema),
};
}
@ -838,16 +839,9 @@ function buildResourceDecorators(schema: ArmResourceSchema): TypespecDecorator[]
name: "tenantResource",
});
} else if (schema.resourceMetadata.IsSubscriptionResource) {
// TODO: need to change after TSP support location resource for other resource types
if (schema.resourceMetadata.GetOperations[0].Path.includes("/locations/")) {
resourceModelDecorators.push({
name: "locationResource",
});
} else {
resourceModelDecorators.push({
name: "subscriptionResource",
});
}
resourceModelDecorators.push({
name: "subscriptionResource",
});
}
return resourceModelDecorators;
@ -866,3 +860,15 @@ function getSingletonName(schema: ArmResourceSchema): string {
}
return key;
}
function getLocationParent(schema: ArmResourceSchema): string | undefined {
if (schema.resourceMetadata.GetOperations[0].Path.includes("/locations/")) {
if (schema.resourceMetadata.IsTenantResource) {
return "TenantLocationResource";
} else if (schema.resourceMetadata.IsSubscriptionResource) {
return "SubscriptionLocationResource";
} else if (schema.resourceMetadata.Parents?.[0] === "ResourceGroupResource") {
return "ResourceGroupLocationResource";
}
}
}

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

@ -14,7 +14,7 @@ import { get } from "lodash";
import { getDataTypes } from "../data-types";
import { TypespecObject, TypespecObjectProperty } from "../interfaces";
import { addCorePageAlias } from "../utils/alias";
import { getModelDecorators, getPropertyDecorators } from "../utils/decorators";
import { getModelDecorators, getPropertyAugmentedDecorators, getPropertyDecorators } from "../utils/decorators";
import { getDiscriminator, getOwnDiscriminator } from "../utils/discriminator";
import { getLogger } from "../utils/logger";
import {
@ -127,6 +127,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod
isOptional: propertySchema.required !== true,
type: visited.name,
decorators: getPropertyDecorators(propertySchema),
augmentedDecorators: getPropertyAugmentedDecorators(propertySchema),
defaultValue: getDefaultValue(visited.name, propertySchema.schema),
};
}
@ -143,6 +144,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod
isOptional: propertySchema.required !== true,
type,
decorators: getPropertyDecorators(propertySchema),
augmentedDecorators: getPropertyAugmentedDecorators(propertySchema),
fixMe: getFixme(propertySchema, codeModel),
defaultValue: getDefaultValue(type, propertySchema.schema),
};

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

@ -137,12 +137,19 @@ export function getPropertyDecorators(element: Property | Parameter): TypespecDe
});
}
return decorators;
}
export function getPropertyAugmentedDecorators(element: Property | Parameter): TypespecDecorator[] {
const decorators: TypespecDecorator[] = [];
if (element.extensions?.["x-ms-client-flatten"]) {
decorators.push({
name: "extension",
arguments: [{ value: `"x-ms-client-flatten"` }, { value: "true" }],
module: "@typespec/openapi",
namespace: "TypeSpec.OpenAPI",
name: "flattenProperty",
module: "@typespec/typespec-client-generator-core",
namespace: "Azure.ClientGenerator.Core",
suppressionCode: "deprecated",
suppressionMessage: "@flattenProperty decorator is not recommended to use.",
});
}
@ -239,6 +246,9 @@ export function generateDecorators(decorators: TypespecDecorator[] = []): string
if (decorator.fixMe) {
definitions.push(decorator.fixMe.join(`\n`));
}
if (decorator.suppressionCode) {
definitions.push(`#suppress "${decorator.suppressionCode}" "${decorator.suppressionMessage}"`);
}
if (decorator.arguments) {
definitions.push(`@${decorator.name}(${decorator.arguments.map((a) => getArgumentValue(a)).join(", ")})`);
} else {
@ -249,6 +259,27 @@ export function generateDecorators(decorators: TypespecDecorator[] = []): string
return definitions.join("\n");
}
export function generateAugmentedDecorators(keyName: string, decorators: TypespecDecorator[] = []): string {
const definitions: string[] = [];
for (const decorator of decorators ?? []) {
if (decorator.fixMe) {
definitions.push(decorator.fixMe.join(`\n`));
}
if (decorator.suppressionCode) {
definitions.push(`#suppress "${decorator.suppressionCode}" "${decorator.suppressionMessage}"`);
}
if (decorator.arguments) {
definitions.push(
`@@${decorator.name}(${keyName}, ${decorator.arguments.map((a) => getArgumentValue(a)).join(", ")})`,
);
} else {
definitions.push(`@@${decorator.name}(${keyName})`);
}
}
return definitions.join("\n");
}
function getArgumentValue(argument: DecoratorArgument | string | number): string {
if (typeof argument === "string") {
return `"${argument}"`;

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

@ -12,6 +12,15 @@ export function generateDocs({ doc }: WithDocs): string {
const wrapped = lineWrap(doc);
for (let i = 0; i < wrapped.length; i++) {
if (wrapped[i].includes("@") || wrapped[i].includes("*/")) {
if (wrapped.length === 1) {
return `@doc("${wrapped[0].replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`;
}
return `@doc("""\n${wrapped.join("\n").replace(/\\/g, "\\\\").replace(/"/g, '\\"')}\n""")`;
}
}
return `/**\n* ${wrapped.join("\n* ")}\n*/`;
}

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

@ -43,6 +43,24 @@ export function getModelsImports(program: TypespecProgram) {
};
}
export function getClientImports(program: TypespecProgram) {
const modules = new Set<string>();
const namespaces = new Set<string>();
for (const model of program.models.objects) {
for (const property of model.properties) {
for (const decorator of property.augmentedDecorators ?? []) {
decorator.module && modules.add(`import "${decorator.module}";`);
decorator.namespace && namespaces.add(`using ${decorator.namespace};`);
}
}
}
return {
modules: [...modules],
namespaces: [...namespaces],
};
}
export function getRoutesImports(_program: TypespecProgram) {
const modules = new Set<string>();
const namespaces = new Set<string>();

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

@ -1,10 +1,12 @@
import { TypespecProgram } from "../interfaces";
import { getOptions } from "../options";
export function getNamespace(program: TypespecProgram) {
let { namespace } = getOptions();
namespace = namespace ?? program.serviceInformation.name.replace(/ /g, "").replace(/-/g, "");
return `namespace ${namespace};`;
export function getNamespaceStatement(program: TypespecProgram) {
return `namespace ${getNamespace(program)};`;
}
export function getNamespace(program: TypespecProgram) {
const { namespace } = getOptions();
return namespace ?? program.serviceInformation.name.replace(/ /g, "").replace(/-/g, "");
}

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.Language.Authoring;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using AnomalyDetectorClient;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.ResourceManager.AgFoodPlatform;

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/agfood.json"

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.ResourceManager.AlertsManagement;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PatchObject.properties);

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

@ -1,13 +1,11 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -386,7 +384,6 @@ model PatchObject {
/**
* Properties supported by patch operation.
*/
@extension("x-ms-client-flatten", true)
properties?: PatchProperties;
/**

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.ResourceManager.Analysis;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AnalysisServicesServerUpdateParameters.properties);

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

@ -1,13 +1,11 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -301,7 +299,6 @@ model AnalysisServicesServerUpdateParameters {
/**
* Properties of the provision operation request.
*/
@extension("x-ms-client-flatten", true)
properties?: AnalysisServicesServerMutableProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/analysisservices.json"

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

@ -756,9 +756,7 @@ interface ApiManagementServiceResources {
@path
serviceName: string;
/**
* Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then its accessible by "boo" counter key. But if its defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key
*/
@doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then its accessible by \"boo\" counter key. But if its defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key")
@path
quotaCounterKey: string;

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

@ -16,7 +16,8 @@ namespace Azure.ResourceManager.ApiManagement;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
@Azure.ResourceManager.Private.armResourceInternal(
DeletedServiceContractProperties

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

@ -0,0 +1,143 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.ResourceManager.ApiManagement;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApiCreateOrUpdateParameter.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApiUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(OperationUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SchemaContractProperties.document);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(IssueUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(TagDescriptionCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApiVersionSetUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AuthorizationServerUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(BackendUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(BackendReconnectContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(CacheUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(CertificateCreateOrUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ContentTypeContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ContentItemContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RemotePrivateEndpointConnectionWrapper.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApiManagementServiceUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(EmailTemplateUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AssociationContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GroupCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GroupUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(IdentityProviderCreateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(IdentityProviderUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(LoggerUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(NamedValueCreateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(NamedValueUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RecipientUserContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RecipientEmailContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(OpenidConnectProviderUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PolicyDescriptionContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PortalSettingsContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ProductUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(QuotaCounterValueUpdateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GlobalSchemaContractProperties.document);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SubscriptionCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SubscriptionUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(TagCreateUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AccessInformationCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AccessInformationUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DeployConfigurationParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(OperationResultContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SaveConfigurationParameter.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(TenantConfigurationSyncStateContract.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(UserCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(UserUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(UserTokenParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(QuotaCounterValueContract.value);

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

@ -1,13 +1,11 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -1320,7 +1318,6 @@ model ApiCreateOrUpdateParameter {
/**
* API entity create of update properties.
*/
@extension("x-ms-client-flatten", true)
properties?: ApiCreateOrUpdateProperties;
}
@ -1376,7 +1373,6 @@ model ApiUpdateContract {
/**
* Properties of the API entity that can be updated.
*/
@extension("x-ms-client-flatten", true)
properties?: ApiContractUpdateProperties;
}
@ -1724,7 +1720,6 @@ model OperationUpdateContract {
/**
* Properties of the API Operation entity that can be updated.
*/
@extension("x-ms-client-flatten", true)
properties?: OperationUpdateContractProperties;
}
@ -1841,7 +1836,6 @@ model SchemaContractProperties {
/**
* Create or update Properties of the API Schema Document.
*/
@extension("x-ms-client-flatten", true)
document?: SchemaDocumentProperties;
}
@ -2054,7 +2048,6 @@ model IssueUpdateContract {
/**
* Issue entity Update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: IssueUpdateContractProperties;
}
@ -2164,7 +2157,6 @@ model TagDescriptionCreateParameters {
/**
* Properties supplied to Create TagDescription operation.
*/
@extension("x-ms-client-flatten", true)
properties?: TagDescriptionBaseProperties;
}
@ -2405,7 +2397,6 @@ model ApiVersionSetUpdateParameters {
/**
* Parameters to update or create an API Version Set Contract.
*/
@extension("x-ms-client-flatten", true)
properties?: ApiVersionSetUpdateParametersProperties;
}
@ -2543,7 +2534,6 @@ model AuthorizationServerUpdateContract extends Resource {
/**
* Properties of the External OAuth authorization server update Contract.
*/
@extension("x-ms-client-flatten", true)
properties?: AuthorizationServerUpdateContractProperties;
}
@ -2821,7 +2811,6 @@ model BackendUpdateParameters {
/**
* Backend entity update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: BackendUpdateParameterProperties;
}
@ -2849,7 +2838,6 @@ model BackendReconnectContract extends Resource {
/**
* Reconnect request properties.
*/
@extension("x-ms-client-flatten", true)
properties?: BackendReconnectProperties;
}
@ -2900,7 +2888,6 @@ model CacheUpdateParameters {
/**
* Cache update properties details.
*/
@extension("x-ms-client-flatten", true)
properties?: CacheUpdateProperties;
}
@ -3015,7 +3002,6 @@ model CertificateCreateOrUpdateParameters {
/**
* Certificate create or update properties details.
*/
@extension("x-ms-client-flatten", true)
properties?: CertificateCreateOrUpdateProperties;
}
@ -3274,7 +3260,6 @@ model ContentTypeContract extends Resource {
/**
* Properties of the content type.
*/
@extension("x-ms-client-flatten", true)
properties?: ContentTypeContractProperties;
}
@ -3317,7 +3302,6 @@ model ContentItemContract extends Resource {
/**
* Properties of the content item.
*/
@extension("x-ms-client-flatten", true)
properties?: Record<unknown>;
}
@ -3834,7 +3818,6 @@ model RemotePrivateEndpointConnectionWrapper {
/**
* Resource properties.
*/
@extension("x-ms-client-flatten", true)
properties?: PrivateEndpointConnectionWrapperProperties;
}
@ -3970,7 +3953,6 @@ model ApiManagementServiceUpdateParameters extends ApimResource {
/**
* Properties of the API Management service.
*/
@extension("x-ms-client-flatten", true)
properties?: ApiManagementServiceUpdateProperties;
/**
@ -4150,7 +4132,6 @@ model EmailTemplateUpdateParameters {
/**
* Email Template Update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: EmailTemplateUpdateParameterProperties;
}
@ -4338,7 +4319,6 @@ model AssociationContract extends Resource {
/**
* Association entity contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: AssociationContractProperties;
}
@ -4403,7 +4383,6 @@ model GroupCreateParameters {
/**
* Properties supplied to Create Group operation.
*/
@extension("x-ms-client-flatten", true)
properties?: GroupCreateParametersProperties;
}
@ -4441,7 +4420,6 @@ model GroupUpdateParameters {
/**
* Group entity update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: GroupUpdateParametersProperties;
}
@ -4631,7 +4609,6 @@ model IdentityProviderCreateContract extends Resource {
/**
* Identity Provider contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: IdentityProviderCreateContractProperties;
}
@ -4660,7 +4637,6 @@ model IdentityProviderUpdateParameters {
/**
* Identity Provider update properties.
*/
@extension("x-ms-client-flatten", true)
properties?: IdentityProviderUpdateProperties;
}
@ -4730,7 +4706,6 @@ model LoggerUpdateContract {
/**
* Logger entity update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: LoggerUpdateParameters;
}
@ -4806,7 +4781,6 @@ model NamedValueCreateContract extends Resource {
/**
* NamedValue entity contract properties for PUT operation.
*/
@extension("x-ms-client-flatten", true)
properties?: NamedValueCreateContractProperties;
}
@ -4842,7 +4816,6 @@ model NamedValueUpdateParameters {
/**
* NamedValue entity Update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: NamedValueUpdateParameterProperties;
}
@ -5024,7 +4997,6 @@ model RecipientUserContract extends Resource {
/**
* Recipient User entity contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: RecipientUsersContractProperties;
}
@ -5065,7 +5037,6 @@ model RecipientEmailContract extends Resource {
/**
* Recipient Email contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: RecipientEmailContractProperties;
}
@ -5117,7 +5088,6 @@ model OpenidConnectProviderUpdateContract {
/**
* OpenId Connect Provider Update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: OpenidConnectProviderUpdateContractProperties;
}
@ -5237,7 +5207,6 @@ model PolicyDescriptionContract extends Resource {
/**
* Policy description contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: PolicyDescriptionContractProperties;
}
@ -5305,7 +5274,6 @@ model PortalSettingsContract extends Resource {
/**
* Portal Settings contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: PortalSettingsContractProperties;
}
@ -5532,7 +5500,6 @@ model ProductUpdateParameters {
/**
* Product entity Update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: ProductUpdateProperties;
}
@ -5739,7 +5706,6 @@ model QuotaCounterValueUpdateContract {
/**
* Quota counter value details.
*/
@extension("x-ms-client-flatten", true)
properties?: QuotaCounterValueContractProperties;
}
@ -6060,7 +6026,6 @@ model GlobalSchemaContractProperties {
/**
* Global Schema document object for json-based schema formats(e.g. json schema).
*/
@extension("x-ms-client-flatten", true)
document?: Record<unknown>;
}
@ -6318,7 +6283,6 @@ model SubscriptionCreateParameters {
/**
* Subscription contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: SubscriptionCreateParameterProperties;
}
@ -6375,7 +6339,6 @@ model SubscriptionUpdateParameters {
/**
* Subscription Update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: SubscriptionUpdateParameterProperties;
}
@ -6460,7 +6423,6 @@ model TagCreateUpdateParameters {
/**
* Properties supplied to Create Tag operation.
*/
@extension("x-ms-client-flatten", true)
properties?: TagContractProperties;
}
@ -6491,7 +6453,6 @@ model AccessInformationCreateParameters {
/**
* Tenant access information update parameter properties.
*/
@extension("x-ms-client-flatten", true)
properties?: AccessInformationCreateParameterProperties;
}
@ -6527,7 +6488,6 @@ model AccessInformationUpdateParameters {
/**
* Tenant access information update parameter properties.
*/
@extension("x-ms-client-flatten", true)
properties?: AccessInformationUpdateParameterProperties;
}
@ -6578,7 +6538,6 @@ model DeployConfigurationParameters {
/**
* Deploy Configuration Parameter contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: DeployConfigurationParameterProperties;
}
@ -6604,7 +6563,6 @@ model OperationResultContract extends Resource {
/**
* Properties of the Operation Contract.
*/
@extension("x-ms-client-flatten", true)
properties?: OperationResultContractProperties;
}
@ -6680,7 +6638,6 @@ model SaveConfigurationParameter {
/**
* Properties of the Save Configuration Parameters.
*/
@extension("x-ms-client-flatten", true)
properties?: SaveConfigurationParameterProperties;
}
@ -6706,7 +6663,6 @@ model TenantConfigurationSyncStateContract extends Resource {
/**
* Properties returned Tenant Configuration Sync State check.
*/
@extension("x-ms-client-flatten", true)
properties?: TenantConfigurationSyncStateContractProperties;
}
@ -6766,7 +6722,6 @@ model UserCreateParameters {
/**
* User entity create contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: UserCreateParameterProperties;
}
@ -6818,7 +6773,6 @@ model UserUpdateParameters {
/**
* User entity update contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: UserUpdateParametersProperties;
}
@ -6880,7 +6834,6 @@ model UserTokenParameters {
/**
* User Token Parameter contract properties.
*/
@extension("x-ms-client-flatten", true)
properties?: UserTokenParameterProperties;
}
@ -6945,6 +6898,5 @@ model QuotaCounterValueContract {
/**
* Quota counter Value Properties.
*/
@extension("x-ms-client-flatten", true)
value?: QuotaCounterValueContractProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -0,0 +1,45 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.ResourceManager.Authorization;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ClassicAdministrator.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ProviderOperation.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RoleAssignmentCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ExpandedProperties.scope);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ExpandedProperties.roleDefinition);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ExpandedProperties.principal);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RoleAssignmentScheduleRequestProperties.scheduleInfo);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RoleAssignmentScheduleRequestPropertiesScheduleInfo.expiration
);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RoleEligibilityScheduleRequestProperties.scheduleInfo);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RoleEligibilityScheduleRequestPropertiesScheduleInfo.expiration
);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PolicyProperties.scope);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PolicyAssignmentProperties.scope);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PolicyAssignmentProperties.roleDefinition);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PolicyAssignmentProperties.policy);

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

@ -1,12 +1,10 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -209,7 +207,6 @@ model ClassicAdministrator {
/**
* Properties for the classic administrator.
*/
@extension("x-ms-client-flatten", true)
properties?: ClassicAdministratorProperties;
}
@ -381,7 +378,6 @@ model ProviderOperation {
/**
* The operation properties.
*/
@extension("x-ms-client-flatten", true)
properties?: Record<unknown>;
/**
@ -420,9 +416,7 @@ model RoleAssignmentProperties {
*/
description?: string;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -469,7 +463,6 @@ model RoleAssignmentCreateParameters {
/**
* Role assignment properties.
*/
@extension("x-ms-client-flatten", true)
properties: RoleAssignmentProperties;
}
@ -650,9 +643,7 @@ model RoleAssignmentScheduleProperties {
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
endDateTime?: utcDateTime;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -682,19 +673,16 @@ model ExpandedProperties {
/**
* Details of the resource scope
*/
@extension("x-ms-client-flatten", true)
scope?: ExpandedPropertiesScope;
/**
* Details of role definition
*/
@extension("x-ms-client-flatten", true)
roleDefinition?: ExpandedPropertiesRoleDefinition;
/**
* Details of the principal
*/
@extension("x-ms-client-flatten", true)
principal?: ExpandedPropertiesPrincipal;
}
@ -843,9 +831,7 @@ model RoleAssignmentScheduleInstanceProperties {
*/
memberType?: RoleManagementScheduleMemberType;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -921,7 +907,6 @@ model RoleAssignmentScheduleRequestProperties {
/**
* Schedule info of the role assignment schedule
*/
@extension("x-ms-client-flatten", true)
scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo;
/**
@ -939,9 +924,7 @@ model RoleAssignmentScheduleRequestProperties {
*/
ticketInfo?: RoleAssignmentScheduleRequestPropertiesTicketInfo;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -982,7 +965,6 @@ model RoleAssignmentScheduleRequestPropertiesScheduleInfo {
/**
* Expiration of the role assignment schedule
*/
@extension("x-ms-client-flatten", true)
expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration;
}
@ -1074,9 +1056,7 @@ model RoleEligibilityScheduleProperties {
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
endDateTime?: utcDateTime;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -1153,9 +1133,7 @@ model RoleEligibilityScheduleInstanceProperties {
*/
memberType?: RoleManagementScheduleMemberType;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -1221,7 +1199,6 @@ model RoleEligibilityScheduleRequestProperties {
/**
* Schedule info of the role eligibility schedule
*/
@extension("x-ms-client-flatten", true)
scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo;
/**
@ -1244,9 +1221,7 @@ model RoleEligibilityScheduleRequestProperties {
*/
ticketInfo?: RoleEligibilityScheduleRequestPropertiesTicketInfo;
/**
* The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
*/
@doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'")
condition?: string;
/**
@ -1287,7 +1262,6 @@ model RoleEligibilityScheduleRequestPropertiesScheduleInfo {
/**
* Expiration of the role eligibility schedule
*/
@extension("x-ms-client-flatten", true)
expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration;
}
@ -1442,7 +1416,6 @@ model PolicyProperties {
* Details of the resource scope
*/
@visibility("read")
@extension("x-ms-client-flatten", true)
scope?: PolicyPropertiesScope;
}
@ -1508,19 +1481,16 @@ model PolicyAssignmentProperties {
/**
* Details of the resource scope
*/
@extension("x-ms-client-flatten", true)
scope?: PolicyAssignmentPropertiesScope;
/**
* Details of role definition
*/
@extension("x-ms-client-flatten", true)
roleDefinition?: PolicyAssignmentPropertiesRoleDefinition;
/**
* Details of the policy
*/
@extension("x-ms-client-flatten", true)
policy?: PolicyAssignmentPropertiesPolicy;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -0,0 +1,23 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.IntegrationSpaces;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SpaceUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApplicationUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(BusinessProcessUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApplicationResource.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ApplicationResourceUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(InfrastructureResourceUpdate.properties);

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

@ -1,12 +1,10 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -96,7 +94,6 @@ model SpaceUpdate {
/**
* The updatable properties of the Space.
*/
@extension("x-ms-client-flatten", true)
properties?: SpaceUpdateProperties;
}
@ -168,7 +165,6 @@ model ApplicationUpdate {
/**
* The updatable properties of the Application.
*/
@extension("x-ms-client-flatten", true)
properties?: ApplicationUpdateProperties;
}
@ -301,7 +297,6 @@ model BusinessProcessUpdate {
/**
* The updatable properties of the BusinessProcess.
*/
@extension("x-ms-client-flatten", true)
properties?: BusinessProcessUpdateProperties;
}
@ -529,7 +524,6 @@ model ApplicationResource extends ProxyResource {
* The resource-specific properties for this resource.
*/
@visibility("read", "create")
@extension("x-ms-client-flatten", true)
properties?: ApplicationResourceProperties;
}
@ -566,7 +560,6 @@ model ApplicationResourceUpdate {
/**
* The updatable properties of the ApplicationResource.
*/
@extension("x-ms-client-flatten", true)
properties?: ApplicationResourceUpdateProperties;
}
@ -633,7 +626,6 @@ model InfrastructureResourceUpdate {
/**
* The updatable properties of the InfrastructureResource.
*/
@extension("x-ms-client-flatten", true)
properties?: InfrastructureResourceUpdateProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -17,7 +17,8 @@ namespace Microsoft.Compute;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
model CommunityGallery extends PirCommunityGalleryResource {
/**

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

@ -16,7 +16,8 @@ namespace Microsoft.Compute;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
model OSFamily {
/**

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

@ -16,7 +16,8 @@ namespace Microsoft.Compute;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
model OSVersion {
/**

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

@ -17,7 +17,8 @@ namespace Microsoft.Compute;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
model SharedGallery extends PirSharedGalleryResource {
/**

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

@ -16,7 +16,8 @@ namespace Microsoft.Compute;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
model VirtualMachineExtensionImage extends Resource {
@path

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

@ -0,0 +1,127 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.Compute;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ComputeOperationValue.display);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetNetworkConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetIPConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetPublicIPAddressConfiguration.properties
);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetUpdateNetworkConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetUpdateIPConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.properties
);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetExtensionUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineScaleSetVMExtensionUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(NetworkInterfaceReference.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineNetworkInterfaceConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineNetworkInterfaceIPConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachinePublicIPAddressConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineExtensionUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineImage.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AvailabilitySetUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DedicatedHostGroupUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DedicatedHostUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SshPublicKeyUpdateResource.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ImageUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RestorePointCollectionUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(CapacityReservationGroupUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(CapacityReservationUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(VirtualMachineRunCommandUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DiskUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PrivateLinkResource.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DiskEncryptionSetUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SnapshotUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GalleryUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GalleryImageUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GalleryImageVersionUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GalleryApplicationUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(GalleryApplicationVersionUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PirSharedGalleryResource.identifier);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PirCommunityGalleryResource.identifier);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(LoadBalancerConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(LoadBalancerFrontendIpConfiguration.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(Extension.properties);

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

@ -1,13 +1,11 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -1467,7 +1465,6 @@ model ComputeOperationValue {
/**
* Describes the properties of a Compute Operation Value Display.
*/
@extension("x-ms-client-flatten", true)
display?: ComputeOperationValueDisplay;
}
@ -2031,9 +2028,7 @@ model VirtualMachineScaleSetOSProfile {
*/
adminUsername?: string;
/**
* Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
*/
@doc("Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_]) <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)")
adminPassword?: string;
/**
@ -2610,7 +2605,6 @@ model VirtualMachineScaleSetNetworkConfiguration {
/**
* Describes a virtual machine scale set network profile's IP configuration.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetNetworkConfigurationProperties;
}
@ -2696,7 +2690,6 @@ model VirtualMachineScaleSetIPConfiguration {
/**
* Describes a virtual machine scale set network profile's IP configuration properties.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetIPConfigurationProperties;
}
@ -2757,7 +2750,6 @@ model VirtualMachineScaleSetPublicIPAddressConfiguration {
/**
* Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetPublicIPAddressConfigurationProperties;
/**
@ -3493,7 +3485,6 @@ model VirtualMachineScaleSetUpdate extends UpdateResource {
/**
* Describes the properties of a Virtual Machine Scale Set.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetUpdateProperties;
/**
@ -3741,7 +3732,6 @@ model VirtualMachineScaleSetUpdateNetworkConfiguration {
/**
* Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetUpdateNetworkConfigurationProperties;
}
@ -3817,7 +3807,6 @@ model VirtualMachineScaleSetUpdateIPConfiguration {
/**
* Describes a virtual machine scale set network profile's IP configuration properties.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetUpdateIPConfigurationProperties;
}
@ -3878,7 +3867,6 @@ model VirtualMachineScaleSetUpdatePublicIPAddressConfiguration {
/**
* Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties;
}
@ -4046,7 +4034,6 @@ model VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly {
/**
* Describes the properties of a Virtual Machine Scale Set Extension.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineScaleSetExtensionProperties;
}
@ -4296,9 +4283,7 @@ model VirtualMachineReimageParameters {
* Additional parameters for Reimaging Non-Ephemeral Virtual Machine.
*/
model OSProfileProvisioningData {
/**
* Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
*/
@doc("Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_]) <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)")
adminPassword?: string;
/**
@ -4425,7 +4410,6 @@ model VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly {
/**
* Describes the properties of a Virtual Machine Extension.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineExtensionUpdateProperties;
}
@ -5063,9 +5047,7 @@ model OSProfile {
*/
adminUsername?: string;
/**
* Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
*/
@doc("Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_]) <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)")
adminPassword?: string;
/**
@ -5126,7 +5108,6 @@ model NetworkInterfaceReference extends SubResource {
/**
* Describes a network interface reference properties.
*/
@extension("x-ms-client-flatten", true)
properties?: NetworkInterfaceReferenceProperties;
}
@ -5157,7 +5138,6 @@ model VirtualMachineNetworkInterfaceConfiguration {
/**
* Describes a virtual machine network profile's IP configuration.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineNetworkInterfaceConfigurationProperties;
}
@ -5245,7 +5225,6 @@ model VirtualMachineNetworkInterfaceIPConfiguration {
/**
* Describes a virtual machine network interface IP configuration properties.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineNetworkInterfaceIPConfigurationProperties;
}
@ -5301,7 +5280,6 @@ model VirtualMachinePublicIPAddressConfiguration {
/**
* Describes a virtual machines IP Configuration's PublicIPAddress configuration
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachinePublicIPAddressConfigurationProperties;
/**
@ -5456,7 +5434,6 @@ model VirtualMachineExtensionUpdate extends UpdateResource {
/**
* Describes the properties of a Virtual Machine Extension.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineExtensionUpdateProperties;
}
@ -5898,7 +5875,6 @@ model VirtualMachineUpdate extends UpdateResource {
/**
* Describes the properties of a Virtual Machine.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineProperties;
/**
@ -6240,7 +6216,6 @@ model VirtualMachineImage extends VirtualMachineImageResource {
/**
* Describes the properties of a Virtual Machine Image.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineImageProperties;
}
@ -6511,7 +6486,6 @@ model AvailabilitySetUpdate extends UpdateResource {
/**
* The instance view of a resource.
*/
@extension("x-ms-client-flatten", true)
properties?: AvailabilitySetProperties;
/**
@ -6694,7 +6668,6 @@ model DedicatedHostGroupUpdate extends UpdateResource {
/**
* Dedicated Host Group Properties.
*/
@extension("x-ms-client-flatten", true)
properties?: DedicatedHostGroupProperties;
/**
@ -6768,7 +6741,6 @@ model DedicatedHostUpdate extends UpdateResource {
/**
* Properties of the dedicated host.
*/
@extension("x-ms-client-flatten", true)
properties?: DedicatedHostProperties;
/**
@ -6806,7 +6778,6 @@ model SshPublicKeyUpdateResource extends UpdateResource {
/**
* Properties of the SSH public key.
*/
@extension("x-ms-client-flatten", true)
properties?: SshPublicKeyResourceProperties;
}
@ -6948,7 +6919,6 @@ model ImageUpdate extends UpdateResource {
/**
* Describes the properties of an Image.
*/
@extension("x-ms-client-flatten", true)
properties?: ImageProperties;
}
@ -7320,7 +7290,6 @@ model RestorePointCollectionUpdate extends UpdateResource {
/**
* The restore point collection properties.
*/
@extension("x-ms-client-flatten", true)
properties?: RestorePointCollectionProperties;
}
@ -7406,7 +7375,6 @@ model CapacityReservationGroupUpdate extends UpdateResource {
/**
* capacity reservation group Properties.
*/
@extension("x-ms-client-flatten", true)
properties?: CapacityReservationGroupProperties;
}
@ -7466,7 +7434,6 @@ model CapacityReservationUpdate extends UpdateResource {
/**
* Properties of the Capacity reservation.
*/
@extension("x-ms-client-flatten", true)
properties?: CapacityReservationProperties;
/**
@ -7843,7 +7810,6 @@ model VirtualMachineRunCommandUpdate extends UpdateResource {
/**
* Describes the properties of a Virtual Machine run command.
*/
@extension("x-ms-client-flatten", true)
properties?: VirtualMachineRunCommandProperties;
}
@ -8309,7 +8275,6 @@ model DiskUpdate {
/**
* Disk resource update properties.
*/
@extension("x-ms-client-flatten", true)
properties?: DiskUpdateProperties;
/**
@ -8574,7 +8539,6 @@ model PrivateLinkResource {
/**
* Resource properties.
*/
@extension("x-ms-client-flatten", true)
properties?: PrivateLinkResourceProperties;
/**
@ -8714,7 +8678,6 @@ model DiskEncryptionSetUpdate {
/**
* disk encryption set resource update properties.
*/
@extension("x-ms-client-flatten", true)
properties?: DiskEncryptionSetUpdateProperties;
/**
@ -9045,7 +9008,6 @@ model SnapshotUpdate {
/**
* Snapshot resource update properties.
*/
@extension("x-ms-client-flatten", true)
properties?: SnapshotUpdateProperties;
/**
@ -9544,7 +9506,6 @@ model GalleryUpdate extends UpdateResourceDefinition {
/**
* Describes the properties of a Shared Image Gallery.
*/
@extension("x-ms-client-flatten", true)
properties?: GalleryProperties;
}
@ -9760,7 +9721,6 @@ model GalleryImageUpdate extends UpdateResourceDefinition {
/**
* Describes the properties of a gallery image definition.
*/
@extension("x-ms-client-flatten", true)
properties?: GalleryImageProperties;
}
@ -10166,7 +10126,6 @@ model GalleryImageVersionUpdate extends UpdateResourceDefinition {
/**
* Describes the properties of a gallery image version.
*/
@extension("x-ms-client-flatten", true)
properties?: GalleryImageVersionProperties;
}
@ -10273,7 +10232,6 @@ model GalleryApplicationUpdate extends UpdateResourceDefinition {
/**
* Describes the properties of a gallery Application Definition.
*/
@extension("x-ms-client-flatten", true)
properties?: GalleryApplicationProperties;
}
@ -10397,7 +10355,6 @@ model GalleryApplicationVersionUpdate extends UpdateResourceDefinition {
/**
* Describes the properties of a gallery image version.
*/
@extension("x-ms-client-flatten", true)
properties?: GalleryApplicationVersionProperties;
}
@ -10423,7 +10380,6 @@ model PirSharedGalleryResource extends PirResource {
/**
* The identifier information of shared gallery.
*/
@extension("x-ms-client-flatten", true)
identifier?: SharedGalleryIdentifier;
}
@ -10618,7 +10574,6 @@ model PirCommunityGalleryResource {
/**
* The identifier information of community gallery.
*/
@extension("x-ms-client-flatten", true)
identifier?: CommunityGalleryIdentifier;
}
@ -11052,7 +11007,6 @@ model LoadBalancerConfiguration {
/**
* Properties of the load balancer configuration.
*/
@extension("x-ms-client-flatten", true)
properties: LoadBalancerConfigurationProperties;
}
@ -11078,7 +11032,6 @@ model LoadBalancerFrontendIpConfiguration {
/**
* Properties of load balancer frontend ip configuration.
*/
@extension("x-ms-client-flatten", true)
properties: LoadBalancerFrontendIpConfigurationProperties;
}
@ -11124,7 +11077,6 @@ model Extension {
/**
* Extension Properties.
*/
@extension("x-ms-client-flatten", true)
properties?: CloudServiceExtensionProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -0,0 +1,11 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.ResourceManager.Dns;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DnsResourceReferenceRequest.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DnsResourceReferenceResult.properties);

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

@ -1,13 +1,11 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -441,7 +439,6 @@ model DnsResourceReferenceRequest {
/**
* The properties of the Resource Reference Request.
*/
@extension("x-ms-client-flatten", true)
properties?: DnsResourceReferenceRequestProperties;
}
@ -462,7 +459,6 @@ model DnsResourceReferenceResult {
/**
* The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.
*/
@extension("x-ms-client-flatten", true)
properties?: DnsResourceReferenceResultProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/dns.json"

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

@ -0,0 +1,20 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.ResourceManager.MachineLearning;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ClusterUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RegistryPrivateEndpointConnection.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(SharedPrivateLinkResource.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(WorkspaceUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PrivateLinkResource.properties);

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

@ -1,12 +1,10 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -3078,7 +3076,6 @@ model ClusterUpdateParameters {
/**
* The properties of the amlCompute.
*/
@extension("x-ms-client-flatten", true)
properties?: ClusterUpdateProperties;
}
@ -5564,7 +5561,6 @@ model RegistryPrivateEndpointConnection {
/**
* Properties of the Private Endpoint Connection
*/
@extension("x-ms-client-flatten", true)
properties?: RegistryPrivateEndpointConnectionProperties;
}
@ -6223,7 +6219,6 @@ model SharedPrivateLinkResource {
/**
* Properties of a shared private link resource.
*/
@extension("x-ms-client-flatten", true)
properties?: SharedPrivateLinkResourceProperty;
}
@ -6272,7 +6267,6 @@ model WorkspaceUpdateParameters {
/**
* The properties that the machine learning workspace will be updated with.
*/
@extension("x-ms-client-flatten", true)
properties?: WorkspacePropertiesUpdateParameters;
/**
@ -6631,7 +6625,6 @@ model PrivateLinkResource extends Resource {
/**
* Properties of a private link resource.
*/
@extension("x-ms-client-flatten", true)
properties?: PrivateLinkResourceProperties;
/**

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -0,0 +1,11 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.NetworkAnalytics;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DataProductUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DataTypeUpdate.properties);

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

@ -1,11 +1,9 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -529,7 +527,6 @@ model DataProductUpdate {
/**
* The updatable properties of the DataProduct.
*/
@extension("x-ms-client-flatten", true)
properties?: DataProductUpdateProperties;
}
@ -697,7 +694,6 @@ model DataTypeUpdate {
/**
* The updatable properties of the DataType.
*/
@extension("x-ms-client-flatten", true)
properties?: DataTypeUpdateProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/networkanalytics.json"

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

@ -14,7 +14,8 @@ namespace Microsoft.AzurePlaywrightService;
/**
* A quota resource
*/
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
model Quota is ProxyResource<QuotaProperties> {
/**
* The quota name.

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.AzurePlaywrightService;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AccountUpdate.properties);

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

@ -1,11 +1,9 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -219,7 +217,6 @@ model AccountUpdate {
/**
* The updatable properties of the Account.
*/
@extension("x-ms-client-flatten", true)
properties?: AccountUpdateProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/playwrighttesting.json"

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.ServiceNetworking;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(AssociationUpdate.properties);

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

@ -1,11 +1,9 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -148,7 +146,6 @@ model AssociationUpdate {
/**
* The updatable properties of the Association.
*/
@extension("x-ms-client-flatten", true)
properties?: AssociationUpdateProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/TrafficController.json"

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

@ -0,0 +1,14 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.AzureSphere;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ProductUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DeviceGroupUpdate.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(DeviceUpdate.properties);

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

@ -1,12 +1,10 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -684,7 +682,6 @@ model ProductUpdate {
/**
* The updatable properties of the Product.
*/
@extension("x-ms-client-flatten", true)
properties?: ProductUpdateProperties;
}
@ -705,7 +702,6 @@ model DeviceGroupUpdate {
/**
* The updatable properties of the DeviceGroup.
*/
@extension("x-ms-client-flatten", true)
properties?: DeviceGroupUpdateProperties;
}
@ -756,7 +752,6 @@ model DeviceUpdate {
/**
* The updatable properties of the Device.
*/
@extension("x-ms-client-flatten", true)
properties?: DeviceUpdateProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json"

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

@ -16,7 +16,8 @@ namespace Microsoft.Storage;
*/
#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
@locationResource
@subscriptionResource
@parentResource("SubscriptionLocationResource")
@includeInapplicableMetadataInPayload(false)
@Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties)
model DeletedAccount extends ProxyResourceBase {

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

@ -0,0 +1,26 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.Storage;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(StorageAccountCreateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(StorageAccountUpdateParameters.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(PrivateLinkResource.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ImmutabilityPolicyProperties.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ListContainerItem.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(FileShareItem.properties);
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(ListQueue.queueProperties);

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

@ -1,13 +1,11 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -826,7 +824,6 @@ model StorageAccountCreateParameters {
/**
* The parameters used to create the storage account.
*/
@extension("x-ms-client-flatten", true)
properties?: StorageAccountPropertiesCreateParameters;
}
@ -1965,7 +1962,6 @@ model StorageAccountUpdateParameters {
/**
* The parameters used when updating a storage account.
*/
@extension("x-ms-client-flatten", true)
properties?: StorageAccountPropertiesUpdateParameters;
/**
@ -2892,7 +2888,6 @@ model PrivateLinkResource extends Resource {
/**
* Resource properties.
*/
@extension("x-ms-client-flatten", true)
properties?: PrivateLinkResourceProperties;
}
@ -3456,7 +3451,6 @@ model ImmutabilityPolicyProperties {
/**
* The properties of an ImmutabilityPolicy of a blob container.
*/
@extension("x-ms-client-flatten", true)
properties?: ImmutabilityPolicyProperty;
/**
@ -4089,7 +4083,6 @@ model ListContainerItem extends AzureEntityResource {
/**
* The blob container properties be listed out.
*/
@extension("x-ms-client-flatten", true)
properties?: ContainerProperties;
}
@ -4100,7 +4093,6 @@ model FileShareItem extends AzureEntityResource {
/**
* The file share properties be listed out.
*/
@extension("x-ms-client-flatten", true)
properties?: FileShareProperties;
}
@ -4109,7 +4101,6 @@ model ListQueue extends Resource {
* List Queue resource properties.
*/
@projectedName("json", "properties")
@extension("x-ms-client-flatten", true)
queueProperties?: ListQueueProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -424,7 +424,7 @@
"description": "The provisioning state of a resource.",
"enum": ["Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted"],
"x-ms-enum": {
"name": "ProvisioningState",
"name": "ProvisioningStateTest",
"modelAsString": true,
"values": [
{

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Microsoft.Test;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(EmployeeUpdate.properties);

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

@ -1,11 +1,9 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/openapi";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
using Azure.ResourceManager;
using Azure.ResourceManager.Foundations;
@ -16,7 +14,7 @@ interface Operations extends Azure.ResourceManager.Operations {}
/**
* The provisioning state of a resource.
*/
enum ProvisioningState {
enum ProvisioningStateTest {
/**
* Resource has been created.
*/
@ -76,7 +74,7 @@ model EmployeeProperties {
* The status of the last operation.
*/
@visibility("read")
provisioningState?: ProvisioningState;
provisioningState?: ProvisioningStateTest;
}
/**
@ -120,7 +118,6 @@ model EmployeeUpdate {
/**
* The updatable properties of the Employee.
*/
@extension("x-ms-client-flatten", true)
properties?: EmployeeUpdateProperties;
}

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

@ -3,6 +3,7 @@ emit:
options:
"@azure-tools/typespec-autorest":
use-read-only-status-schema: true
omit-unreachable-types: true
emitter-output-dir: "{project-root}/.."
azure-resource-provider-folder: "resource-manager"
output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json"

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.Batch;

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using AutoRestComplexTestService;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(MyBaseType.helper);

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

@ -1,10 +1,8 @@
import "@typespec/rest";
import "@typespec/http";
import "@typespec/openapi";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
namespace AutoRestComplexTestService;
@ -201,8 +199,6 @@ model ReadonlyObj {
@discriminator("kind")
model MyBaseType {
propB1?: string;
@extension("x-ms-client-flatten", true)
helper?: MyBaseHelperType;
}

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

@ -0,0 +1,3 @@
import "./main.tsp";
using ComplexModelClient;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.Language.Authoring;

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

@ -0,0 +1,8 @@
import "./main.tsp";
import "@typespec/typespec-client-generator-core";
using Azure.ClientGenerator.Core;
using Azure.Keyvault;
#suppress "deprecated" "@flattenProperty decorator is not recommended to use."
@@flattenProperty(RoleDefinition.properties);

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

@ -1,12 +1,10 @@
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "@typespec/openapi";
using TypeSpec.Rest;
using TypeSpec.Http;
using Azure.Core;
using TypeSpec.OpenAPI;
namespace Azure.Keyvault;
@ -2205,7 +2203,6 @@ model RoleDefinition {
/**
* Role definition properties.
*/
@extension("x-ms-client-flatten", true)
properties?: RoleDefinitionProperties;
}

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

@ -1,11 +1,9 @@
import "@azure-tools/typespec-azure-core";
import "@typespec/rest";
import "./models.tsp";
import "@typespec/openapi";
using TypeSpec.Rest;
using TypeSpec.Http;
using TypeSpec.OpenAPI;
namespace Azure.Keyvault;
@ -207,7 +205,6 @@ op setCertificateIssuer is Azure.Core.Foundations.Operation<
* Certificate issuer set parameter.
*/
@body
@extension("x-ms-client-flatten", true)
parameter: CertificateIssuerSetParameters;
},
IssuerBundle
@ -233,7 +230,6 @@ op updateCertificateIssuer is Azure.Core.Foundations.Operation<
* Certificate issuer update parameter.
*/
@body
@extension("x-ms-client-flatten", true)
parameter: CertificateIssuerUpdateParameters;
},
IssuerBundle
@ -299,7 +295,6 @@ op createCertificate is Azure.Core.Foundations.Operation<
* The parameters to create a certificate.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: CertificateCreateParameters;
},
CertificateOperation
@ -330,7 +325,6 @@ op importCertificate is Azure.Core.Foundations.Operation<
* The parameters to import the certificate.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: CertificateImportParameters;
},
CertificateBundle
@ -433,7 +427,6 @@ op updateCertificate is Azure.Core.Foundations.Operation<
* The parameters for certificate update.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: CertificateUpdateParameters;
},
CertificateBundle
@ -483,7 +476,6 @@ op updateCertificateOperation is Azure.Core.Foundations.Operation<
* The certificate operation response.
*/
@body
@extension("x-ms-client-flatten", true)
certificateOperation: CertificateOperationUpdateParameter;
},
CertificateOperation
@ -549,7 +541,6 @@ op mergeCertificate is Azure.Core.Foundations.Operation<
* The parameters to merge certificate.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: CertificateMergeParameters;
},
CertificateBundle
@ -710,7 +701,6 @@ op createKey is Azure.Core.Foundations.Operation<
* The parameters to create a key.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyCreateParameters;
},
KeyBundle
@ -765,7 +755,6 @@ op importKey is Azure.Core.Foundations.Operation<
* The parameters to import a key.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyImportParameters;
},
KeyBundle
@ -820,7 +809,6 @@ op updateKey is Azure.Core.Foundations.Operation<
* The parameters of the key to update.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyUpdateParameters;
},
KeyBundle
@ -990,7 +978,6 @@ op encrypt is Azure.Core.Foundations.Operation<
* The parameters for the encryption operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyOperationsParameters;
},
KeyOperationResult
@ -1030,7 +1017,6 @@ op decrypt is Azure.Core.Foundations.Operation<
* The parameters for the decryption operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyOperationsParameters;
},
KeyOperationResult
@ -1062,7 +1048,6 @@ op sign is Azure.Core.Foundations.Operation<
* The parameters for the signing operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeySignParameters;
},
KeyOperationResult
@ -1097,7 +1082,6 @@ op verify is Azure.Core.Foundations.Operation<
* The parameters for verify operations.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyVerifyParameters;
},
KeyVerifyResult
@ -1133,7 +1117,6 @@ op wrapKey is Azure.Core.Foundations.Operation<
* The parameters for wrap operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyOperationsParameters;
},
KeyOperationResult
@ -1170,7 +1153,6 @@ op unwrapKey is Azure.Core.Foundations.Operation<
* The parameters for the key operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyOperationsParameters;
},
KeyOperationResult
@ -1201,7 +1183,6 @@ op release is Azure.Core.Foundations.Operation<
* The parameters for the key release operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: KeyReleaseParameters;
},
KeyReleaseResult
@ -1369,7 +1350,6 @@ op setSecret is Azure.Core.Foundations.Operation<
* The parameters for setting the secret.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: SecretSetParameters;
},
SecretBundle
@ -1421,7 +1401,6 @@ op updateSecret is Azure.Core.Foundations.Operation<
* The parameters for update secret operation.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: SecretUpdateParameters;
},
SecretBundle
@ -1633,7 +1612,6 @@ op updateSettings is Azure.Core.Foundations.Operation<
* The parameters to update an account setting.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: UpdateSettingsRequest;
},
Setting
@ -1854,7 +1832,6 @@ op setStorageAccount is Azure.Core.Foundations.Operation<
* The parameters to create a storage account.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: StorageAccountCreateParameters;
},
StorageBundle
@ -1879,7 +1856,6 @@ op updateStorageAccount is Azure.Core.Foundations.Operation<
* The parameters to update a storage account.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: StorageAccountUpdateParameters;
},
StorageBundle
@ -1904,7 +1880,6 @@ op regenerateStorageAccountKey is Azure.Core.Foundations.Operation<
* The parameters to regenerate storage account key.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: StorageAccountRegenerteKeyParameters;
},
StorageBundle
@ -2098,7 +2073,6 @@ op setSasDefinition is Azure.Core.Foundations.Operation<
* The parameters to create a SAS definition.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: SasDefinitionCreateParameters;
},
SasDefinitionBundle
@ -2130,7 +2104,6 @@ op updateSasDefinition is Azure.Core.Foundations.Operation<
* The parameters to update a SAS definition.
*/
@body
@extension("x-ms-client-flatten", true)
parameters: SasDefinitionUpdateParameters;
},
SasDefinitionBundle

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.LoadTesting;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using NotificationHubsClient;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.AI.OpenAI;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using AutoRestPagingTestService;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using Azure.Language.QnAMaker;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using QnAMakerRuntimeClient;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using AzureSchemaRegistry;

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

@ -0,0 +1,3 @@
import "./main.tsp";
using AutoRestUrlTestService;

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

@ -184,16 +184,12 @@ interface pathsOperations {
void
>;
/**
* Get 'begin!*'();:@ &=+$,/?#[]end
*/
@doc("Get 'begin!*'();:@ &=+$,/?#[]end")
@route("/paths/string/begin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend/{stringPath}")
@get
stringUrlEncoded is Azure.Core.Foundations.Operation<
{
/**
* 'begin!*'();:@ &=+$,/?#[]end' url encoded string value
*/
@doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value")
@path
stringPath: "begin!*'();:@ &=+$,/?#[]end";
},
@ -209,9 +205,7 @@ interface pathsOperations {
@get
stringUrlNonEncoded is Azure.Core.Foundations.Operation<
{
/**
* 'begin!*'();:@&=+$,end' url encoded string value
*/
@doc("'begin!*'();:@&=+$,end' url encoded string value")
@path
stringPath: "begin!*'();:@&=+$,end";
},
@ -412,18 +406,18 @@ interface pathsOperations {
void
>;
/**
* Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
* using the csv-array format
*/
@doc("""
Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
using the csv-array format
""")
@route("/paths/array/ArrayPath1%2cbegin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend%2c%2c/{arrayPath}")
@get
arrayCsvInPath is Azure.Core.Foundations.Operation<
{
/**
* an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
* using the csv-array format
*/
@doc("""
an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
using the csv-array format
""")
@path
arrayPath: string[];
},
@ -704,16 +698,12 @@ interface queriesOperations {
void
>;
/**
* Get 'begin!*'();:@ &=+$,/?#[]end
*/
@doc("Get 'begin!*'();:@ &=+$,/?#[]end")
@route("/queries/string/begin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend")
@get
stringUrlEncoded is Azure.Core.Foundations.Operation<
{
/**
* 'begin!*'();:@ &=+$,/?#[]end' url encoded string value
*/
@doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value")
@query("stringQuery")
stringQuery: "begin!*'();:@ &=+$,/?#[]end";
},
@ -896,18 +886,18 @@ interface queriesOperations {
void
>;
/**
* Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
* ''] using the csv-array format
*/
@doc("""
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
''] using the csv-array format
""")
@route("/queries/array/csv/string/valid")
@get
arrayStringCsvValid is Azure.Core.Foundations.Operation<
{
/**
* an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
* using the csv-array format
*/
@doc("""
an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
using the csv-array format
""")
@query({
name: "arrayQuery",
format: "csv",
@ -975,18 +965,18 @@ interface queriesOperations {
void
>;
/**
* Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
* ''] using the ssv-array format
*/
@doc("""
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
''] using the ssv-array format
""")
@route("/queries/array/ssv/string/valid")
@get
arrayStringSsvValid is Azure.Core.Foundations.Operation<
{
/**
* an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
* using the ssv-array format
*/
@doc("""
an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
using the ssv-array format
""")
@query({
name: "arrayQuery",
format: "ssv",
@ -996,18 +986,18 @@ interface queriesOperations {
void
>;
/**
* Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
* ''] using the tsv-array format
*/
@doc("""
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
''] using the tsv-array format
""")
@route("/queries/array/tsv/string/valid")
@get
arrayStringTsvValid is Azure.Core.Foundations.Operation<
{
/**
* an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
* using the tsv-array format
*/
@doc("""
an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
using the tsv-array format
""")
@query({
name: "arrayQuery",
format: "tsv",
@ -1017,18 +1007,18 @@ interface queriesOperations {
void
>;
/**
* Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
* ''] using the pipes-array format
*/
@doc("""
Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null,
''] using the pipes-array format
""")
@route("/queries/array/pipes/string/valid")
@get
arrayStringPipesValid is Azure.Core.Foundations.Operation<
{
/**
* an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
* using the pipes-array format
*/
@doc("""
an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, '']
using the pipes-array format
""")
@query({
name: "arrayQuery",
format: "pipes",

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

@ -0,0 +1,3 @@
import "./main.tsp";
using AzureWebPubSubServiceRESTAPI;