Add objectIdStr field to Event model#171
Merged
ggoranov-smar merged 11 commits intoMay 28, 2026
Merged
Conversation
added 3 commits
May 27, 2026 13:39
- Add objectIdStr field to support alphanumeric object identifiers - Getter and setter with builder pattern (returns this) - Javadoc on both methods including @return - CHANGELOG entry under [x.x.x] - unreleased - Relates to AUD-904
- EventTest covers Jackson deserialization with/without field and builder pattern - Update listEvents.json fixture to include objectIdStr on one event - Add objectIdStr assertions to EventResourcesImplTest
- Verify objectIdStr deserialization via mock API stubs - Cover moreAvailable true/false and 404 error cases
- Add testListEventsGeneratedUrlIsCorrect (URL, method, query params) - Add testListEventsAllResponseBodyProperties with full recursive comparison against a new all-response-body-properties WireMock fixture - Upgrade required-properties tests to use usingRecursiveComparison() with typed EXPECTED_* constants covering all Event fields, including previously unasserted accessTokenName, eventTimestamp, and objectId - Rename tests to follow testXxx naming conventions from TESTING.md - Remove redundant testListEvents404Error (covered by 400 test) - Expand EventTest.deserialize_doesNotAffectOtherFields to assert all fields present in JSON and verify absent fields remain null Note: the all-response-body-properties WireMock fixture and the required-properties fixtures need to be updated in smartsheet-sdk-tests to match the new EXPECTED_* constants.
added 4 commits
May 28, 2026 14:38
…k fixtures - Fix copyright year 2026 → 2025 in TestListEvents and EventTest - Align expected constants with actual WireMock fixture data (correct event IDs, timestamps, objectTypes, sources, additionalDetails for all 5 events) - Fix WireMock mapping paths: non-existent all-response-body-properties replaced with required-response-body-properties-no-more-available - Use Map.<String, Object>of() type witness for additionalDetails to satisfy Map<String, Object> parameter type - Skip eventTimestamp in recursive comparison (timezone-sensitive Date construction); assert isNotNull() per event instead - Replace individual query param key checks with whole-map Map<String, List<String>> assertion per TESTING.md full-object assertion requirements - Expand EventTest.deserialize_doesNotAffectOtherFields to assert all fields
…stEventsModel Relocate per reviewer feedback: unit tests for the Event model should live in an events subfolder and be named after the endpoint being tested.
Correct the previous misdirected refactor — TestListEvents.java belongs in sdktest/events/ (matching the reports/ pattern), not EventTest.java. Also restores EventTest.java to com.smartsheet.api.models.
…ures Update TestListEvents to match the new all-response-body-properties and required-response-body-properties fixture structure. Replace the two constants (shared events + moreAvailable variants) with dedicated constant sets per fixture. Drop testListEventsMoreAvailableNavigation in favour of testListEventsRequiredResponseBodyProperties.
ggoranov-smar
requested changes
May 28, 2026
…l assertions Now that fixture timestamps and expected constants are aligned, the full recursive comparison works correctly without excluding eventTimestamp.
ggoranov-smar
approved these changes
May 28, 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
objectIdStrto theEventclass to support the alphanumeric object identifier returned by the Audit 2.0 events endpoint. The existingobjectIdfield remains unchanged — this is a purely additive, backward-compatible change.Changes
private String objectIdStrfield toEvent.javagetObjectIdStr()andsetObjectIdStr()with full Javadoc including@returnthis)[x.x.x] - unreleasedTests
EventTestcovering Jackson deserialization with the field present, absent, and explicitly null, plus builder pattern chaininglistEvents.jsonfixture to includeobjectIdStron one event and omit it on the other, exercising both code pathsobjectIdStrassertions to both happy-path tests inEventResourcesImplTestTestListEventsWireMock contract tests coveringobjectIdStrdeserialization, pagination flags, and 404 error handlingHow to test