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
@BaptisteSaves thank you for reporting this
I fixed it by ensuring that schemas are written after their dependent schemas and enforcing that when $refs are used in deeper inline schemas.
Just now I released the fix in v3.3.1 in docker hub
Bug Report Checklist
Description
When using the generated client from the following yaml, I got an error in file
paginated_result_tax_collection_dto.py
that the class is not defined.NameError: name 'ResultsTupleInput' is not defined
If we check the file
paginated_result_tax_collection_dto.py
, we can see theResultTuple
class is declared after its useopenapi-json-schema-generator version
3.3.0
OpenAPI declaration file content or url
The original yaml was generated by FastAPI
Generation Details
Generated through docker:
docker run --rm -v ./:/local openapijsonschematools/openapi-json-schema-generator-cli:3.3.0 generate -i /local/my-service.yml -g python -o /local/out
Steps to reproduce
Generate the client, import it and try to call the api, the code does not start
Suggest a fix
The class is actually defined, it seems the order is the problem
The text was updated successfully, but these errors were encountered: