-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[cpp-pistache] add the option to fetch dependencies #495
[cpp-pistache] add the option to fetch dependencies #495
Conversation
|
||
protected boolean isAddExternalLibs = true; | ||
public static final String OPTIONAL_EXTERNAL_LIB = "addExternalLibs"; | ||
public static final String OPTIONL_EXTERNAL_LIB_DESC = "Add the Possibility to fetch and compile external Libraries needed by this Framework."; |
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.
typo 👎
@@ -43,7 +43,9 @@ | |||
|
|||
public class CppPistacheServerCodegen extends AbstractCppCodegen { | |||
protected String implFolder = "impl"; | |||
|
|||
protected boolean isAddExternalLibs = true; |
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.
@stkrwork
Should we make this default false
?
Normally when it is true
we can build it out of the box.
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.
@etherealjoy I suggest either merging it to 3.2.x (breaking changes without fallback) if defaults to true
or change the default to false if we want to merge this PR into current master.
@wing328
Just add this to the command line and you can build everything on the fly without any changes to your environment. |
@etherealjoy thanks. Can you please resolve the merge conflicts? Then I'll merge it into master. |
Merge remote-tracking branch 'remotes/upstream/master' into cpp-pistache-add-deps # Conflicts: # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java
@wing328 |
@Override | ||
public String getTypeDeclaration(String str) { | ||
return toModelName(str); | ||
} | ||
|
||
/** | ||
* specify whether external libraries will be added during the generation |
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.
@etherealjoy I think you will need to add a proper docstring for the parameter "value" to address the following error reported by the CI:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (attach-javadocs) on project openapi-generator: MavenReportException: Error while generating Javadoc: Project contains Javadoc Warnings -> [Help 1]
[ERROR]
@etherealjoy thanks. The PR has been merged into master. |
@etherealjoy You wrote above that the addExternalLibs default is false but when have a look to the generator config-help for cpp-pistache-server I see :
Is it only a documentation issue ? |
It was false in 3.1.x. In 3.2.0 (current master), we've enabled it as the default (and mark that as a breaking change) |
Ah ok, I missed that. |
* Add the Possibility to fetch dependencies needed by the generated code * Fix typo * Make External Libraries default to false * Add parameter string to the javadoc 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.1.x
,4.0.x
. Default:master
.Description of the PR
Add External Libraries as downloaded projects to compile the code
Add generation of petstore without recompiling the jar
@stkrwork @MartinDelille
produces