arm-containerregistry. fail to build.
See original GitHub issueAfter we generation packages for arm-containerregistry, we found it’s unable to build and report errors like this
To repro, please checkout latest swagger repo and using code generation command like
autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --typescript-sdks-folder=/Users/zhangqiaoqiao/work/code/azure-sdk-for-js ../azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.12
After dig into this issue, we found the OS type is an enum type. but the weird part is other enum type works fine. I am not sure why.
We can generate Architecture type correctly but not OS.
Another point need to mention here, how is current code generator handle modelAsString: true enum ? because I saw the generated code for Architecture
It just a normal string type and though we generated KnownArchitecture, but I never see it was used anywhere. I am not sure if that’s expected and users friendly?
Maybe we should change Architecture definition like:
export type Architecture = KnownArchitecture | string;
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Based on the offline discussion, @qiaozha has informed that the issue has been resolved. Closing this issue.
I have found a possible solution for this issue. The test suite is currently running. Once it is complete, I will update the issue with the PR.