PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: Default: master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
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 #39 (closed).
Example usage of the maven plugin is explained in the commit message for e97736f3. You must first run mvn clean package install
to stage the 3.0.0-SNAPSHOT from this branch into your local repository. Then, navigate to modules/openapi-generator-maven-plugin/examples
and run:
mvn -f non-java.xml compile
This will create an aspnetcore generated example under target/generated-sources/
.
Warning messages introduced in this PR will look like (maven plugin output):
$ mvn -f non-java.xml compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sample-project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- openapi-generator-maven-plugin:3.0.0-SNAPSHOT:generate (default) @ sample-project ---
[WARNING] The 'language' option is deprecated and may reference language names only in the next major release (4.0). Please use 'generatorName' instead.
[WARNING] Output directory does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.