-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[feat] Intro GeneratorMetadata (stability index) #2816
Conversation
GeneratorMetadata offers an immutable object created via Builder pattern which allows generators to explicitly define their stability (stable, beta, experimental, deprecated) as well as a message to be shown during generation. This is a step toward: * Fleshing out the "Core" artifact (#845) * Providing a place to encapsulate feature-oriented metadata (#840) * Providing a means to communicate end of life scheduling (#116) This new structure, specifically the Stability property, allows us to offer future enhancements such as allowing users to filter down to only "Stable" generators via CLI, and eventually any compat table (see #503).
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
Question: This creates some redundancy in the "list" CLI command, where some generators previously encoded the stability into the name of the generator:
I think this is fine for now, since machine parsing should be done via the |
cc @OpenAPITools/generator-core-team |
/** | ||
* Represents the "stability index" of a generator or feature, based on the stability indexes defined in the node.js ecosystem. | ||
*/ | ||
public enum Stability { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: We could apply Stability
to other things as well, such as the templating engine adapters.
* master: resize lightbow logo add lightbow logo add Lightbow as sponsor (#2822) [docs] Document new templating engine, adding ability to reference templates by file to comlete the example (#2773) [JAVA][KOTLIN] fix var Naming for all uppercase with Numbers (#2794) [Documentation] Add instructions to build the javascript client module (#2806) use mvn instead of run-in-docker (#2821) Better handling of form data (#2818) [haskell-servant] Add some missing types to the generated modules (#2675) Clarifies need to build project for sample output (#2819) [Elm] Bugfix .encode in modelTypeDiscriminator (#2807) Apply strict spec option to CodegenConfig instance (#2814)
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{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\
.master
,. Default:3.4.x
,4.0.x
master
.Description of the PR
GeneratorMetadata offers an immutable object created via Builder pattern
which allows generators to explicitly define their stability (stable,
beta, experimental, deprecated) as well as a message to be shown during
generation.
This is a step toward:
This new structure, specifically the Stability property, allows us to
offer future enhancements such as allowing users to filter down to only
"Stable" generators via CLI, and eventually any compat table (see #503).
See project 5 for other potentially related work.
This is an addition to what was introduced for the C# 2.0 generator in #2804. I had opened #2786, not realizing that the generator hadn't been deprecated as discussed in #116. After consideration, I decided to have something typed which would explicitly define the generator as deprecated in code.
Example: