FINERACT-2735: Validate datatables order input on actual columns - #6230
Open
terencemo wants to merge 1 commit into
Open
FINERACT-2735: Validate datatables order input on actual columns#6230terencemo wants to merge 1 commit into
terencemo wants to merge 1 commit into
Conversation
terencemo
force-pushed
the
i2735-datatables-validation
branch
from
August 5, 2026 15:39
1a762e0 to
a3401d5
Compare
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.
Description
Adds validation for the
orderquery parameter on the datatables read endpoints (GET /datatables/{datatable}/{apptableId},GET /datatables/{datatable}/{apptableId}/{datatableId}), aligning with the existing convention already used on the offices endpoint.What changed
ordermust reference a single column that exists on the target datatable, verified against the table's resolved column metadata.ASC/DESCdirection may follow the column name (case-insensitive).ordervalues are now rejected with a clear validation error instead of being passed through.Why
Aligns datatables sorting with the simpler convention already used elsewhere, improves input validation, and removes ambiguity in how space-containing column names were interpreted.
Testing
DatatableUtilTest: valid bare/quoted columns, direction handling, and rejection of unknown columns, malformed quoting, and multi-column input.DatatableIntegrationTest(validateOrderParameterOnDatatableEntryRead,validateOrderParameterOnDatatableManyEntryRead) covering both the single-entry and one-to-many entry-read endpoints end-to-end..Compatibility
Single-column, unquoted, no-space
ordervalues continue to work unchanged. Multi-column ordering or unquoted space-containing column names now require the quoting convention above.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.