java-client icon indicating copy to clipboard operation
java-client copied to clipboard

Validate inputs not validated on the server

Open bevzzz opened this issue 7 months ago • 0 comments

Should we validate the page size to be >=1?

Originally posted by @salvatore-campagna-weaviate in https://github.com/weaviate/java-client/pull/399#discussion_r2179468062

For the large part, client6 relies on server-side validation for request parameters to avoid duplicating the logic. Similarly, validating things like connection parameters is often redundant, since our HTTP and gRPC client libraries will catch and report that.

There's a third type of inputs, specific to the client's behavior, which we should validate. In the example above, page size (while validated server-side) may be used to pre-allocate an array or similar and must, in this case, be >= 1.

bevzzz avatar Jul 04 '25 11:07 bevzzz