-
Notifications
You must be signed in to change notification settings - Fork 46
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
Backmerge/release/january 2025 2025 01 31 #2160
Merged
Merged
Conversation
This file contains 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
1. Add `serializationOptions` property to `SdkModelType` and `SdkBodyModelPropertyType`. Its type is `SerializationOptions` which contains the info of how to serialize to Json/Xml/Multipart value. 2. Deprecate `serializedName` property in `SdkBodyModelPropertyType`, use `serializationOptions.xxx.name` instead. 3. Deprecate `multipartOptions` in `SdkBodyModelPropertyType`, use `serializationOptions.multipart` instead. resolve: #1729 Add new interfaces to represent detail of the serialization info, also will move multipart related options into it: ```typescript export interface SerializationOptions { json?: JsonSerializationOptions; xml?: XmlSerializationOptions; multipart?: MultipartOptions; } /** * For Json serialization. * The name will come from explicit setting of `@encodedName("application/json", "NAME")`. */ export interface JsonSerializationOptions { name: string; } /** * For Xml serialization. * The `name`/`itemsName` will come from explicit setting of `@encodedName("application/xml", "NAME")` or `@xml.Name("NAME")`. * Other properties come from `@xml.attribute`, `@xml.ns`, `@xml.unwrapped`. * The `itemsName` and `itemsNs` are used for array items. */ export interface XmlSerializationOptions { name?: string; attribute?: boolean; ns?: { namespace: string; prefix: string; }; unwrapped?: boolean; itemsName?: string; itemsNs?: { namespace: string; prefix: string; }; } ``` The serialization info will be added only when it is used in request body or response body with corresponding content type. The serialization options update logic could follow usage/access update logic. This change could cover all possible serialization logic with extensibility.
1. add sub namespace example for clients 2. add sub namespace example for models 3. rearrange the sections --------- Co-authored-by: Weidong Xu <[email protected]>
1. Deprecate `serializedName` property of `SdkEndpointParameter`. Use `type.templateArguments[x].serializedName` or `type.variantTypes[x].templateArguments[x].serializedName` instead. 2. Fix regression of example mapping for model with parameters.
Co-authored-by: iscai-msft <[email protected]>
Co-authored-by: iscai-msft <[email protected]>
…ackmerge/release/january-2025-2025-01-31
iscai-msft
requested review from
lmazuel,
m-nash,
srnagar,
joheredi,
bterlson,
markcowl,
allenjzhang and
timotheeguerin
as code owners
January 31, 2025 21:11
timotheeguerin
approved these changes
Jan 31, 2025
❌ There is undocummented changes. Run The following packages have changes but are not documented.
Show changes |
You can try these changes here
|
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.
No description provided.