Add External property to InputType to preserve original type information#9153
Merged
JoshLove-msft merged 9 commits intomainfrom Dec 8, 2025
Merged
Add External property to InputType to preserve original type information#9153JoshLove-msft merged 9 commits intomainfrom
JoshLove-msft merged 9 commits intomainfrom
Conversation
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
...lient-csharp/generator/Microsoft.TypeSpec.Generator.Input/src/InputTypes/ExternalTypeInfo.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Contributor
|
@copilot we need to delete InputExternalType |
Copilot
AI
changed the title
[WIP] Include original input type information for external types
Add External property to InputType to preserve original type information
Dec 7, 2025
- Renamed ExternalTypeInfo to InputExternalTypeProperties - Created fromSdkExternalTypeInfo helper function instead of extracting inline - Removed externalInfo parameter from all helper functions - Deleted InputExternalType class and converter - Updated TypeFactory to check External property and call CreateExternalType - Updated tests to use new ExternalUnion helper Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Contributor
Author
...p/generator/Microsoft.TypeSpec.Generator.Input/src/InputTypes/InputExternalTypeProperties.cs
Outdated
Show resolved
Hide resolved
Applied rename across TypeScript and C# files as requested Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/common/InputFactory.cs
Outdated
Show resolved
Hide resolved
...r/Microsoft.TypeSpec.Generator.Input/src/InputTypes/Serialization/InputArrayTypeConverter.cs
Show resolved
Hide resolved
- Removed ExternalUnion helper method - Added optional InputExternalTypeMetadata parameter to Union method - Updated all test usages to use Union method with external parameter Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Contributor
|
Contributes to Azure/azure-sdk-for-net#54347 |
…ation tests - Added InputExternalTypeMetadata parameter to Array, Dictionary, Model, and Enum factory methods - Added 5 comprehensive tests for External property deserialization covering Union, Model, Array, Dictionary, and Enum types Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Contributor
|
No changes needing a change description found. |
jorgerangel-msft
approved these changes
Dec 8, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
InputExternalTypeMetadatainterface to TypeScript for external type metadataexternalproperty to TypeScriptInputTypeBaseinterfacefromSdkExternalTypeInfohelper function to convert TCGC external infofromSdkTypeto use helper function instead of extracting inlineInputExternalTypehandling and preserve original type structureInputExternalTypeMetadataclassExternalproperty to C#InputTypeclassInputExternalTypeMetadataConverterfor JSON serializationInputExternalTypeclass and converterTypeFactory.CreateCSharpTypeCoreto check External property firstCreateExternalTypeto acceptInputExternalTypeMetadataInputExternalTypeMetadataparameter to all applicable InputFactory methods (Union, Array, Dictionary, Model, Enum)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.