Skip to content

Commit e73a3a5

Browse files
gracekarinafrantuma
authored andcommitted
refs - swagger-api/swagger-codegen#9203 - fixing sample jaxrs-resteasy-joda readme pom
1 parent a6386f7 commit e73a3a5

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/main/java/io/swagger/codegen/v3/generators/java/AbstractJavaJAXRSServerCodegen.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ public void preprocessOpenAPI(OpenAPI openAPI) {
9696
final URL urlInfo = URLPathUtil.getServerURL(openAPI);
9797
String port = "8080"; // Default value for a JEE Server
9898
if ( urlInfo != null && urlInfo.getPort() != 0) {
99-
port = String.valueOf(urlInfo.getPort());
99+
if (urlInfo.getPort() != -1) {
100+
port = String.valueOf(urlInfo.getPort());
101+
}
100102
}
101103
this.additionalProperties.put("serverPort", port);
102104
}

src/main/resources/handlebars/JavaJaxRS/resteasy/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework.
1010
To run the server, please execute the following:
1111

1212
```
13-
mvn clean package jetty:run
13+
mvn clean package
1414
```
1515

1616
You can then view the swagger listing here:

src/main/resources/handlebars/JavaJaxRS/resteasy/pom.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@
185185
</exclusion>
186186
</exclusions>
187187
</dependency>
188+
<dependency>
189+
<groupId>org.apache.httpcomponents</groupId>
190+
<artifactId>httpclient</artifactId>
191+
<version>4.5.10</version>
192+
<scope>test</scope>
193+
</dependency>
188194
{{#useBeanValidation}}
189195
<!-- Bean Validation API support -->
190196
<dependency>

0 commit comments

Comments
 (0)