Skip to content

Commit 5e83b66

Browse files
committed
updated templates for baseName
1 parent 5ab425e commit 5e83b66

File tree

8 files changed

+26
-34
lines changed

8 files changed

+26
-34
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{paramName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}}
1+
{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}})@HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
2626
* minimum: {{minimum}}{{/minimum}}{{#maximum}}
2727
* maximum: {{maximum}}{{/maximum}}
2828
**/
29-
@ApiModelProperty(required = {{required}}, value = "{{{description}}}")
29+
@ApiModelProperty({{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
3030
@JsonProperty("{{name}}")
3131
public {{{datatypeWithEnum}}} {{getter}}() {
3232
return {{name}};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}} {{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{paramName}}") {{{dataType}}} {{paramName}}{{/isPathParam}}
1+
{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}} {{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}}

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,27 @@
2626
</executions>
2727
</plugin>
2828
<plugin>
29-
<groupId>org.mortbay.jetty</groupId>
29+
<groupId>org.eclipse.jetty</groupId>
3030
<artifactId>jetty-maven-plugin</artifactId>
3131
<version>${jetty-version}</version>
3232
<configuration>
33-
<webAppConfig>
34-
<contextPath>{{^contextPath}}/{{/contextPath}}{{#contextPath}}{{contextPath}}{{/contextPath}}</contextPath>
35-
</webAppConfig>
33+
<webApp>
34+
<contextPath>/</contextPath>
35+
</webApp>
3636
<webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
37-
<webDefaultXml>${project.basedir}/conf/jetty/webdefault.xml</webDefaultXml>
3837
<stopPort>8079</stopPort>
3938
<stopKey>stopit</stopKey>
40-
<connectors>
41-
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
42-
<port>8002</port>
43-
<maxIdleTime>60000</maxIdleTime>
44-
<confidentialPort>8443</confidentialPort>
45-
</connector>
46-
</connectors>
39+
<httpConnector>
40+
<port>8080</port>
41+
<idleTimeout>60000</idleTimeout>
42+
</httpConnector>
4743
</configuration>
4844
<executions>
4945
<execution>
5046
<id>start-jetty</id>
5147
<phase>pre-integration-test</phase>
5248
<goals>
53-
<goal>run</goal>
49+
<goal>start</goal>
5450
</goals>
5551
<configuration>
5652
<scanIntervalSeconds>0</scanIntervalSeconds>
@@ -134,7 +130,7 @@
134130
</repositories>
135131
<properties>
136132
<swagger-core-version>1.5.3-M1-SNAPSHOT</swagger-core-version>
137-
<jetty-version>8.1.11.v20130520</jetty-version>
133+
<jetty-version>9.2.9.v20150224</jetty-version>
138134
<jersey-version>1.13</jersey-version>
139135
<slf4j-version>1.6.3</slf4j-version>
140136
<scala-test-version>1.6.1</scala-test-version>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @QueryParam("{{paramName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}}
1+
{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</init-param>
3535
<init-param>
3636
<param-name>swagger.api.basepath</param-name>
37-
<param-value>http://localhost:8002</param-value>
37+
<param-value>http://localhost:8080</param-value>
3838
</init-param>
3939
<load-on-startup>2</load-on-startup>
4040
</servlet>

samples/server/petstore/jaxrs/pom.xml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,27 @@
2626
</executions>
2727
</plugin>
2828
<plugin>
29-
<groupId>org.mortbay.jetty</groupId>
29+
<groupId>org.eclipse.jetty</groupId>
3030
<artifactId>jetty-maven-plugin</artifactId>
3131
<version>${jetty-version}</version>
3232
<configuration>
33-
<webAppConfig>
34-
<contextPath>/v2</contextPath>
35-
</webAppConfig>
33+
<webApp>
34+
<contextPath>/</contextPath>
35+
</webApp>
3636
<webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
37-
<webDefaultXml>${project.basedir}/conf/jetty/webdefault.xml</webDefaultXml>
3837
<stopPort>8079</stopPort>
3938
<stopKey>stopit</stopKey>
40-
<connectors>
41-
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
42-
<port>8002</port>
43-
<maxIdleTime>60000</maxIdleTime>
44-
<confidentialPort>8443</confidentialPort>
45-
</connector>
46-
</connectors>
39+
<httpConnector>
40+
<port>8080</port>
41+
<idleTimeout>60000</idleTimeout>
42+
</httpConnector>
4743
</configuration>
4844
<executions>
4945
<execution>
5046
<id>start-jetty</id>
5147
<phase>pre-integration-test</phase>
5248
<goals>
53-
<goal>run</goal>
49+
<goal>start</goal>
5450
</goals>
5551
<configuration>
5652
<scanIntervalSeconds>0</scanIntervalSeconds>
@@ -134,7 +130,7 @@
134130
</repositories>
135131
<properties>
136132
<swagger-core-version>1.5.3-M1-SNAPSHOT</swagger-core-version>
137-
<jetty-version>8.1.11.v20130520</jetty-version>
133+
<jetty-version>9.2.9.v20150224</jetty-version>
138134
<jersey-version>1.13</jersey-version>
139135
<slf4j-version>1.6.3</slf4j-version>
140136
<scala-test-version>1.6.1</scala-test-version>

samples/server/petstore/jaxrs/src/main/webapp/WEB-INF/web.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</init-param>
3535
<init-param>
3636
<param-name>swagger.api.basepath</param-name>
37-
<param-value>http://localhost:8002</param-value>
37+
<param-value>http://localhost:8080</param-value>
3838
</init-param>
3939
<load-on-startup>2</load-on-startup>
4040
</servlet>

0 commit comments

Comments
 (0)