-
Notifications
You must be signed in to change notification settings - Fork 3
docs: add collapse-optional-nullable flag to Java SDK configuration #1882
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
docs: add collapse-optional-nullable flag to Java SDK configuration #1882
Conversation
Add documentation for the collapse-optional-nullable configuration flag that enables OptionalNullable types for PATCH requests. This flag allows distinguishing between absent, null, and present field states for proper JSON Merge Patch semantics. Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| </ParamField> | ||
| <ParamField path="collapse-optional-nullable" type="boolean" default="false" required={false} toc={true}> | ||
| When enabled, generates `OptionalNullable<T>` types for PATCH request fields to distinguish between three states: absent (field not provided), null (field explicitly set to null), and present (field has a non-null value). This enables proper handling of JSON Merge Patch semantics where omitting a field, setting it to null, and providing a value have different meanings. |
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.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'PATCH' has no definition.
Add PATCH to the list of allowed acronyms in FernStyles/Acronyms.yml to match other HTTP methods (GET, POST, PUT) and resolve Vale suggestion. Co-Authored-By: [email protected] <[email protected]>
- Remove PATCH from Vale acronyms exceptions (should not hide Vale suggestions) - Change 'PATCH request fields' to 'merge patch request fields' to avoid triggering Vale Acronyms rule - Maintains technical accuracy while complying with Vale style guidelines Co-Authored-By: [email protected] <[email protected]>
docs: add collapse-optional-nullable flag to Java SDK configuration
Summary
Added documentation for the
collapse-optional-nullableconfiguration flag to the Java SDK configuration page. This flag was introduced in PR #10218 and enablesOptionalNullable<T>types for merge patch requests to distinguish between three field states: absent (not provided), null (explicitly set to null), and present (has a value).The documentation is placed alphabetically between
client-class-nameandcustom-dependenciesand follows the existing style and format of other boolean configuration flags.Review & Testing Checklist for Human
default="false"is correct. I inferred this from the schema showing the field as optional, but the schema doesn't explicitly specify a default value. Check the generator code or PR #10218 to confirm.Notes
BaseJavaCustomConfigSchema.ts:collapse-optional-nullableseed/java-sdk/nullable-optional/collapse-optional-nullable/