-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated Elixir module names clash #229
Comments
I have created this upstream PR to Openapi-generator
I might transform the changes, or do a complete rewrite of the generator into a custom generator for this project if the pain pressure gets too high, as i'm planning to use all apis from elixir in a self-deployed setup. |
Awesome, thank you so much for your work @paulbalomiri :) Please let me know how it goes :) |
I have some personal urgency until thursday. In the meantime i'll find out whether this will be a custom generator or i can formulate an upstream PR to openapi-generator. |
Preflight checklist
Bug Description
Generated Elixir module names such as
Ory.Connection
clash. Elixir dependencies cannot override each other's Modules, but the generated code does contain the same module name in different dependencies:Examples:
sdk/clients/client/elixir/lib/ory/connection.ex
Line 5 in 2324e5c
sdk/clients/hydra/elixir/lib/ory/connection.ex
Line 5 in 2324e5c
sdk/clients/keto/elixir/lib/ory/connection.ex
Line 5 in 2324e5c
sdk/clients/oathkeeper/elixir/lib/ory/connection.ex
Line 5 in 2324e5c
sdk/clients/kratos/elixir/lib/ory/connection.ex
Line 5 in 2324e5c
sdk/clients/client/elixir/lib/ory/connection.ex
Line 5 in 2324e5c
This is a follwup to this comment #194 (comment)
Reproducing the bug
Create any library importing e.g. at least 2 packages:
Example snippet from
mix.exs
:Relevant log output
when building/running lots of warnings such as this one is logged:
Relevant configuration
Here is the Variable setting, to which I propose to add this line:
sdk/scripts/prep.sh
Line 85 in 2324e5c
And here the line 3 should be changed to
sdk/config/client/elixir.yml
Lines 1 to 3 in 2324e5c
This results in package names such as
Ory.Hydra.Connection
Version
latest stable versions
Additional Context
@aeneasr I'm putting here the questions I have for understanding & documentation, These are mostly issues to get the PR right.
I'll come back with a PR on this, I've already forked the sdk. The bug is easy to solve, but perhaps a followup documentation issue would benefit from those questions.
It's a rather long post, so feel free to only discuss in context of the upcoming PR.
The text was updated successfully, but these errors were encountered: