Skip to content

Commit cca147d

Browse files
author
jpfinne
committed
Regenerate
1 parent 7c4b50b commit cca147d

18 files changed

Lines changed: 156 additions & 476 deletions

File tree

bin/configs/spring-boot-4-jspecify.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
generatorName: spring
2+
library: spring-boot
23
outputDir: samples/openapi3/server/petstore/springboot-4-jspecify
34
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
45
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
56
validateSpec: false
67
additionalProperties:
78
groupId: org.openapitools.openapi3
89
documentationProvider: springdoc
10+
interfaceOnly: true
911
artifactId: springboot
1012
snapshotVersion: "true"
1113
useSpringBoot4: true

docs/generators/java-inflector.md

Lines changed: 57 additions & 57 deletions
Large diffs are not rendered by default.

docs/generators/java-microprofile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
9999
|useGzipFeature|Send gzip-encoded requests| |false|
100100
|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native' library (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true). Incompatible with 'openApiNullable'.| |false|
101101
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
102-
|useJspecify|Use Jspecify for null checks. Ony supported for [native, webclient, restclient, resttemplate]| |false|
102+
|useJspecify|Use Jspecify for null checks. Ony supported for [native, restclient, resttemplate, webclient]| |false|
103103
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false|
104104
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
105105
|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false|

docs/generators/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
9999
|useGzipFeature|Send gzip-encoded requests| |false|
100100
|useJackson3|Use Jackson 3 instead of Jackson 2. Supported for 'native' library (requires Java 17+) and for Spring 'resttemplate', 'webclient', and 'restclient' libraries (require useSpringBoot4=true). Incompatible with 'openApiNullable'.| |false|
101101
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
102-
|useJspecify|Use Jspecify for null checks. Ony supported for [native, webclient, restclient, resttemplate]| |false|
102+
|useJspecify|Use Jspecify for null checks. Ony supported for [native, restclient, resttemplate, webclient]| |false|
103103
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false|
104104
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
105105
|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false|

docs/generators/jaxrs-cxf-client.md

Lines changed: 64 additions & 64 deletions
Large diffs are not rendered by default.

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
176176

177177
@Setter protected int maxAttemptsForRetry = 1;
178178
@Setter protected long waitTimeMillis = 10l;
179-
private final Set<String> JSPECIFY_SUPPORTED_LIBRARIES = Set.of(RESTCLIENT, WEBCLIENT, NATIVE, RESTTEMPLATE);
179+
private final Set<String> JSPECIFY_SUPPORTED_LIBRARIES = new TreeSet<>(Arrays.asList(RESTCLIENT, WEBCLIENT, NATIVE, RESTTEMPLATE));
180180

181181
private static class MpRestClientVersion {
182182
public final String rootPackage;
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
README.md
22
pom.xml
3-
src/main/java/org/openapitools/OpenApiGeneratorApplication.java
4-
src/main/java/org/openapitools/RFC3339DateFormat.java
53
src/main/java/org/openapitools/api/ApiUtil.java
64
src/main/java/org/openapitools/api/FooApi.java
7-
src/main/java/org/openapitools/api/FooApiController.java
85
src/main/java/org/openapitools/api/UploadApi.java
9-
src/main/java/org/openapitools/api/UploadApiController.java
106
src/main/java/org/openapitools/api/package-info.java
11-
src/main/java/org/openapitools/configuration/HomeController.java
12-
src/main/java/org/openapitools/configuration/SpringDocConfiguration.java
137
src/main/java/org/openapitools/model/Foo.java
148
src/main/java/org/openapitools/model/package-info.java
15-
src/main/resources/application.properties
16-
src/main/resources/openapi.yaml
17-
src/test/java/org/openapitools/OpenApiGeneratorApplicationTests.java
Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
# OpenAPI generated server
21

3-
Spring Boot Server
2+
# OpenAPI generated API stub
43

5-
## Overview
6-
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
7-
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate a server stub.
8-
This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework.
4+
Spring Framework stub
95

106

11-
The underlying library integrating OpenAPI to Spring Boot is [springdoc](https://springdoc.org).
12-
Springdoc will generate an OpenAPI v3 specification based on the generated Controller and Model classes.
13-
The specification is available to download using the following url:
14-
http://localhost:8080/v3/api-docs/
7+
## Overview
8+
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
9+
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
10+
This is an example of building API stub interfaces in Java using the Spring framework.
1511

16-
Start your server as a simple java application
12+
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
13+
by adding ```@Controller``` classes that implement the interface. Eg:
14+
```java
15+
@Controller
16+
public class PetController implements PetApi {
17+
// implement all PetApi methods
18+
}
19+
```
1720

18-
You can view the api documentation in swagger-ui by pointing to
19-
http://localhost:8080/swagger-ui.html
21+
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
22+
```java
23+
@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
24+
public interface PetClient extends PetApi {
2025

21-
Change default port value in application.properties
26+
}
27+
```

samples/openapi3/server/petstore/springboot-4-jspecify/pom.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@
2323
<sourceDirectory>src/main/java</sourceDirectory>
2424
<plugins>
2525
<plugin>
26-
<groupId>org.springframework.boot</groupId>
27-
<artifactId>spring-boot-maven-plugin</artifactId>
28-
<configuration>
29-
</configuration>
26+
<groupId>org.apache.maven.plugins</groupId>
27+
<artifactId>maven-source-plugin</artifactId>
28+
<executions>
29+
<execution>
30+
<id>attach-sources</id>
31+
<goals>
32+
<goal>jar</goal>
33+
</goals>
34+
</execution>
35+
</executions>
3036
</plugin>
3137
</plugins>
3238
</build>

samples/openapi3/server/petstore/springboot-4-jspecify/src/main/java/org/openapitools/OpenApiGeneratorApplication.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)