-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CanonicalEmitter] Add option and isArmCommonType check (#1065)
This PR addressed 2 issues: 1. add option "use-read-only-status-schema" to fix ProvisioningStateMustBeReadOnly bug; The bug is mentioned here https://github.com/Azure/azure-rest-api-specs/discussions/29471 and the suggested walkaround is set option "use-read-only-status-schema" to true. Canonical emitter doesn't have this option. So add this option to the emitter. ![image](https://github.com/Azure/typespec-azure/assets/8683976/1e12d103-7710-4d92-8458-da8a1c98ae66) 2. add isArmCommonType check to avoid decorator validation in canonical emitter Canonical emitter will generate warning when @typeChangedFrom decorator is used. To make sure this not apply to common type, add isArmCommonType check --------- Co-authored-by: Ding <dinwa@microsoft.com>
- Loading branch information
Showing
8 changed files
with
31 additions
and
37 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...changes/canonical_emitter_set_option_and_commontype_check-2024-6-24-11-03-51.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking | ||
changeKind: fix | ||
packages: | ||
- "@azure-tools/typespec-autorest-canonical" | ||
--- | ||
|
||
set option "use-read-only-status-schema" to true to fix ProvisioningStateMustBeReadOnly bug; | ||
add isArmCommonType check to avoid decorator validation in canonical emitter |
7 changes: 7 additions & 0 deletions
7
.chronus/changes/update_canonical_swagger_folder_name-2024-6-6-11-44-3.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
changeKind: fix | ||
packages: | ||
- "@azure-tools/typespec-autorest-canonical" | ||
--- | ||
|
||
update the canonical swagger file folder name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
packages/typespec-autorest-canonical/test/property-schema.test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.