update java samples

This commit is contained in:
William Cheng 2025-09-22 15:43:37 +08:00
parent e5437e06a3
commit 2f69ad9f26
44 changed files with 509 additions and 41 deletions

View File

@ -6,6 +6,7 @@ api/openapi.yaml
build.gradle
build.sbt
docs/Addressable.md
docs/Animal.md
docs/Apple.md
docs/Banana.md
docs/Bar.md
@ -13,6 +14,8 @@ docs/BarApi.md
docs/BarCreate.md
docs/BarRef.md
docs/BarRefOrValue.md
docs/Cat.md
docs/Dog.md
docs/Entity.md
docs/EntityRef.md
docs/Extensible.md
@ -49,12 +52,15 @@ src/main/java/org/openapitools/client/auth/Authentication.java
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
src/main/java/org/openapitools/client/model/Addressable.java
src/main/java/org/openapitools/client/model/Animal.java
src/main/java/org/openapitools/client/model/Apple.java
src/main/java/org/openapitools/client/model/Banana.java
src/main/java/org/openapitools/client/model/Bar.java
src/main/java/org/openapitools/client/model/BarCreate.java
src/main/java/org/openapitools/client/model/BarRef.java
src/main/java/org/openapitools/client/model/BarRefOrValue.java
src/main/java/org/openapitools/client/model/Cat.java
src/main/java/org/openapitools/client/model/Dog.java
src/main/java/org/openapitools/client/model/Entity.java
src/main/java/org/openapitools/client/model/EntityRef.java
src/main/java/org/openapitools/client/model/Extensible.java

View File

@ -124,12 +124,15 @@ Class | Method | HTTP request | Description
## Documentation for Models
- [Addressable](docs/Addressable.md)
- [Animal](docs/Animal.md)
- [Apple](docs/Apple.md)
- [Banana](docs/Banana.md)
- [Bar](docs/Bar.md)
- [BarCreate](docs/BarCreate.md)
- [BarRef](docs/BarRef.md)
- [BarRefOrValue](docs/BarRefOrValue.md)
- [Cat](docs/Cat.md)
- [Dog](docs/Dog.md)
- [Entity](docs/Entity.md)
- [EntityRef](docs/EntityRef.md)
- [Extensible](docs/Extensible.md)

View File

@ -266,4 +266,19 @@ components:
required:
- length
type: object
Animal:
oneOf:
- $ref: "#/components/schemas/Dog"
- $ref: "#/components/schemas/Cat"
x-one-of-name: Animal
Cat:
properties:
declawed:
type: boolean
type: object
Dog:
properties:
bark:
type: boolean
type: object

View File

@ -0,0 +1,10 @@
# Interface Animal
## Implementing Classes
* Cat
* Dog

View File

@ -0,0 +1,17 @@
# Cat
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**declawed** | **Boolean** | | [optional] |
## Implemented Interfaces
* Animal

View File

@ -0,0 +1,17 @@
# Dog
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**bark** | **Boolean** | | [optional] |
## Implemented Interfaces
* Animal

View File

