Transfer create response model to dict error
fedeq opened this issue · 9 comments
Accessing response attributes result in the following error:
I tried with versions plaid-python 12.0.0
and 11.6.0
Request ID: 3lMK0dXo7ZUH968
Similar as #398
@fedeq thank you for the report! Here's what I've figured out so far:
If this is the same issue as #398, it should be fixed by updating the python client library to use version 5.4.0 of the OpenAPI generator. (We currently use version 5.1.1.)
Unfortunately, the library fails to build using any version of the OpenAPI generator past 5.3.0, and it fails with the following super-helpful error message starting in version 5.3.1:
Exception: null
at org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1175)
at org.openapitools.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:1069)
at org.openapitools.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:566)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:907)
at org.openapitools.codegen.cmd.Generate.execute(Generate.java:441)
at org.openapitools.codegen.cmd.OpenApiGeneratorCommand.run(OpenApiGeneratorCommand.java:32)
at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:66)
Caused by: java.lang.NullPointerException
at org.openapitools.codegen.languages.PythonClientCodegen.fromProperty(PythonClientCodegen.java:440)
at org.openapitools.codegen.DefaultCodegen.getContent(DefaultCodegen.java:6728)
at org.openapitools.codegen.DefaultCodegen.fromRequestBody(DefaultCodegen.java:6756)
at org.openapitools.codegen.languages.PythonClientCodegen.fromRequestBody(PythonClientCodegen.java:504)
at org.openapitools.codegen.DefaultCodegen.fromOperation(DefaultCodegen.java:4095)
at org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1143)
... 6 more
I'm honestly a little bit at a loss to debug this, since the only potential cause I could find on Googling was an invalid schema, but the schema successfully passes the validator at https://apitools.dev/swagger-parser/online/. I'll try opening a ticket with the OpenAPI-generator folks and see if I can make any progress that way.
Here's the ticket filed against OpenAPI-generator: OpenAPITools/openapi-generator#15181
@fedeq ok, I confirmed that upgrading to openapi generator 6.x on our end is necessary to fix this, however as we're currently using openapi generator 5.x that's a breaking upgrade so we'd need to do some migration work to make it happen. How big of an issue is this for you / are you currently able to work around it?
@phoenixy1 Thanks for the quick reply! I couldn't find a workaround to make this work, and we need to read the response in order to store the transfer information.
OK, we're going to take a stab at using openapi generator 6.x for next week's python client library release. if all goes well and the migration path turns out to be straightforward, we should have a fix for this issue then. If all does not go well, we'll follow up from there.
@fedeq we were able to generate a version of the python client library using the 6.1 generator and it appears to work OK and passes the test suite! We plan to release it later this week (probably on Tuesday), so give it a shot and let us know if it works out.
@phoenixy1 Is the release still planned for this week? Thanks!
@fedeq yes, we just released it on Friday! Let us know whether it solves the problem for you.
@phoenixy1 It's working 🎉. Thank you!
Closing the issue