Skip to content

Commit c1825b4

Browse files
authored
use html-escaped description for C# (client, server), Java server (#6061)
1 parent 9c56bb6 commit c1825b4

26 files changed

+94
-55
lines changed

bin/java-petstore-all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
./bin/java-petstore-retrofit2-play24.sh
1515
./bin/java-petstore-jersey2-java6.sh
1616
./bin/java-petstore-resttemplate.sh
17+
./bin/java-petstore-resttemplate-withxml.sh
1718
./bin/java-petstore-resteasy.sh

bin/java-petstore-resttemplate-withxml.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi
2626

2727
# if you've executed sbt assembly previously it will use that instead.
2828
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
29-
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml -DhideGenerationTimestamp=true,withXml=true"
29+
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml --artifact-id swagger-pestore-resttemplate-withxml -l java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml -DhideGenerationTimestamp=true,withXml=true"
3030

3131
echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main"
3232
rm -rf samples/client/petstore/java/resttemplate-withXml/src/main

modules/swagger-codegen/src/main/resources/Java/modelInnerEnum.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
2+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
33
*/
44
{{#gson}}
55
@JsonAdapter({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.Adapter.class)

modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo.mustache

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
1414
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/vars}}
1515

1616
{{#vars}}
17-
/**{{#description}}
18-
* {{{description}}}{{/description}}{{#minimum}}
19-
* minimum: {{minimum}}{{/minimum}}{{#maximum}}
20-
* maximum: {{maximum}}{{/maximum}}
17+
/**
18+
{{#description}}
19+
* {{description}}
20+
{{/description}}
21+
{{#minimum}}
22+
* minimum: {{minimum}}
23+
{{/minimum}}
24+
{{#maximum}}
25+
* maximum: {{maximum}}
26+
{{/maximum}}
2127
**/
2228
public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
2329
this.{{name}} = {{name}};

modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/enumOuterClass.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
44
{{/jackson}}
55

66
/**
7-
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
7+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
88
*/
99
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
1010
{{#gson}}

modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
3333
{{#vars}}
3434
/**
3535
{{#description}}
36-
* {{{description}}}
36+
* {{description}}
3737
{{/description}}
3838
{{^description}}
3939
* Get {{name}}

modules/swagger-codegen/src/main/resources/JavaJaxRS/enumClass.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
2+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
33
*/
44
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {
55
{{#gson}}

modules/swagger-codegen/src/main/resources/JavaJaxRS/enumOuterClass.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
33
{{/jackson}}
44

55
/**
6-
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
6+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
77
*/
88
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
99
{{#gson}}

modules/swagger-codegen/src/main/resources/JavaJaxRS/modelEnum.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
33
{{/jackson}}
44

55
/**
6-
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
6+
* {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{description}}{{/description}}
77
*/
88
public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
99
{{#gson}}

modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
6363
{{/isMapContainer}}
6464

6565
{{/isReadOnly}}
66-
/**
66+
/**
6767
{{#description}}
68-
* {{{description}}}
68+
* {{description}}
6969
{{/description}}
7070
{{^description}}
7171
* Get {{name}}
@@ -77,7 +77,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
7777
* maximum: {{maximum}}
7878
{{/maximum}}
7979
* @return {{name}}
80-
**/
80+
**/
8181
{{#vendorExtensions.extraAnnotation}}
8282
{{{vendorExtensions.extraAnnotation}}}
8383
{{/vendorExtensions.extraAnnotation}}

0 commit comments

Comments
 (0)