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
Invoking the API from the client using httptest server should work when this parameter is not specified in the request.
What did you see instead?
First, the client sends an empty string header for this parameter when it would be more efficient to omit the header since it's optional.
Second, the DecodeArray function on the server splits the string on commas, and then tries to decode the UUID using conv.ToUUID, which fails with invalid UUID length: 0 error.
There needs to be an explicit check on the server for an empty array, but the client should also avoid sending this header when it doesn't have a value.
The text was updated successfully, but these errors were encountered:
What version of ogen are you using?
github.com/ogen-go/ogen v1.0.1-0.20240415140940-8c1c10db7ff2
Can this issue be reproduced with the latest version?
Yes
What did you do?
I generated client and server code from the following UUID header parameter:
What did you expect to see?
Invoking the API from the client using
httptest
server should work when this parameter is not specified in the request.What did you see instead?
First, the client sends an empty string header for this parameter when it would be more efficient to omit the header since it's optional.
Second, the
DecodeArray
function on the server splits the string on commas, and then tries to decode the UUID usingconv.ToUUID
, which fails withinvalid UUID length: 0
error.There needs to be an explicit check on the server for an empty array, but the client should also avoid sending this header when it doesn't have a value.
The text was updated successfully, but these errors were encountered: