Skip to content

Commit d119d21

Browse files
committed
Added Java 17 compatibility in Online Module
Signed-off-by: Shubham Kalloli <[email protected]>
1 parent 62caf3c commit d119d21

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

modules/openapi-generator-online/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a ser
1010

1111
This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework.
1212

13-
The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox)
13+
The underlying library integrating OpenAPI to SpringBoot is [springdoc](https://github.com/springdoc/springdoc-openapi)
1414

1515
## Building
1616

@@ -28,13 +28,6 @@ java -jar ./target/openapi-generator-online.jar
2828

2929
This exposes the API on local port 8080.
3030

31-
Springfox supports configuration of the "host" value in the output OpenAPI document by setting the `Host` HTTP header in the request.
32-
To set this explicitly, pass the system property `springfox.documentation.swagger.v2.host` with the desired host. For example:
33-
34-
```
35-
java -Dspringfox.documentation.swagger.v2.host=example.com:8888 -jar ./target/openapi-generator-online.jar
36-
```
37-
3831
### Via Docker
3932

4033
After building from source, change to this module directory (`cd modules/openapi-generator-online`) and build the docker image:

modules/openapi-generator-online/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<packaging>jar</packaging>
1313
<name>openapi-generator-online</name>
1414
<properties>
15+
<maven.compiler.source>17</maven.compiler.source>
16+
<maven.compiler.target>17</maven.compiler.target>
1517
<spring-boot.version>3.5.7</spring-boot.version>
1618
<springdoc-version>2.8.14</springdoc-version>
1719
<sonar.exclusions>**/org/openapitools/codegen/online/**/*</sonar.exclusions>

modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ public OpenAPI customOpenAPI() {
5656
.url("https://www.apache.org/licenses/LICENSE-2.0.html"))
5757
.contact(new Contact()
5858
.name("OpenAPI Generator Team")
59-
.url("https://github.com/OpenAPITools/openapi-generator")))
60-
.servers(List.of(
61-
new Server().url("http://localhost:8081").description("Local development server"),
62-
new Server().url("https://api.openapi-generator.tech").description("Production server")
63-
));
59+
.url("https://github.com/OpenAPITools/openapi-generator")));
6460
}
6561
}

0 commit comments

Comments
 (0)