Uh oh!
There was an error while loading. Please reload this page.
http-client-java, option for allowing null value passed in property - #8097
Conversation
Uh oh!
There was an error while loading. Please reload this page.
No changes needing a change description found. |
You can try these changes here
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for allowing null values to be passed to specific model properties and serialized as explicit null fields in JSON output. The feature addresses issue #3102 by implementing a property-include-always option that forces serialization of null values for specified properties instead of omitting them entirely.
Key changes:
- Added a new configuration option
property-include-alwaysto control which properties should always be serialized even when null - Modified the JSON serialization logic to explicitly write null fields for specified properties
- Added test coverage to verify the behavior works correctly
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| EmitterOptions.java | Added propertyIncludeAlways field and JSON parsing support for the new option |
| TypeSpecFluentPlugin.java | Added configuration mapping to pass the new option to the generator settings |
| FluentJavaSettings.java | Added documentation for the property names that should always be serialized |
| FluentStreamStyleSerializationModelTemplate.java | Implemented custom serialization logic to handle null value serialization for specified properties |
| StreamSerializationModelTemplate.java | Refactored serialization methods to be extensible and support custom behavior |
| FunctionConfiguration.java | Generated test model with explicit null field serialization for the input property |
| StreamStyleSerializationTests.java | Added test to verify null values are properly serialized for specified properties |
| Generate.ps1 | Added test configuration to enable the new feature for FunctionConfiguration.input |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fixAzure/autorest.java#3102