fix: update form schema hydration to hydrate via the JSON API library… #20
  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.
  
    
  
    
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:
FormSchemadata class to use explicit fields (model,view,version, etc.) and generate therawSchemaJSONAPI 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)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:
JsonConfigobject to provide a properly configured JacksonObjectMapperwith support for Kotlin and Java time types. (src/main/kotlin/com/ctrlhub/core/json/JsonConfig.kt, src/main/kotlin/com/ctrlhub/core/json/JsonConfig.ktR1-R24)Routerto use the sharedJsonConfig.getMapper()instead of duplicating Jackson configuration logic. (src/main/kotlin/com/ctrlhub/core/router/Router.kt, src/main/kotlin/com/ctrlhub/core/router/Router.ktL148-R138)Testing and validation:
FormSchemaRawSchemaTest) to verify that the generatedrawSchemamatches the expected JSONAPI envelope structure for form schemas. (src/test/kotlin/com/ctrlhub/core/datacapture/FormSchemaRawSchemaTest.kt, src/test/kotlin/com/ctrlhub/core/datacapture/FormSchemaRawSchemaTest.ktR1-R46)src/test/resources/datacapture/form-schema-sample.json, src/test/resources/datacapture/form-schema-sample.jsonR1-R59)