Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/jaxrs-cxf-cdi-petstore-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true $@"
ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi -DhideGenerationTimestamp=true $@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this bug. I should have used a regex back to ags. At least it exposed the Langs exit code issue.


java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@XmlType(name="{{datatypeWithEnum}}")
@XmlEnum({{dataType}}.class)
public enum {{datatypeWithEnum}} {
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {

{{#allowableValues}}
{{#enumVars}}@XmlEnumValue({{{value}}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}
Expand All @@ -9,7 +9,7 @@ public enum {{datatypeWithEnum}} {

private {{dataType}} value;

{{datatypeWithEnum}} ({{dataType}} v) {
{{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{dataType}} v) {
value = v;
}

Expand All @@ -22,7 +22,7 @@ public enum {{datatypeWithEnum}} {
return String.valueOf(value);
}

public static {{datatypeWithEnum}} fromValue(String v) {
public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String v) {
for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) {
if (String.valueOf(b.value).equals(v)) {
return b;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;

{{>enumClass}}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import javax.validation.constraints.*;
/**
* {{description}}
**/{{/description}}
{{#isEnum}}{{>enumClass}}{{/isEnum}}
{{#isEnum}}{{>enumOuterClass}}{{/isEnum}}
{{^isEnum}}{{>pojo}}{{/isEnum}}
{{/model}}
{{/models}}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum StatusEnum {

private String value;

StatusEnum (String v) {
StatusEnum(String v) {
value = v;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public enum StatusEnum {

private String value;

StatusEnum (String v) {
StatusEnum(String v) {
value = v;
}

Expand Down