-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
2,141 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
gen/main/java/testmodel/micronaut_record/AdditionalPropertiesModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record AdditionalPropertiesModel( | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_ID) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
java.lang.String id) { | ||
|
||
public static final java.lang.String JSON_PROPERTY_ID = "id"; | ||
} |
9 changes: 9 additions & 0 deletions
9
gen/main/java/testmodel/micronaut_record/AdditionalPropertiesModelValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.DEDUCTION, visible = true) | ||
@com.fasterxml.jackson.annotation.JsonSubTypes({ | ||
@com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = PropertyTypeOne.class), | ||
@com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = PropertyTypeTwo.class) | ||
}) | ||
public sealed interface AdditionalPropertiesModelValue permits PropertyTypeOne, PropertyTypeTwo {} |
40 changes: 40 additions & 0 deletions
40
gen/main/java/testmodel/micronaut_record/EnumerationInteger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
public enum EnumerationInteger { | ||
|
||
NUMBER_MINUS_2147483648(-2147483648), | ||
NUMBER_MINUS_1(-1), | ||
NUMBER_0(0), | ||
NUMBER_1(1), | ||
NUMBER_2147483647(2147483647); | ||
|
||
public static final java.lang.Integer NUMBER_MINUS_2147483648_VALUE = -2147483648; | ||
public static final java.lang.Integer NUMBER_MINUS_1_VALUE = -1; | ||
public static final java.lang.Integer NUMBER_0_VALUE = 0; | ||
public static final java.lang.Integer NUMBER_1_VALUE = 1; | ||
public static final java.lang.Integer NUMBER_2147483647_VALUE = 2147483647; | ||
|
||
private final java.lang.Integer value; | ||
|
||
private EnumerationInteger(java.lang.Integer value) { | ||
this.value = value; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonCreator | ||
public static EnumerationInteger toEnum(java.lang.Integer value) { | ||
return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'.")); | ||
} | ||
|
||
public static java.util.Optional<EnumerationInteger> toOptional(java.lang.Integer value) { | ||
return java.util.Arrays | ||
.stream(values()) | ||
.filter(e -> e.value.equals(value)) | ||
.findAny(); | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonValue | ||
public java.lang.Integer getValue() { | ||
return value; | ||
} | ||
} |
91 changes: 91 additions & 0 deletions
91
gen/main/java/testmodel/micronaut_record/EnumerationModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record EnumerationModel( | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_STRING) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
EnumerationString string, | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_STRING_DEFAULT) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
EnumerationStringDefault stringDefault, | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_EMBEDDED) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
Embedded embedded, | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_EMBEDDED_DEFAULT) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
EmbeddedDefault embeddedDefault) { | ||
|
||
public static final java.lang.String JSON_PROPERTY_STRING = "string"; | ||
public static final java.lang.String JSON_PROPERTY_STRING_DEFAULT = "string-default"; | ||
public static final java.lang.String JSON_PROPERTY_EMBEDDED = "embedded"; | ||
public static final java.lang.String JSON_PROPERTY_EMBEDDED_DEFAULT = "embedded-default"; | ||
|
||
public enum Embedded { | ||
|
||
FIRST("first"), | ||
SECOND("second"); | ||
|
||
public static final java.lang.String FIRST_VALUE = "first"; | ||
public static final java.lang.String SECOND_VALUE = "second"; | ||
|
||
private final java.lang.String value; | ||
|
||
private Embedded(java.lang.String value) { | ||
this.value = value; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonCreator | ||
public static Embedded toEnum(java.lang.String value) { | ||
return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'.")); | ||
} | ||
|
||
public static java.util.Optional<Embedded> toOptional(java.lang.String value) { | ||
return java.util.Arrays | ||
.stream(values()) | ||
.filter(e -> e.value.equals(value)) | ||
.findAny(); | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonValue | ||
public java.lang.String getValue() { | ||
return value; | ||
} | ||
} | ||
|
||
public enum EmbeddedDefault { | ||
|
||
THREE("three"), | ||
FOUR("four"); | ||
|
||
public static final java.lang.String THREE_VALUE = "three"; | ||
public static final java.lang.String FOUR_VALUE = "four"; | ||
|
||
private final java.lang.String value; | ||
|
||
private EmbeddedDefault(java.lang.String value) { | ||
this.value = value; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonCreator | ||
public static EmbeddedDefault toEnum(java.lang.String value) { | ||
return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'.")); | ||
} | ||
|
||
public static java.util.Optional<EmbeddedDefault> toOptional(java.lang.String value) { | ||
return java.util.Arrays | ||
.stream(values()) | ||
.filter(e -> e.value.equals(value)) | ||
.findAny(); | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonValue | ||
public java.lang.String getValue() { | ||
return value; | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
gen/main/java/testmodel/micronaut_record/EnumerationNumber.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
public enum EnumerationNumber { | ||
|
||
NUMBER_MINUS_1(-1D), | ||
NUMBER_0(0D), | ||
NUMBER_1(1D); | ||
|
||
public static final java.lang.Double NUMBER_MINUS_1_VALUE = -1D; | ||
public static final java.lang.Double NUMBER_0_VALUE = 0D; | ||
public static final java.lang.Double NUMBER_1_VALUE = 1D; | ||
|
||
private final java.lang.Double value; | ||
|
||
private EnumerationNumber(java.lang.Double value) { | ||
this.value = value; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonCreator | ||
public static EnumerationNumber toEnum(java.lang.Double value) { | ||
return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'.")); | ||
} | ||
|
||
public static java.util.Optional<EnumerationNumber> toOptional(java.lang.Double value) { | ||
return java.util.Arrays | ||
.stream(values()) | ||
.filter(e -> e.value.equals(value)) | ||
.findAny(); | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonValue | ||
public java.lang.Double getValue() { | ||
return value; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
gen/main/java/testmodel/micronaut_record/EnumerationString.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
public enum EnumerationString { | ||
|
||
ONE("one"), | ||
TWO("two"); | ||
|
||
public static final java.lang.String ONE_VALUE = "one"; | ||
public static final java.lang.String TWO_VALUE = "two"; | ||
|
||
private final java.lang.String value; | ||
|
||
private EnumerationString(java.lang.String value) { | ||
this.value = value; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonCreator | ||
public static EnumerationString toEnum(java.lang.String value) { | ||
return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'.")); | ||
} | ||
|
||
public static java.util.Optional<EnumerationString> toOptional(java.lang.String value) { | ||
return java.util.Arrays | ||
.stream(values()) | ||
.filter(e -> e.value.equals(value)) | ||
.findAny(); | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonValue | ||
public java.lang.String getValue() { | ||
return value; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
gen/main/java/testmodel/micronaut_record/EnumerationStringDefault.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
public enum EnumerationStringDefault { | ||
|
||
THREE("three"), | ||
FOUR("four"); | ||
|
||
public static final java.lang.String THREE_VALUE = "three"; | ||
public static final java.lang.String FOUR_VALUE = "four"; | ||
|
||
private final java.lang.String value; | ||
|
||
private EnumerationStringDefault(java.lang.String value) { | ||
this.value = value; | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonCreator | ||
public static EnumerationStringDefault toEnum(java.lang.String value) { | ||
return toOptional(value).orElseThrow(() -> new IllegalArgumentException("Unknown value '" + value + "'.")); | ||
} | ||
|
||
public static java.util.Optional<EnumerationStringDefault> toOptional(java.lang.String value) { | ||
return java.util.Arrays | ||
.stream(values()) | ||
.filter(e -> e.value.equals(value)) | ||
.findAny(); | ||
} | ||
|
||
@com.fasterxml.jackson.annotation.JsonValue | ||
public java.lang.String getValue() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record FirstModel( | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_TYPE) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
java.lang.String type, | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_FIRST) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
java.lang.String first, | ||
|
||
@jakarta.validation.Valid | ||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_SECOND_LEVEL) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
SecondLevelModel secondLevel) implements OneOfModel { | ||
|
||
public static final java.lang.String JSON_PROPERTY_TYPE = "type"; | ||
public static final java.lang.String JSON_PROPERTY_FIRST = "first"; | ||
public static final java.lang.String JSON_PROPERTY_SECOND_LEVEL = "secondLevel"; | ||
} |
18 changes: 18 additions & 0 deletions
18
gen/main/java/testmodel/micronaut_record/InheritanceExtended.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record InheritanceExtended( | ||
|
||
@jakarta.validation.constraints.NotNull | ||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_FOO) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS) | ||
java.lang.String foo, | ||
|
||
@jakarta.validation.constraints.NotNull | ||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_BAR) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS) | ||
java.lang.String bar) implements InheritanceSimple { | ||
|
||
public static final java.lang.String JSON_PROPERTY_BAR = "bar"; | ||
} |
13 changes: 13 additions & 0 deletions
13
gen/main/java/testmodel/micronaut_record/InheritanceSimple.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(as = InheritanceSimpleDefault.class) | ||
public sealed interface InheritanceSimple permits InheritanceExtended, InheritanceSimpleDefault { | ||
|
||
java.lang.String JSON_PROPERTY_FOO = "foo"; | ||
|
||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_FOO) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS) | ||
java.lang.String foo(); | ||
} |
12 changes: 12 additions & 0 deletions
12
gen/main/java/testmodel/micronaut_record/InheritanceSimpleDefault.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record InheritanceSimpleDefault( | ||
|
||
@jakarta.validation.constraints.NotNull | ||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_FOO) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS) | ||
java.lang.String foo) implements InheritanceSimple { | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
gen/main/java/testmodel/micronaut_record/InheritanceWithEnumType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY, property = InheritanceWithEnumType.JSON_DISCRIMINATOR) | ||
@com.fasterxml.jackson.annotation.JsonSubTypes({ | ||
@com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = InheritanceWithEnumType1.class, name = "Inheritance1"), | ||
@com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = InheritanceWithEnumType2.class, name = "Inheritance2"), | ||
@com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = InheritanceWithEnumType3.class, name = "Inheritance3") | ||
}) | ||
public sealed interface InheritanceWithEnumType permits InheritanceWithEnumType1, InheritanceWithEnumType2, InheritanceWithEnumType3 { | ||
|
||
java.lang.String JSON_DISCRIMINATOR = "type"; | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_DISCRIMINATOR) | ||
InheritanceWithEnumTypeEnum type(); | ||
} |
17 changes: 17 additions & 0 deletions
17
gen/main/java/testmodel/micronaut_record/InheritanceWithEnumType1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record InheritanceWithEnumType1( | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_D) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
java.lang.String d) implements InheritanceWithEnumType { | ||
|
||
public static final java.lang.String JSON_PROPERTY_D = "d"; | ||
|
||
@Override | ||
public InheritanceWithEnumTypeEnum type() { | ||
return InheritanceWithEnumTypeEnum.INHERITANCE1; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
gen/main/java/testmodel/micronaut_record/InheritanceWithEnumType2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package testmodel.micronaut_record; | ||
|
||
@jakarta.annotation.Generated("org.openapitools.codegen.languages.MicronautCodegen") | ||
@io.micronaut.serde.annotation.Serdeable | ||
public record InheritanceWithEnumType2( | ||
|
||
@com.fasterxml.jackson.annotation.JsonProperty(JSON_PROPERTY_E) | ||
@com.fasterxml.jackson.annotation.JsonInclude(com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL) | ||
java.lang.String e) implements InheritanceWithEnumType { | ||
|
||
public static final java.lang.String JSON_PROPERTY_E = "e"; | ||
|
||
@Override | ||
public InheritanceWithEnumTypeEnum type() { | ||
return InheritanceWithEnumTypeEnum.INHERITANCE2; | ||
} | ||
} |
Oops, something went wrong.