Skip to content

Commit

Permalink
Merge pull request #1971 from andreaTP/cli-release-ci
Browse files Browse the repository at this point in the history
Add an option to generate a GH action workflow to generate clients from the spec
  • Loading branch information
EricWittmann committed Aug 18, 2022
2 parents dbaed6a + e83d52a commit 712da99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1478,13 +1478,15 @@ private String generateAndPublish(CodegenProject project, OpenApi2JaxRs generato
private JaxRsProjectSettings toJaxRsSettings(CodegenProject project) {
boolean codeOnly = "true".equals(project.getAttributes().get("codeOnly"));
boolean reactive = "true".equals(project.getAttributes().get("reactive"));
boolean generateCliCi = "true".equals(project.getAttributes().get("generateCliCi"));
String groupId = project.getAttributes().get("groupId");
String artifactId = project.getAttributes().get("artifactId");
String javaPackage = project.getAttributes().get("javaPackage");

JaxRsProjectSettings settings = new JaxRsProjectSettings();
settings.codeOnly = codeOnly;
settings.reactive = reactive;
settings.cliGenCI = generateCliCi;
settings.groupId = groupId != null ? groupId : "org.example.api";
settings.artifactId = artifactId != null ? artifactId : "generated-api";
settings.javaPackage = javaPackage != null ? javaPackage : "org.example.api";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ <h3 class="blank-slate-pf-main-action">Loading Wizard Data</h3>
<label for="jaxrs_reactive">Make the project Reactive (i.e. use CompletionStage&lt;T&gt; responses) </label>
</div>
</div>
<div class="form-group">
<div class="col-sm-2">&nbsp;</div>
<div class="col-sm-10">
<input name="generateCliCi" type="checkbox" id="jaxrs_generate_cli_ci" [(ngModel)]="model.projectData.generateCliCi">
<span>&nbsp;</span>
<label for="jaxrs_generate_cli_ci">Add a GH Action to generate and publish CLI code for multiple languages</label>
</div>
</div>
<div class="form-group" *ngIf="!model.projectData.codeOnly">
<label class="col-sm-2 control-label required" for="jaxrs_groupId">Group ID</label>
<div class="col-sm-10">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<!-- Other Apicurio Projects -->
<version.apicurio-data-models>1.1.26</version.apicurio-data-models>
<version.apicurio-registry>1.3.2.Final</version.apicurio-registry>
<version.apicurio-codegen>1.0.8.Final</version.apicurio-codegen>
<version.apicurio-codegen>1.0.11.Final</version.apicurio-codegen>

<!-- Apache Artemis Version -->
<version.apache-artemis>2.6.4</version.apache-artemis>
Expand Down

0 comments on commit 712da99

Please sign in to comment.