-
Notifications
You must be signed in to change notification settings - Fork 868
Add specific inject xml code customization hooks for getters & setters. Remove unused custom partials. #3986
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
Conversation
…, and private member declarations. Delete any unused custom code files.
get { return this.modifiedSinceDate ?? DateTime.SpecifyKind(default, DateTimeKind.Utc); } | ||
set | ||
{ | ||
if (value == null) |
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 wasn't sure why this if
else
was here. Isn't this just the same thing as doing this.modifiedSinceDate=value
? If not, i can inject this as well. but it seemed redundant
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.
The if
isn't needed.
/// 7232</a>. | ||
/// </para> | ||
/// </summary> | ||
public DateTime? ModifiedSinceDate |
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.
docs are generated :)
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.
Pull Request Overview
This PR adds new customization hooks for code generation in the AWS .NET SDK to allow injecting custom code into getters, setters, and private member declarations. The primary motivation is to enable generating members of shapes while still allowing custom implementation without losing documentation updates.
- Adds new customization hooks for injecting code into property getters, setters, and private member declarations
- Updates the S3 service to use these new hooks instead of custom partial classes
- Removes unused custom partials for S3Grantee, LifecycleRule, and GetObjectMetadataRequest
Reviewed Changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
sdk/src/Services/S3/Custom/Model/S3Grantee.cs | Deleted custom partial class (now handled by code generation) |
sdk/src/Services/S3/Custom/Model/LifecycleRule.cs | Deleted custom partial class (now handled by code generation) |
sdk/src/Services/S3/Custom/Model/GetObjectMetadataRequest.cs | Deleted custom partial class (now handled by code generation) |
generator/ServiceModels/s3/s3.customizations.json | Added customization hooks to replace custom partials with generated code |
generator/ServiceClientGeneratorLib/Generators/SourceFiles/StructureGenerator.tt | Modified template to support new code injection hooks |
generator/ServiceClientGeneratorLib/Generators/SourceFiles/StructureGenerator.cs | Generated code changes from template updates |
generator/ServiceClientGeneratorLib/Generators/BaseGenerator.tt | Added helper method for writing injected XML code |
generator/ServiceClientGeneratorLib/Generators/BaseGenerator.cs | Generated code changes from template updates |
generator/ServiceClientGeneratorLib/Customizations.cs | Added new customization properties for code injection |
generator/.DevConfigs/34a3fc68-a145-4312-b55e-e9490ea8c7db.json | Added dev config file for patch version update |
…SideEncryptionMethod on initiatemultipartuploadrequest
Description
In this PR i had more customization hooks to allow injecting code in specific places such as the getters, setters and private member declarations.
Motivation and Context
The reason I wanted to add more customization hooks is because, whenever possible we want to generate members of shapes. If we decide to exclude a member via the
excludeMembers
customization hook I added, then the docs for that shape won't be generated and we could easily miss a doc update for that member if the docs were to be updated. This makes it so that the member will still be generated since instead of moving that member to a custom partial of a class, we just inject the customized code.Testing
Dry run DRY_RUN-32ff75b0-08bd-4a88-ae5f-18dc16d8e114
Screenshots (if appropriate)
Types of changes
Checklist
License