Closed aeneasr closed 1 year ago
The issue is related to the python SDK generation seemingly being broken. https://github.com/OpenAPITools/openapi-generator/issues/12590 describes the problem we are having.
Does 6.2.1 also have this problem?
Does 6.2.1 also have this problem?
For some reason, that has even more errors (35 error in 110.86 second
)
Not sure what's going on with the generators there. Apparently, they are planning on releasing a completely reworked python generator soon, but no ETA yet.
The same errors are present on 5.4.0 btw. I'll investigate a bit more tomorrow.
ok, maybe we can then work around this by fixing NullBool somehow
in 6.2.1 the experimental one is the default one, which is why this is probably failing with so many errors. try using python-prior
generator with 6.2.1 - that is the original generator. maybe it has the problem fixed
That has the same 7 errors.
test/test_login_request.py:16: in <module>
from ory_client.model.o_auth2_client import OAuth2Client
E File "/project/clients/client/python/ory_client/model/o_auth2_client.py", line 38
E globals()['from ory_client.model.null_duration import NullDuration'] = from ory_client.model.null_duration import NullDuration
E ^
E SyntaxError: invalid syntax
It seems, that the generator, for some reason, does not remove the ory_client.model.null_duration import
from NullDuration
.
I think I figured out what the issue is, so I am documenting my findings here:
The client API spec contains two models called OAuth2Client
(one capitalized and one not):
oAuth2Client
comes from the Hydra spec and is generated directly from the Go comments. See v0.3.0.json#L2808OAuth2Client
comes from the Kratos spec and is generated by using hydra-client-go
s OAuth2Client, which does not have any swagger annotations, but it's referred to by a model it is generated from the generated client code (generation-ception so to speak). See v0.3.0.json#L242I hope the fix is to use Open API patches to turn the "uppercase" one into kratosOAuth2Client
in the Kratos repository so that they don't clash anymore. See https://github.com/ory/kratos/pull/2902
This is now fixed in the network repository, but we need an updated spec (presumably a v0.3.1
) for this to be available in this repository.
v1.0.0 released fine - closing
Preflight checklist
Describe the bug
https://app.circleci.com/pipelines/github/ory/sdk/1223/workflows/63eddfc6-ac77-4411-80b0-cc980aed0c1a/jobs/1128
Reproducing the bug
See above
Relevant log output
No response
Relevant configuration
No response
Version
master
On which operating system are you observing this issue?
No response
In which environment are you deploying?
No response
Additional Context
Maybe updating to openapi 6.2.1 solves the problem?