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
I'm not sure if nulls should be allowed in arrays and the client is wrong, or if they shouldn't and the server is wrong. I see this issue which makes me think null values being allowed wasn't intended to be the default.
To get it working, I had to change this line in the Pet model:
Steps to Reproduce
1. Generate the rust-reqwest based client
2. Use it to call
find_pets_by_status
against petstore.swagger.io3. See error with null tags
Background
I generated the rust-reqwest based client and tried to do a
find_pets_by_status
operation, but I got this error:Sure enough, when I hit the API directly I see that there are
null
values in thetags
arrays for some pets:The spec that I generated this client from doesn't say anything about nulls being allowed:
The spec doesn't mention
null
at all:I'm not sure if nulls should be allowed in arrays and the client is wrong, or if they shouldn't and the server is wrong. I see this issue which makes me think null values being allowed wasn't intended to be the default.
To get it working, I had to change this line in the
Pet
model:To this:
Thanks for your work on this project! Let me know if there's a better place I should file this.
The text was updated successfully, but these errors were encountered: