Skip to content
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

Rename "language" to "generator-name" in cli and maven-plugin #39

Closed
jmini opened this issue May 14, 2018 · 9 comments
Closed

Rename "language" to "generator-name" in cli and maven-plugin #39

jmini opened this issue May 14, 2018 · 9 comments
Assignees
Milestone

Comments

@jmini
Copy link
Member

jmini commented May 14, 2018

On the long term we might want to offer an other way to select the targeted generator.

Probably with multiple switches (to be defined more precisely):

  • language
  • generator type
  • framework
  • ...

Examples:

cli -type=client -language=kotlin
cli -type=server -language=kotlin -framework=ktor

A first move that we could do now with our first release is to rename the term “language” with “generator-name“ in the maven Plugin and in the CLI.

We might support them both options for backward compatibility, but with a warning explaining that “generator-name“ should be preferred.

What are the opinions?

cc: @jimschubert

@jimschubert
Copy link
Member

I agree with supporting both but showing a deprecation message on language. I would suggest erroring if both are set to avoid potential issues. I'd also suggest clearly defining the removal timeline (maybe by version 3.1).

Additionally, while we deprecate the language option, we could also provide a mapping of the generator renames. This would allow users to almost seamlessly upgrade, and the CLI would notify of the necessary changes for subsequent releases.

@jimschubert
Copy link
Member

And to the split of options, I fully agree with this. I haven't yet made such a change, because I'd consider this too much of a breaking change to include in the 3.0.0 release. We'll probably want to target this for 4.0.0.

@jmini
Copy link
Member Author

jmini commented May 14, 2018

Thank you for this feedback, I like all theses suggestions.

One might be more complicated:

I'd also suggest clearly defining the removal timeline (maybe by version 3.1).

I am not sure if we have a release roadmap/timeline by now...

@jimschubert
Copy link
Member

Even without a roadmap, I think we can explicitly say "we will remove this in the next minor release". I think my use of "timeline" to refer to the minor release was confusing. My point was that we shouldn't randomly remove it in a build revision (e.g. 3.0.22), as things like this catch people off guard.

@jimschubert
Copy link
Member

Oh, I see what you were saying about removing language. If we were to move to type, language and framework then we couldn't actually remove language?

It's likely that we'd want to go through a full major release with generator-name before reusing language for the actual language name.

jimschubert added a commit to jimschubert/openapi-generator that referenced this issue May 16, 2018
The language option (--lang and -l in CLI, language in maven plugin) has
drifted from the original intention of defining a top-level language
implementation with variance on library. Generators began to encode
generator type into language (e.g. erlang-client), reused language as
framework-only (e.g. scalatra), or embedded language and framework (e.g.
typescript-angular).

With the 3.0.0 release of openapi-generator, we've moved to a
standardization of these names, which means they no longer fit into the
singular concept of a "language".

We've discussed plans to provide a better user experience around the
CLI, breaking apart the generator lookup into the variations that make
up a generator:

* language
* type
* framework
* version?

To do this, we must first deprecate language and warn users that what
they're currently using (e.g. scalatra, typescript-angular) is being
replaced by generatorName and that language may mean something else in a
later version of the generator.

For discussion, see OpenAPITools#39.
@jimschubert
Copy link
Member

@jmini I've opened #57 with the intro of generator-name and deprecation of 'language' as a CLI and Maven Plugin option. I think this is a code quality thing that should make it into the 3.0.0 release so that the deprecation can exist for an entire major release.

I've just thought of a question about the implementation. I'll add it there.

@jmini
Copy link
Member Author

jmini commented May 16, 2018

Thank you a lot for opening the PR, and yes it should be part of our first 3.0.0 release.

@jimschubert
Copy link
Member

@jmini #57 was merged. Do you still want to keep this issue open for the discussion about breaking things down to language/type/framework?

@jmini
Copy link
Member Author

jmini commented May 23, 2018

No I think we should close this one as solved with version 3.0.0, and continue with #137.

@jmini jmini closed this as completed May 23, 2018
@ackintosh ackintosh mentioned this issue Dec 1, 2018
4 tasks
aserkes added a commit to aserkes/openapi-generator that referenced this issue Aug 19, 2022
Signed-off-by: aserkes <andrii.serkes@oracle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants