Skip to content

[TSP Migration][authorization-12-01]TypeSpec migrated from swagger#41617

Merged
pshao25 merged 65 commits intoAzure:mainfrom
mcgallan:wave6-authorization-convert
Apr 9, 2026
Merged

[TSP Migration][authorization-12-01]TypeSpec migrated from swagger#41617
pshao25 merged 65 commits intoAzure:mainfrom
mcgallan:wave6-authorization-convert

Conversation

@mcgallan
Copy link
Copy Markdown
Member

@mcgallan mcgallan commented Mar 20, 2026

This PR migrates your latest version (identified by the tag in your readme.md) of swagger to TypeSpec. We already tried our best to make sure the TypeSpec represents same as previous swagger. Since we lack the business knowledge, please validate this PR again to make sure it's functional equivalent as before. The local validation step is at Getting started | TypeSpec Azure

Besides, TypeSpec encourages to follow ARM guidelines. Therefore, some representations in your previous swagger will be fixed to follow these guidelines. When you see differences in your local validation, please keep this note in mind.

Please reach out to TypeSpec Discussions Channel if there is any help needed.

The following known differences were identified during the migration from Swagger to TypeSpec and are documented here for transparency:

1.x-ms-azure-rbac-permissions-required not yet supported — The x-ms-azure-rbac-permissions-required extension used in the ClassicAdmin spec cannot currently be expressed in TypeSpec. A dedicated decorator to support this extension is planned for a future update.

2.x-ms-client-flatten removed due to discriminator conflict — The @flattenProperty decorator has been removed from AccessReviewDecisionProperties.principal, AccessReviewDecisionInsight.properties, AlertIncident.properties, and AlertConfiguration.properties, as property flattening is incompatible with discriminated union types in TypeSpec.

3.Extra x-ms-identifiers on RoleAssignmentListResult — The generated output for RoleAssignmentListResult in RoleAssignment.Management includes an unintended x-ms-identifiers annotation (["roleAssignmentName", "id"]). This is a known TypeSpec emitter behavior and will be addressed.

4.x-ms-discriminator-value emitted for derived models — In the 2024-09-01-preview openapi.json, models that extend a base model decorated with @Discriminator will emit x-ms-discriminator-value in the generated Swagger. This is expected TypeSpec behavior.

5.UserType naming conflict — Two distinct UserType definitions with different content exist across the specs. To resolve the naming collision, they have been temporarily renamed to CommonUserType and UserType respectively. A long-term resolution is pending.

6.PolicyProperties loses readOnly when used as resource properties — When PolicyProperties is referenced as the properties bag of a resource model, the readOnly constraint on its fields is not preserved in the generated output. This is a known limitation and will be investigated.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 20, 2026

Next Steps to Merge

✅ All automated merging requirements have been met! To get your PR merged, see aka.ms/azsdk/specreview/merge.

Comment generated by summarize-checks workflow run.

@github-actions github-actions Bot added the BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required label Mar 26, 2026
@github-actions github-actions Bot added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Apr 8, 2026
@mentat9
Copy link
Copy Markdown
Member

mentat9 commented Apr 8, 2026

@mcgallan - Please address Required CI checks that are failing (Swagger Avodado and Swagger ModelValidation).

@mentat9 mentat9 added ARMChangesRequested and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Apr 8, 2026
@pshao25
Copy link
Copy Markdown
Member

pshao25 commented Apr 9, 2026

Avocado failed because of multiple API. ModelValidation failed because the original swagger doesn't have examples.

@pshao25 pshao25 added Approved-Avocado Approved-ModelValidation ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review PublishToCustomers Acknowledgement the changes will be published to Azure customers. labels Apr 9, 2026
@pshao25 pshao25 merged commit 7346f2b into Azure:main Apr 9, 2026
111 of 126 checks passed
markcowl pushed a commit to markcowl/azure-rest-api-specs that referenced this pull request Apr 9, 2026
…zure#41617)

* convert

* convert1

* convert AccessReview

* update

* RoleAssignment compile

* authorization compile

* fix usertype

* update

* add common

* add suppress

* remove operationId

* update

* delete

* delete agent

* fix cspell

* fix pipeline error

* fix common type

* fix model validation

* compile

* rename namespaces

* fix armCommonTypesVersion

* Revert "fix armCommonTypesVersion"

This reverts commit 0243e28.

* update client.tsp

* regen

* update

* revert

* fix modelvalidation

* update readme

* update

* add x-ms-path

* update x-ms-path

* add suppress

* rename folder

* update

* update suppress

* update tspconfig

