Skip to content

[REQ] Specify ExDoc dependency for Elixir #12484

@tobbbles

Description

@tobbbles

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions