Skip to content

Conversation

@jwilkinson87
Copy link
Contributor

This pull request significantly enhances the data capture module by adding flexible support for JSON:API includes and request parameterization for form submission version endpoints, improving resource hydration, and expanding test coverage. It introduces new overloads for listing and fetching submission versions, updates resource models for richer relationships, and adds HTTP client timeouts for improved reliability.

API and Model Enhancements:

  • Introduced FormSubmissionVersionIncludes enum and FormSubmissionVersionRequestParameters class to enable JSON:API includes and flexible request parameters for form submission version endpoints, allowing clients to specify related resources to hydrate. (FormSubmissionVersionsRouter.kt)
  • Added new overloads to the FormSubmissionVersionsRouter for listing and fetching submission versions by different path patterns (with or without form id, and organisation-wide), each supporting includes and pagination. (FormSubmissionVersionsRouter.kt)
  • Updated the FormSubmissionVersion model from a data class to a regular class, adding new relationship fields for author, form, payloadImages, payloadOperations, payloadProperties, and payloadUsers, as well as a meta property for metadata. (FormSubmissionVersion.kt) [1] [2]

Resource Model Improvements:

  • Refactored the Image model from a data class to a class, added support for meta information (including image links and creation date), and introduced new related classes (ImageDimensions, ImageLink, ImageMeta) for richer image metadata handling. (Image.kt)
  • Updated import statements to include new resource types required for hydration and relationships. (FormSubmissionVersion.kt, FormSubmissionVersionsRouter.kt) [1] [2]

Infrastructure and Testing:

  • Added HTTP timeout configuration (request, connect, socket) to the Ktor HTTP client for more robust network operations. (KtorClientFactory.kt) [1] [2]
  • Expanded test coverage with new tests for the submission-only path overloads of the form submission versions endpoints, ensuring hydration and correct behavior. (FormSubmissionVersionsRouterTest.kt)

@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 e1225e0 into main Oct 13, 2025
2 checks passed
@jwilkinson87 jwilkinson87 deleted the feat/expand-form-submission-version-support branch October 13, 2025 09:43
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