-
Notifications
You must be signed in to change notification settings - Fork 79
Add Azure Alternate Type spector case and fix numeric type generation bug #3558
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
|
@copilot Based on the issue description, re-implement it. |
Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
Re-implemented the solution with the following fixes in commit dbd2ebb:
All 4 RLC integration tests now pass (getModel, putModel, getProperty, putProperty). |
…nto copilot/add-spector-case-for-azure-alternate-type
|
@copilot re-implement it. |
…ype property Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
Re-implemented successfully in commit fd1b1f9. Fixed the modular test to use direct client methods ( All tests passing:
The implementation follows the issue requirements with:
|
Adds spector test case for Azure Client Generator Core alternate-type spec. During implementation, discovered and fixed bugs in the TypeSpec-TS emitter that caused issues when generating code for array types.
Bug Fixes
modelUtils.ts:
numericscalar type support: TypeSpec'snumericscalar type was not mapped, causingnumeric[]to generate invalidarraytype instead ofnumber[]..includes()method whenschema.items.typeis undefined.Test Case Implementation
azure/client-generator-core/alternate-typeto bothazureRlcTspsandazureModularTspsis-modular-library: false) and Modular (withis-modular-library: true) test directoriesazureAlternateType.spec.tsfor both RLC and Modular with 4 test cases each:getModel/putModel: Tests Feature model with geometry, properties, and optional idgetProperty/putProperty: Tests ModelWithFeatureProperty wrapperAll integration tests pass successfully:
Technical Notes
The modular client generated methods directly on the client class (
client.getModel(),client.putModel(), etc.) rather than using a nested operation group pattern, matching the TypeSpec service definition.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.