Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 10, 2025

docs: add collapse-optional-nullable flag to Java SDK configuration

Summary

Added documentation for the collapse-optional-nullable configuration flag to the Java SDK configuration page. This flag was introduced in PR #10218 and enables OptionalNullable<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-name and custom-dependencies and follows the existing style and format of other boolean configuration flags.

Review & Testing Checklist for Human

  • Verify default value: Confirm that 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.
  • Verify technical accuracy: Confirm that the description of the three states (absent, null, present) and JSON Merge Patch semantics accurately reflects the flag's behavior as implemented in PR #10218.
  • Verify terminology: Confirm that "merge patch request fields" is the correct way to refer to this (I changed from "PATCH request fields" to comply with Vale style rules - verify this doesn't confuse users or misrepresent the feature).
  • Test preview: Check the preview deployment to ensure the documentation renders correctly and the new flag appears in the table of contents.

Notes

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-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

</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.
Copy link
Contributor

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.

@github-actions
Copy link
Contributor

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]>
@github-actions
Copy link
Contributor

- 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]>
@github-actions
Copy link
Contributor

@tstanmay13 tstanmay13 merged commit 5f944df into main Nov 10, 2025
2 checks passed
@tstanmay13 tstanmay13 deleted the devin/1762751299-java-optional-nullable-docs branch November 10, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants