Skip to content

Conversation

@jwilkinson87
Copy link
Contributor

This pull request introduces a new computed property to the FormSubmissionVersion class that exposes the payload as a raw JSON string, and adds corresponding tests to verify its correctness. The main goal is to make it easier to access the payload in its serialized form for downstream use or debugging.

Feature addition

  • Added a computed property rawPayload to the FormSubmissionVersion class, which serializes the payload field to a JSON string using the shared Jackson ObjectMapper. This property handles serialization errors gracefully by returning null if serialization fails. (src/main/kotlin/com/ctrlhub/core/datacapture/resource/FormSubmissionVersion.kt)

Test coverage

  • Extended tests in FormSubmissionVersionsRouterTest to verify that rawPayload is a valid JSON string, starts and ends with curly braces, and contains the expected keys, ensuring the new property works as intended. (src/test/kotlin/com/ctrlhub/core/datacapture/FormSubmissionVersionsRouterTest.kt) [1] [2]

@github-actions
Copy link

There is a problem with the Gemini CLI PR review. Please check the action logs for details.

@jwilkinson87 jwilkinson87 merged commit 49ecf44 into main Oct 21, 2025
2 of 3 checks passed
@jwilkinson87 jwilkinson87 deleted the feat/support-form-version-resources branch October 21, 2025 12:53
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.

3 participants