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
Is your feature request related to a problem? Please describe.
As discovered in ory/sdk#189 (comment), there is a use case when using OpenAPI to generate a package with the intention to publish to https://hex.pm, and publishing documentation to https://hexdocs.pm - openapi-generator graciously generates moduledocs and function documents (as seen in the sample
) but if we user wishes to publish this generated package, the ex_docs dependency is missing.
Describe the solution you'd like
This is open to interpretation, but I see two ways to solve this.
The first being just adding ex_doc as a default dependency to the deps list, so all packages are generated with ex_doc as a dependency. The pros being this is a one-line change, the cons being every generated package may have a non-needed dependency if they aren't publishing documentation.
The more involved alternative is to expose a way to add additional dependencies via the configuration, so that deps can be dynamically configured, with the added benefit of consumers able to update dependencies without specifying their own template, or waiting for changes to land upstream.
Describe alternatives you've considered
As mentioned, we could just provide our own mix.exs.mustache template, but the downsides are quite large, with missing out upstream changes to the template, and introducing brittleness when upgrading openapi-generator, the developer(s) must also update their template if there have been any changes.
Additional context
Mentioned above, with adding Elixir client support to Ory's SDKs.
The text was updated successfully, but these errors were encountered:
The first being just adding ex_doc as a default dependency to the deps list, so all packages are generated with ex_doc as a dependency. The pros being this is a one-line change, the cons being every generated package may have a non-needed dependency if they aren't publishing documentation.
I suggested we go with this approach to start with. Users can always customize the template to remove the dependencies that they don't need.
Is your feature request related to a problem? Please describe.
As discovered in ory/sdk#189 (comment), there is a use case when using OpenAPI to generate a package with the intention to publish to https://hex.pm, and publishing documentation to https://hexdocs.pm - openapi-generator graciously generates moduledocs and function documents (as seen in the sample
openapi-generator/samples/client/petstore/elixir/lib/openapi_petstore/connection.ex
Line 6 in 0204bf4
ex_docs
dependency is missing.Describe the solution you'd like
This is open to interpretation, but I see two ways to solve this.
The first being just adding ex_doc as a default dependency to the
deps
list, so all packages are generated with ex_doc as a dependency. The pros being this is a one-line change, the cons being every generated package may have a non-needed dependency if they aren't publishing documentation.The more involved alternative is to expose a way to add additional dependencies via the configuration, so that deps can be dynamically configured, with the added benefit of consumers able to update dependencies without specifying their own template, or waiting for changes to land upstream.
Describe alternatives you've considered
As mentioned, we could just provide our own
mix.exs.mustache
template, but the downsides are quite large, with missing out upstream changes to the template, and introducing brittleness when upgrading openapi-generator, the developer(s) must also update their template if there have been any changes.Additional context
Mentioned above, with adding Elixir client support to Ory's SDKs.
The text was updated successfully, but these errors were encountered: