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
That's good to know, thanks! It makes sense for reproducibility.
The reason I still consider this a bug is that I would expect it to be impossible to input bad data for servers that satisfy a given OpenAPI spec. So given your comment that probably means this is a bug in the petstore server itself. I don't know where the code for the public petstore lives though.
Swagger/OpenAPI online validator failed to validate it.
My attempt to build go-server sample failed. But HTTPS comforted as online validator as generator.
Meaning no issue with
Bug Report Checklist
Description
The
rust-reqwest
client fails on the current contents ofpetstore.swagger.io
because ofnull
values in thetags
array of some pets.openapi-generator version
4.1.2-SNAPSHOT
OpenAPI declaration file content or url
See http://petstore.swagger.io/v2/swagger.json
Command line used for generation
docker run --rm -v ${PWD}:/local/out/rust/ openapitools/openapi-generator-cli generate \ -i http://petstore.swagger.io/v2/swagger.json \ -g rust -o /local/out/rust/generated \ --additional-properties packageName=petstore_client \ --library=reqwest
Steps to reproduce
find_pets_by_status
.Also, this is currently in the petstore api:
And this is the relevant spec section:
Related issues/PRs
No related issues found.
Suggest a fix
To get it working, I had to change this line in the
Pet
model:To this:
Although I don't know whether those nulls should have even been allowed in the first place.
The text was updated successfully, but these errors were encountered: