-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[Typespec Migration] migrate control plane containerregistry to typespec #37169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Typespec Migration] migrate control plane containerregistry to typespec #37169
Conversation
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. |
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
...nager/Microsoft.ContainerRegistry/Registry/preview/2025-05-01-preview/containerregistry.json
Outdated
Show resolved
Hide resolved
...nager/Microsoft.ContainerRegistry/Registry/preview/2025-05-01-preview/containerregistry.json
Outdated
Show resolved
Hide resolved
...nager/Microsoft.ContainerRegistry/Registry/preview/2025-05-01-preview/containerregistry.json
Show resolved
Hide resolved
...nager/Microsoft.ContainerRegistry/Registry/preview/2025-05-01-preview/containerregistry.json
Outdated
Show resolved
Hide resolved
...nager/Microsoft.ContainerRegistry/Registry/preview/2025-05-01-preview/containerregistry.json
Show resolved
Hide resolved
...nager/Microsoft.ContainerRegistry/Registry/preview/2025-05-01-preview/containerregistry.json
Outdated
Show resolved
Hide resolved
...tion/containerregistry/resource-manager/Microsoft.ContainerRegistry/RegistryTasks/models.tsp
Outdated
Show resolved
Hide resolved
...ication/containerregistry/resource-manager/Microsoft.ContainerRegistry/Registry/Registry.tsp
Show resolved
Hide resolved
| namespace Microsoft.ContainerRegistry; | ||
|
|
||
| model MyPrivateLinkResource is PrivateLink; | ||
| alias PrivateLinkOperations = PrivateLinks<MyPrivateLinkResource>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change by designed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I referred to the test case in this PR to modify the typespec code to support arm PrivateLinkResource template for this service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the MyPRivateLinkResource is not the defined name in swagger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would not affect swagger and sdk generation.
Do you think it is better to use
alias PrivateLinkOperations = PrivateLinks<PrivateLink>;
directly to reduce confusion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It affected Go SDK generation. We generated the resource with MyPRivateLinkResource name. Could you reach out to @pshao25 to see how to express it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the code in ee1656a#diff-5a63799561fd0b3b14e61e5e0f6de5cf19217505b23b1bf769babae5a60de2f4
could you help check again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have tested the converted version. The resource model name has been changed from PrivateLinkResource to PrivateLink which is a break for Go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update to PrivateLinks<PrivateLinkResource>
| enum ContainerRegistryResourceType { | ||
| `Microsoft.ContainerRegistry/registries`, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be a constant.
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.