chore: added API validation for numeric values#826
Merged
chrisburr merged 12 commits intoDIRACGrid:mainfrom Mar 20, 2026
Merged
chore: added API validation for numeric values#826chrisburr merged 12 commits intoDIRACGrid:mainfrom
chrisburr merged 12 commits intoDIRACGrid:mainfrom
Conversation
aldbr
reviewed
Mar 17, 2026
Contributor
aldbr
left a comment
There was a problem hiding this comment.
Thanks @Stellatsuu!
About the client generation, are you using the same version locally than the one in the CI? (normally yes, but worth checking)
Member
|
This works as expected for me with changes needing to be pushed. Can you show the output of: git status
git show
pixi run -e diracx-generate-client generate-client
pixi run -e gubbins-generate-client generate-client |
49bfbfe to
b073714
Compare
Contributor
Author
Branch is rebased on main :
|
Contributor
|
Looks like you solved your issue! What did you do? |
Contributor
Author
|
I had issues with my pixi, it is ready now |
chrisburr
approved these changes
Mar 20, 2026
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.

Closes: #506
Changes:
per_pagequery value/jobs/searchpagequery value of/jobs/searchComments:
I can't reproduce this error from the issue, I think it has been fixed somewhere else:
I don't really see other cases here for numeric values. Most numeric values are
job_idsthat are stored in DB and can't be validated from the FastAPI schemas, same for thepagemax value that can't be validated since it's based on DB, anyways, apagevalue out of bound will return a 416 error = no jobs found at thispagevalue (might be why I can't reproduce the error above).As for strings values, I did not find any relevant cases, most relevant ones does already have a validation (such as
max_lengthandregex)