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
[Server] Boolean query parameters reject the capitalized spelling a hand-written client sends #1891
Every Optional<Boolean> query parameter on the native REST surface rejects True / False with a 400, although the OpenAPI spec types them boolean. Armeria converts a Boolean parameter through a fixed table of true|TRUE|1 and false|FALSE|0 (com.linecorp.armeria.internal.common.util.StringUtil.stringToBoolean), so a capitalized value never converts. AnnotatedValueResolver is in an internal package, so the conversion cannot be replaced globally.
Ten parameters are affected:
Endpoint
Parameter
DELETE /catalogs/{name}
force
DELETE /schemas/{full_name}
force
DELETE /functions/{name}
force
DELETE /models/{full_name}
force
DELETE /credentials/{name}
force
DELETE /external-locations/{name}
force
GET /volumes (both list handlers)
include_browse
GET /tables
omit_properties, omit_columns
force is the one that matters: it is acted on, it decides whether a delete cascades, and a caller who spells it True gets a 400 instead of the delete they asked for.
400 {"error_code":"INVALID_ARGUMENT","message":"Can't convert 'True' to type 'Boolean'."}
The same request with force=true (or force=1) is accepted.
Measured the same way for include_browse, omit_properties and omit_columns: 400 on True, 200 on true.
True is what a hand-written Python client sends -- requests.delete(url, params={"force": True}) renders the query as force=True. The generated Python client in this repo is not affected, because its parameters_to_url_query lowercases booleans, so this reaches scripts written directly against the REST API.
Expected behavior
A parameter the spec types boolean accepts true and false without regard to case. The values Armeria already converts, 1 and 0 included, keep working, so the accepted set only grows and no existing caller changes.
System
Server built from main (0.7.0-SNAPSHOT), macOS, JDK 17.
Additional context
The same defect on the Iceberg REST surface (purgeRequested on dropTable) is fixed in #1890, where it also stops pyiceberg's drop_table and purge_table from working at all. That PR validates the value as a String in the one handler it touches; doing the same for ten parameters wants one shared helper rather than ten copies, which is why this is filed separately. I am happy to send that patch.
Closing as working as intended, per the discussion on #1897: all.yaml is the contract for this
surface and types these parameters as boolean, which is true/false. True is a client
serializing a Python bool with str(), and accepting it would add an input the spec does not
describe -- permanently, and in a form OpenAPI cannot express -- while hiding the client-side bug
until it meets a spec-conformant validator. The generated clients in this repo already send true/false.
The same defect on the Iceberg REST surface stays fixed in #1890, where the spelling comes from
pyiceberg itself and the contract being met is the Iceberg REST spec rather than ours.
Activity
moomindani commentedon Sep 21, 2026
Closing as working as intended, per the discussion on #1897:
all.yamlis the contract for thissurface and types these parameters as
boolean, which istrue/false.Trueis a clientserializing a Python
boolwithstr(), and accepting it would add an input the spec does notdescribe -- permanently, and in a form OpenAPI cannot express -- while hiding the client-side bug
until it meets a spec-conformant validator. The generated clients in this repo already send
true/false.The same defect on the Iceberg REST surface stays fixed in #1890, where the spelling comes from
pyiceberg itself and the contract being met is the Iceberg REST spec rather than ours.