Skip to content

Commit 58bf968

Browse files
committed
regenrate samples
1 parent 0b23a87 commit 58bf968

34 files changed

Lines changed: 78 additions & 41 deletions

File tree

samples/client/others/java/webclient-sealedInterface/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,15 @@ Class | Method | HTTP request | Description
124124
## Documentation for Models
125125

126126
- [Addressable](docs/Addressable.md)
127+
- [Animal](docs/Animal.md)
127128
- [Apple](docs/Apple.md)
128129
- [Banana](docs/Banana.md)
129130
- [Bar](docs/Bar.md)
130131
- [BarCreate](docs/BarCreate.md)
131132
- [BarRef](docs/BarRef.md)
132133
- [BarRefOrValue](docs/BarRefOrValue.md)
134+
- [Cat](docs/Cat.md)
135+
- [Dog](docs/Dog.md)
133136
- [Entity](docs/Entity.md)
134137
- [EntityRef](docs/EntityRef.md)
135138
- [Extensible](docs/Extensible.md)

samples/client/others/java/webclient-sealedInterface/api/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,4 +266,19 @@ components:
266266
required:
267267
- length
268268
type: object
269+
Animal:
270+
oneOf:
271+
- $ref: "#/components/schemas/Dog"
272+
- $ref: "#/components/schemas/Cat"
273+
x-one-of-name: Animal
274+
Cat:
275+
properties:
276+
declawed:
277+
type: boolean
278+
type: object
279+
Dog:
280+
properties:
281+
bark:
282+
type: boolean
283+
type: object
269284

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.15.0-SNAPSHOT
1+
7.16.0-SNAPSHOT

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/api/BarApi.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/**
2-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0-SNAPSHOT).
1+
/*
2+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.16.0-SNAPSHOT).
33
* https://openapi-generator.tech
44
* Do not edit the class manually.
55
*/
@@ -21,7 +21,6 @@
2121
import io.swagger.v3.oas.annotations.media.ExampleObject;
2222
import org.springframework.http.HttpStatus;
2323
import org.springframework.http.MediaType;
24-
import org.springframework.lang.Nullable;
2524
import org.springframework.http.ResponseEntity;
2625
import org.springframework.validation.annotation.Validated;
2726
import org.springframework.web.bind.annotation.*;
@@ -35,7 +34,7 @@
3534
import java.util.Optional;
3635
import javax.annotation.Generated;
3736

38-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
37+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
3938
@Validated
4039
@Tag(name = "Bar", description = "the Bar API")
4140
public interface BarApi {
@@ -44,6 +43,7 @@ default Optional<NativeWebRequest> getRequest() {
4443
return Optional.empty();
4544
}
4645

46+
public static final String PATH_CREATE_BAR = "/bar";
4747
/**
4848
* POST /bar : Create a Bar
4949
*
@@ -62,7 +62,7 @@ default Optional<NativeWebRequest> getRequest() {
6262
)
6363
@RequestMapping(
6464
method = RequestMethod.POST,
65-
value = "/bar",
65+
value = BarApi.PATH_CREATE_BAR,
6666
produces = { "application/json" },
6767
consumes = { "application/json" }
6868
)

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/api/FooApi.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
/**
2-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0-SNAPSHOT).
1+
/*
2+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.16.0-SNAPSHOT).
33
* https://openapi-generator.tech
44
* Do not edit the class manually.
55
*/
66
package org.openapitools.api;
77

88
import org.openapitools.model.Foo;
99
import org.openapitools.model.FooRefOrValue;
10+
import org.springframework.lang.Nullable;
1011
import io.swagger.v3.oas.annotations.ExternalDocumentation;
1112
import io.swagger.v3.oas.annotations.Operation;
1213
import io.swagger.v3.oas.annotations.Parameter;
@@ -21,7 +22,6 @@
2122
import io.swagger.v3.oas.annotations.media.ExampleObject;
2223
import org.springframework.http.HttpStatus;
2324
import org.springframework.http.MediaType;
24-
import org.springframework.lang.Nullable;
2525
import org.springframework.http.ResponseEntity;
2626
import org.springframework.validation.annotation.Validated;
2727
import org.springframework.web.bind.annotation.*;
@@ -35,7 +35,7 @@
3535
import java.util.Optional;
3636
import javax.annotation.Generated;
3737

38-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
38+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
3939
@Validated
4040
@Tag(name = "Foo", description = "the Foo API")
4141
public interface FooApi {
@@ -44,6 +44,7 @@ default Optional<NativeWebRequest> getRequest() {
4444
return Optional.empty();
4545
}
4646

47+
public static final String PATH_CREATE_FOO = "/foo";
4748
/**
4849
* POST /foo : Create a Foo
4950
*
@@ -62,7 +63,7 @@ default Optional<NativeWebRequest> getRequest() {
6263
)
6364
@RequestMapping(
6465
method = RequestMethod.POST,
65-
value = "/foo",
66+
value = FooApi.PATH_CREATE_FOO,
6667
produces = { "application/json" },
6768
consumes = { "application/json;charset=utf-8" }
6869
)
@@ -84,6 +85,7 @@ default ResponseEntity<FooRefOrValue> createFoo(
8485
}
8586

8687

88+
public static final String PATH_GET_ALL_FOOS = "/foo";
8789
/**
8890
* GET /foo : GET all Foos
8991
*
@@ -101,7 +103,7 @@ default ResponseEntity<FooRefOrValue> createFoo(
101103
)
102104
@RequestMapping(
103105
method = RequestMethod.GET,
104-
value = "/foo",
106+
value = FooApi.PATH_GET_ALL_FOOS,
105107
produces = { "application/json;charset=utf-8" }
106108
)
107109

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
import org.springframework.context.annotation.Configuration;
77
import org.springframework.core.convert.converter.Converter;
88

9+
/**
10+
* This class provides Spring Converter beans for the enum models in the OpenAPI specification.
11+
*
12+
* By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent
13+
* correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than
14+
* `original` or the specification has an integer enum.
15+
*/
916
@Configuration(value = "org.openapitools.configuration.enumConverterConfiguration")
1017
public class EnumConverterConfiguration {
1118

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/model/Addressable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121

2222
@Schema(name = "Addressable", description = "Base schema for addressable entities")
23-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
23+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
2424
public class Addressable {
2525

2626
private @Nullable String href;

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/model/Animal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
@JsonSubTypes.Type(value = Dog.class),
2727
@JsonSubTypes.Type(value = Cat.class)
2828
})
29-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
29+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
3030
public interface Animal {
3131
}

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/model/Apple.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Apple
2424
*/
2525

26-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
26+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
2727
public class Apple implements Fruit {
2828

2929
private Integer seeds;

samples/openapi3/server/petstore/spring-boot-oneof-interface/src/main/java/org/openapitools/model/Banana.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* Banana
2424
*/
2525

26-
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
26+
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
2727
public class Banana implements Fruit {
2828

2929
private Integer length;

0 commit comments

Comments
 (0)