Add COMMENTER value to AccessLevel enum - #188
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR updates ChangesAccessLevel COMMENTER support
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ggoranov-smar
approved these changes
Aug 4, 2026
This file contains hidden or 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
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.
Summary
Adds the missing
COMMENTERvalue tocom.smartsheet.api.models.enums.AccessLevel.Fixes smartsheet/smartsheet-csharp-sdk#218, which reports this against the C# SDK. The Java SDK had the identical gap, and the maintainer response on that issue committed to fixing both.
Problem
The Access Level schema documents six values, but the enum defined only five —
COMMENTERwas absent.JacksonJsonSerializersetsREAD_UNKNOWN_ENUM_VALUES_AS_NULL, so a Commenter access level was dropped silently: the object came back fully populated withaccessLevel == null, no exception and no warning. Callers could not distinguish "this share is Commenter" from "this share has no access level". This affectedShareResponse,Sheet,Report,Workspace, and every other model carrying anaccessLevel.Unlike C#, the write path was not separately broken here —
accessLevelfields are reference types — butCreateShareRequestandUpdateShareRequeststill had noCOMMENTERvalue to set.Changes
COMMENTERto theAccessLevelenum, declared afterVIEWERto match the order in the API specification (and the Python SDK).smartsheet.redoc.lyjavadoc link to the current Resource Access Levels guide.AccessLevelTestfor the new value and count, and pinned the declaration order so it cannot drift from the spec.AccessLevelDeserializationTestcoveringShareResponse,Sheet,Report, andWorkspace.Forward-compatibility is deliberately preserved: a genuinely unknown access level still deserializes to
nullrather than failing the response. That behavior is now pinned by a test.Testing
./gradlew test— 659/661 pass. The 2 failures areLoggingITintegration tests that require a live API connection and fail identically on cleanmainlinein this environment.ReportResources/ReportResourcesImpl).Note
The C# counterpart is smartsheet/smartsheet-csharp-sdk#219. Python and JavaScript already had
COMMENTER.Summary by CodeRabbit
COMMENTERaccess level was incorrectly deserialized asnullfor sheets, reports, workspaces, and shares.