-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[CLI] Improvements for meta and list command #799
[CLI] Improvements for meta and list command #799
Conversation
* consider null case for g.getType() * skip a category when it is empty
Conflicts: bin/utils/ensure-up-to-date
@jmini what is the problem you're seeing that you're trying to resolve with this? If you're adding the UNDEFINED category for custom generators that return Also, I don't think the meta generator should default to A side note… while looking at the customization doc, I found that the last command before
(notice the output path and |
Also, directions in the README for this generator are incorrect. Would you mind changing them on your branch as well? openapi-generator/modules/openapi-generator/src/main/resources/codegen/README.mustache Line 49 in 3a5b223
Should match what I posted above:
Notice: entry class is incorrect, and example is missing |
I know, see my conversation on gitter yesterday with @pgnaleen. => I have planned doc fixing in an other PR.
I agree, but this is not something you can prevent... If we think about #137, I guess that this Maybe we should treat
My idea behind the change was:
I like the idea with the option. I need to figure out how we can add this.
Nice catch with the README template. Yes I can update it. |
@jmini I see your point about the null types, although I really think this is an edge case. Could we name it "UNSPECIFIED" or "UNTAGGED" instead. My concern is mainly that "UNDEFINED" looks like the CLI or the generator module are exposing a programming error. |
See #817 for the docs. |
Do not require openapi-generator to be installed in the local maven repository
samples/meta-codegen/lib/pom.xml
Outdated
@@ -116,7 +116,7 @@ | |||
</dependencies> | |||
<properties> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<openapi-generator-version>3.0.0-SNAPSHOT</openapi-generator-version> | |||
<openapi-generator-version>3.2.2-SNAPSHOT</openapi-generator-version> |
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.
I'll take note of this during the release process.
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.
lib/
is generated (output of the meta
command of the CLI). It is updated with ensure-up-to-date.
WIP: not all the changes requested here, are implemented. |
fixes_for_meta_and_list_command # Conflicts: # modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java
Everything is implemented, this PR is ready for review. |
I will merge this later today if nobody else wants to comment. |
PR checklist
./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\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
To reproduce:
Create a
my-codegen-openapi-generator
artefact using themeta
command as described here:https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md#creating-a-new-template
Change 1/: If you create a generator that have no type (
CLIENT
,SERVER
,DOCUMENTATION
,CONFIG
,OTHER
) it should be displayed when you run the command:(classpath in the windows format, for linux or Mac replace the
;
with a:
)The change introduces the category
UNDIFINED
for this case.It also skip a category if not generator is present for it.
Change 2/: the meta command is now from type
OTHER
:Example
MyCodegenGenerator
:Change 3/: meta script is added to ensure-up-to-date