wolfadex / elm-open-api-cli

A CLI tool for generating Elm modules from Open API specs.
https://www.npmjs.com/package/elm-open-api
25 stars 6 forks source link

Function names #112

Closed miniBill closed 3 months ago

miniBill commented 3 months ago

We currently have: name - Cmd nameTask - Task nameBackendTask - BackendTask nameEffect - Command (lamdera/program-test)

And all the risky variants. If we add avh/elm-program-test this is probably going to become unwieldy.

Proposal: multiple modules. If there is a single package just use Cmd/Task in Module.Api If there are multiple packages just use Cmd/Task in Module.Api.Package

So, current users are unaffected, and users with multiple types will get things like:

Github.Api.ElmHttp.getStarsTask Github.Api.Avh4ElmProgramTest.getStarsTask

Instead of having to invent a new suffix for each package and type combination.

wolfadex commented 3 months ago

This is definitely worth it I think. Especially that it doesn't change anything for basic users.