@ -0,0 +1,41 @@
/*
* ByRefOrValue
* This tests for a oneOf interface representation
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Cat;
import org.openapitools.client.model.Dog;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
@JsonIgnoreProperties(
value = "", // ignore manually set , it will be automatically generated by Jackson during serialization
allowSetters = true // allows the to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "", visible = true)
public sealed interface Animal permits Dog, Cat {
}

View File

@ -0,0 +1,106 @@
/*
* ByRefOrValue
* This tests for a oneOf interface representation
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Cat
*/
@JsonPropertyOrder({
Cat.JSON_PROPERTY_DECLAWED
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public final class Cat implements Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
@javax.annotation.Nullable
private Boolean declawed;
public Cat() {
}
public Cat declawed(@javax.annotation.Nullable Boolean declawed) {
this.declawed = declawed;
return this;
}
/**
* Get declawed
* @return declawed
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_DECLAWED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDeclawed() {
return declawed;
}
@JsonProperty(value = JSON_PROPERTY_DECLAWED, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeclawed(@javax.annotation.Nullable Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed);
}
@Override
public int hashCode() {
return Objects.hash(declawed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,106 @@
/*
* ByRefOrValue
* This tests for a oneOf interface representation
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import java.util.Locale;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Dog
*/
@JsonPropertyOrder({
Dog.JSON_PROPERTY_BARK
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public final class Dog implements Animal {
public static final String JSON_PROPERTY_BARK = "bark";
@javax.annotation.Nullable
private Boolean bark;
public Dog() {
}
public Dog bark(@javax.annotation.Nullable Boolean bark) {
this.bark = bark;
return this;
}
/**
* Get bark
* @return bark
*/
@javax.annotation.Nullable
@JsonProperty(value = JSON_PROPERTY_BARK, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getBark() {
return bark;
}
@JsonProperty(value = JSON_PROPERTY_BARK, required = false)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBark(@javax.annotation.Nullable Boolean bark) {
this.bark = bark;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.bark, dog.bark);
}
@Override
public int hashCode() {
return Objects.hash(bark);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" bark: ").append(toIndentedString(bark)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@ -0,0 +1,34 @@
/*
* ByRefOrValue
* This tests for a oneOf interface representation
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Cat;
import org.openapitools.client.model.Dog;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Animal
*/
class AnimalTest {
}

View File

@ -0,0 +1,47 @@
/*
* ByRefOrValue
* This tests for a oneOf interface representation
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Cat
*/
class CatTest {
private final Cat model = new Cat();
/**
* Model tests for Cat
*/
@Test
void testCat() {
// TODO: test Cat
}
/**
* Test the property 'declawed'
*/
@Test
void declawedTest() {
// TODO: test declawed
}
}

View File

@ -0,0 +1,47 @@
/*
* ByRefOrValue
* This tests for a oneOf interface representation
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Dog
*/
class DogTest {
private final Dog model = new Dog();
/**
* Model tests for Dog
*/
@Test
void testDog() {
// TODO: test Dog
}
/**
* Test the property 'bark'
*/
@Test
void barkTest() {
// TODO: test bark
}
}

View File

@ -1 +1 @@
7.15.0-SNAPSHOT
7.16.0-SNAPSHOT

View File

@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0-SNAPSHOT).
/*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.16.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -21,7 +21,6 @@ import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.lang.Nullable;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -35,7 +34,7 @@ import java.util.Map;
import java.util.Optional;
import javax.annotation.Generated;
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
@Validated
@Tag(name = "Bar", description = "the Bar API")
public interface BarApi {
@ -44,6 +43,7 @@ public interface BarApi {
return Optional.empty();
}
public static final String PATH_CREATE_BAR = "/bar";
/**
* POST /bar : Create a Bar
*
@ -62,7 +62,7 @@ public interface BarApi {
)
@RequestMapping(
method = RequestMethod.POST,
value = "/bar",
value = BarApi.PATH_CREATE_BAR,
produces = { "application/json" },
consumes = { "application/json" }
)

View File

@ -1,5 +1,5 @@
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.15.0-SNAPSHOT).
/*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.16.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
@ -7,6 +7,7 @@ package org.openapitools.api;
import org.openapitools.model.Foo;
import org.openapitools.model.FooRefOrValue;
import org.springframework.lang.Nullable;
import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@ -21,7 +22,6 @@ import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.ExampleObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.lang.Nullable;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -35,7 +35,7 @@ import java.util.Map;
import java.util.Optional;
import javax.annotation.Generated;
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
@Validated
@Tag(name = "Foo", description = "the Foo API")
public interface FooApi {
@ -44,6 +44,7 @@ public interface FooApi {
return Optional.empty();
}
public static final String PATH_CREATE_FOO = "/foo";
/**
* POST /foo : Create a Foo
*
@ -62,7 +63,7 @@ public interface FooApi {
)
@RequestMapping(
method = RequestMethod.POST,
value = "/foo",
value = FooApi.PATH_CREATE_FOO,
produces = { "application/json" },
consumes = { "application/json;charset=utf-8" }
)
@ -84,6 +85,7 @@ public interface FooApi {
}
public static final String PATH_GET_ALL_FOOS = "/foo";
/**
* GET /foo : GET all Foos
*
@ -101,7 +103,7 @@ public interface FooApi {
)
@RequestMapping(
method = RequestMethod.GET,
value = "/foo",
value = FooApi.PATH_GET_ALL_FOOS,
produces = { "application/json;charset=utf-8" }
)

View File

@ -6,6 +6,13 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
/**
* This class provides Spring Converter beans for the enum models in the OpenAPI specification.
*
* By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent
* correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than
* `original` or the specification has an integer enum.
*/
@Configuration(value = "org.openapitools.configuration.enumConverterConfiguration")
public class EnumConverterConfiguration {

View File

@ -20,7 +20,7 @@ import javax.annotation.Generated;
*/
@Schema(name = "Addressable", description = "Base schema for addressable entities")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Addressable {
private @Nullable String href;

View File

@ -26,6 +26,6 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = Dog.class),
@JsonSubTypes.Type(value = Cat.class)
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public interface Animal {
}

View File

@ -23,7 +23,7 @@ import javax.annotation.Generated;
* Apple
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Apple implements Fruit {
private Integer seeds;

View File

@ -23,7 +23,7 @@ import javax.annotation.Generated;
* Banana
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Banana implements Fruit {
private Integer length;

View File

@ -25,7 +25,7 @@ import javax.annotation.Generated;
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Bar extends Entity implements BarRefOrValue {
private String id;

View File

@ -27,7 +27,7 @@ import javax.annotation.Generated;
@JsonTypeName("Bar_Create")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class BarCreate extends Entity {
private @Nullable String barPropA;

View File

@ -24,7 +24,7 @@ import javax.annotation.Generated;
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class BarRef extends EntityRef implements BarRefOrValue {
public BarRef() {

View File

@ -32,7 +32,7 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = BarRef.class, name = "BarRef")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public interface BarRefOrValue {
public String getAtType();
}

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Cat
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Cat implements Animal {
private @Nullable Boolean declawed;

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Dog
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Dog implements Animal {
private @Nullable Boolean bark;

View File

@ -36,7 +36,7 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = PizzaSpeziale.class, name = "PizzaSpeziale")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Entity {
private @Nullable String href;

View File

@ -33,7 +33,7 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = FooRef.class, name = "FooRef")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class EntityRef {
private @Nullable String name;

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Extensible
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Extensible {
private @Nullable String atSchemaLocation;

View File

@ -24,7 +24,7 @@ import javax.annotation.Generated;
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Foo extends Entity implements FooRefOrValue {
private @Nullable String fooPropA;

View File

@ -24,7 +24,7 @@ import javax.annotation.Generated;
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class FooRef extends EntityRef implements FooRefOrValue {
private @Nullable String foorefPropA;

View File

@ -31,7 +31,7 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = FooRef.class, name = "FooRef")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public interface FooRefOrValue {
public String getAtType();
}

View File

@ -33,7 +33,7 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = Banana.class, name = "BANANA")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public interface Fruit {
public FruitType getFruitType();
}

View File

@ -20,7 +20,7 @@ import com.fasterxml.jackson.annotation.JsonValue;
* Gets or Sets FruitType
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public enum FruitType {
APPLE("APPLE"),

View File

@ -24,7 +24,7 @@ import javax.annotation.Generated;
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Pasta extends Entity {
private @Nullable String vendor;

View File

@ -33,7 +33,7 @@ import javax.annotation.Generated;
@JsonSubTypes.Type(value = PizzaSpeziale.class, name = "PizzaSpeziale")
})
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Pizza extends Entity {
private @Nullable BigDecimal pizzaSize;

View File

@ -25,7 +25,7 @@ import javax.annotation.Generated;
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class PizzaSpeziale extends Pizza {
private @Nullable String toppings;

View File

@ -15,7 +15,13 @@ paths:
operationId: getAllFoos
responses:
"200":
$ref: "#/components/responses/200FooArray"
content:
application/json;charset=utf-8:
schema:
items:
$ref: "#/components/schemas/FooRefOrValue"
type: array
description: Success
summary: GET all Foos
tags:
- Foo
@ -29,7 +35,11 @@ paths:
$ref: "#/components/requestBodies/Foo"
responses:
"201":
$ref: "#/components/responses/201Foo"
content:
application/json:
schema:
$ref: "#/components/schemas/FooRefOrValue"
description: Error
summary: Create a Foo
tags:
- Foo

View File

@ -20,6 +20,6 @@ import java.util.*;
import javax.annotation.Generated;
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public sealed interface Animal permits Dog, Cat {
}

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Cat
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public final class Cat implements Animal {
private @Nullable Boolean declawed;

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Dog
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public final class Dog implements Animal {
private @Nullable Boolean bark;

View File

@ -20,6 +20,6 @@ import java.util.*;
import javax.annotation.Generated;
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public interface Animal {
}

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Cat
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Cat implements Animal {
private @Nullable Boolean declawed;

View File

@ -19,7 +19,7 @@ import javax.annotation.Generated;
* Dog
*/
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.16.0-SNAPSHOT")
public class Dog implements Animal {
private @Nullable Boolean bark;