You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RegisteredLimit does not allow a defaultLimit of 0 #3866
I have grepped over this repo and it appears that defaultLimit might actually be the only field in the entire API which 1) is of the type int 2) is required: true and 3) were upstream accepts a 0 as a valid value.
So how do we even approach this? Add a new Go struct tag for this case? e.g. numericZeroAllowed: true?
The param.go is quite old and I'm unsure the reason for skipping the zero-value when required. This surfaces some incompatibility with the expected result. I would say that we can:
Change the params.go to accept zero values
Add the pointer, remove the required tag and let the API enforce.
I personally prefer the option 1. Adding a new tag may work, but IMHO we would be putting a plaster on the real problem.
Activity
gndrmnn commentedon Jul 28, 2026
I have grepped over this repo and it appears that
defaultLimitmight actually be the only field in the entire API which 1) is of the typeint2) isrequired: trueand 3) were upstream accepts a0as a valid value.So how do we even approach this? Add a new Go struct tag for this case? e.g.
numericZeroAllowed: true?winiciusallan commentedon Jul 28, 2026
The
param.gois quite old and I'm unsure the reason for skipping the zero-value when required. This surfaces some incompatibility with the expected result. I would say that we can:I personally prefer the option 1. Adding a new tag may work, but IMHO we would be putting a plaster on the real problem.