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
,./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\
. -
Filed the PR against the correct branch: master
,. Default:3.4.x
,4.0.x
master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
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:
- Fleshing out the "Core" artifact (#845)
- Providing a place to encapsulate feature-oriented metadata (#840 (closed))
- 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).
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:
$ ./bin/csharp-dotnet2-petstore.sh
# START SCRIPT: ./bin/csharp-dotnet2-petstore.sh
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: csharp-dotnet2 (client)
[main] WARN o.o.codegen.DefaultGenerator - Generator 'csharp-dotnet2' is considered deprecated.
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.codegen.utils.ModelUtils - Multiple schemas found in content, returning only the first one
[main] WARN o.o.c.l.CSharpDotNet2ClientCodegen - Per Microsoft Product Lifecycle (https://support.microsoft.com/en-us/lifecycle/search?sort=PN&alpha=.NET%20Framework&Filter=FilterNO), support for .NET Framework 2.0 ended in 2011 so there may be security issues using the auto-generated C# 2.0 source code.