* rename ClassicAdmin

* update client name

* Fix Authorization refreshAll LRO response shape

* Use go alternateType for DenyAssignmentPrincipalType

* fix finalresult

* Update client.tsp

* Update client.tsp

* Update ProviderOperationsMetadata.tsp

* Update client.tsp

* Update client.tsp

* java tspconfig

* Update tspconfig and client.tsp for Java authorization migration

- Add premium: true to preserve hand-written files
- Add use-object-for-unknown: true for unknown type support
- Add @@Usage for RoleAssignment as input model in Java

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* turn off samples

* update

* fix

* fix

* add x-ms-skip-url-encoding

* update readme

* add file

* update

---------

Co-authored-by: Jiao Di (MSFT) <v-jiaodi@microsoft.com>
Co-authored-by: judy <v-liujudy@microsoft.com>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Pan Shao <97225342+pshao25@users.noreply.github.com>
Ealianis pushed a commit that referenced this pull request Apr 17, 2026
…41617)

* convert

* convert1

* convert AccessReview

* update

* RoleAssignment compile

* authorization compile

* fix usertype

* update

* add common

* add suppress

* remove operationId

* update

* delete

* delete agent

* fix cspell

* fix pipeline error

* fix common type

* fix model validation

* compile

* rename namespaces

* fix armCommonTypesVersion

* Revert "fix armCommonTypesVersion"

This reverts commit 0243e28.

* update client.tsp

* regen

* update

* revert

* fix modelvalidation

* update readme

* update

* add x-ms-path

* update x-ms-path

* add suppress

* rename folder

* update

* update suppress

* update tspconfig

* rename ClassicAdmin

* update client name

* Fix Authorization refreshAll LRO response shape

* Use go alternateType for DenyAssignmentPrincipalType

* fix finalresult

* Update client.tsp

* Update client.tsp

* Update ProviderOperationsMetadata.tsp

* Update client.tsp

* Update client.tsp

* java tspconfig

* Update tspconfig and client.tsp for Java authorization migration

- Add premium: true to preserve hand-written files
- Add use-object-for-unknown: true for unknown type support
- Add @@Usage for RoleAssignment as input model in Java

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* turn off samples

* update

* fix

* fix

* add x-ms-skip-url-encoding

* update readme

* add file

* update

---------

Co-authored-by: Jiao Di (MSFT) <v-jiaodi@microsoft.com>
Co-authored-by: judy <v-liujudy@microsoft.com>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Pan Shao <97225342+pshao25@users.noreply.github.com>
Ealianis pushed a commit that referenced this pull request Apr 17, 2026
…41617)

* convert

* convert1

* convert AccessReview

* update

* RoleAssignment compile

* authorization compile

* fix usertype

* update

* add common

* add suppress

* remove operationId

* update

* delete

* delete agent

* fix cspell

* fix pipeline error

* fix common type

* fix model validation

* compile

* rename namespaces

* fix armCommonTypesVersion

* Revert "fix armCommonTypesVersion"

This reverts commit 0243e28.

* update client.tsp

* regen

* update

* revert

* fix modelvalidation

* update readme

* update

* add x-ms-path

* update x-ms-path

* add suppress

* rename folder

* update

* update suppress

* update tspconfig

* rename ClassicAdmin

* update client name

* Fix Authorization refreshAll LRO response shape

* Use go alternateType for DenyAssignmentPrincipalType

* fix finalresult

* Update client.tsp

* Update client.tsp

* Update ProviderOperationsMetadata.tsp

* Update client.tsp

* Update client.tsp

* java tspconfig

* Update tspconfig and client.tsp for Java authorization migration

- Add premium: true to preserve hand-written files
- Add use-object-for-unknown: true for unknown type support
- Add @@Usage for RoleAssignment as input model in Java

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* turn off samples

* update

* fix

* fix

* add x-ms-skip-url-encoding

* update readme

* add file

* update

---------

Co-authored-by: Jiao Di (MSFT) <v-jiaodi@microsoft.com>
Co-authored-by: judy <v-liujudy@microsoft.com>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
Co-authored-by: Weidong Xu <weidxu@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Pan Shao <97225342+pshao25@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved-Avocado Approved-LintDiff Approved-ModelValidation Approved-Suppression ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review Authorization BreakingChange-Approved-Benign Changes are not breaking at the REST API level and have at most minor impact to generated SDKs. BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required PublishToCustomers Acknowledgement the changes will be published to Azure customers. resource-manager SuppressionReviewRequired TypeSpec Authored with TypeSpec typespec-conversion-w6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants