Skip to content

Conversation

@jwilkinson87
Copy link
Contributor

This pull request refactors how form schema data is handled and serialized in the codebase, moving from manual JSON parsing to a more robust, model-driven approach using Jackson and a custom JsonConfig. The changes improve maintainability, accuracy, and test coverage for form schema serialization and deserialization. The most important changes are grouped below by theme.

Form schema serialization and model changes:

  • Refactored the FormSchema data class to use explicit fields (model, view, version, etc.) and generate the rawSchema JSONAPI envelope dynamically using Jackson, replacing the previous manual string-based approach. (src/main/kotlin/com/ctrlhub/core/datacapture/response/FormSchema.kt, src/main/kotlin/com/ctrlhub/core/datacapture/response/FormSchema.ktR13-R50)
  • Removed manual JSON parsing and schema instantiation logic from FormSchemasRouter, replacing it with generic resource fetching methods (fetchPaginatedJsonApiResources, fetchJsonApiResource). (src/main/kotlin/com/ctrlhub/core/datacapture/FormSchemasRouter.kt, [1] [2]

Infrastructure and codebase improvements:

Testing and validation:

@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 2846cc5 into main Oct 23, 2025
2 of 3 checks passed
@jwilkinson87 jwilkinson87 deleted the fix/form-schema-hydration branch October 23, 2025 08:57
@sentry
Copy link

sentry bot commented Oct 23, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

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