-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
13 changed files
with
309 additions
and
0 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
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
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
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
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
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
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
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
51 changes: 51 additions & 0 deletions
51
...va/main/com/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithSetFields.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,51 @@ | ||
/* | ||
* Example OpenAPI Spec. | ||
* An example OpenAPI-spec to generate example Java records. | ||
* | ||
* 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. | ||
* | ||
* This class was generated using custom mustache templates from | ||
* openapi-to-java-records-mustache-templates. For further information, | ||
* questions, requesting features or reporting issues, please visit: | ||
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates. | ||
* Generated with Version: 1.6.0 | ||
* | ||
*/ | ||
|
||
package com.chrimle.example.additionalEnumTypeAnnotations; | ||
|
||
import java.util.Objects; | ||
import com.google.gson.TypeAdapter; | ||
import com.google.gson.annotations.JsonAdapter; | ||
import com.google.gson.annotations.SerializedName; | ||
import com.google.gson.stream.JsonReader; | ||
import com.google.gson.stream.JsonWriter; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* Example of a Record with Set fields | ||
* @param field1 a Set field | ||
* @param field2 another Set field | ||
* @param field3 yet another Set field | ||
*/ | ||
public record ExampleRecordWithSetFields( | ||
@javax.annotation.Nonnull Set<Boolean> field1, | ||
@javax.annotation.Nonnull Set<Boolean> field2, | ||
@javax.annotation.Nonnull Set<Boolean> field3) { | ||
|
||
public ExampleRecordWithSetFields( | ||
@javax.annotation.Nullable final Set<Boolean> field1, | ||
@javax.annotation.Nullable final Set<Boolean> field2, | ||
@javax.annotation.Nullable final Set<Boolean> field3) { | ||
this.field1 = Objects.requireNonNullElse(field1, new LinkedHashSet<>()); | ||
this.field2 = Objects.requireNonNullElse(field2, new LinkedHashSet<>()); | ||
this.field3 = Objects.requireNonNullElse(field3, new LinkedHashSet<>()); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
...a/main/com/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithSetFields.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,54 @@ | ||
/* | ||
* Example OpenAPI Spec. | ||
* An example OpenAPI-spec to generate example Java records. | ||
* | ||
* 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. | ||
* | ||
* This class was generated using custom mustache templates from | ||
* openapi-to-java-records-mustache-templates. For further information, | ||
* questions, requesting features or reporting issues, please visit: | ||
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates. | ||
* Generated with Version: 1.6.0 | ||
* | ||
*/ | ||
|
||
package com.chrimle.example.additionalModelTypeAnnotations; | ||
|
||
import java.util.Objects; | ||
import com.google.gson.TypeAdapter; | ||
import com.google.gson.annotations.JsonAdapter; | ||
import com.google.gson.annotations.SerializedName; | ||
import com.google.gson.stream.JsonReader; | ||
import com.google.gson.stream.JsonWriter; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* Example of a Record with Set fields | ||
* @param field1 a Set field | ||
* @param field2 another Set field | ||
* @param field3 yet another Set field | ||
*/ | ||
@com.chrimle.example.annotations.TestAnnotationOne | ||
@com.chrimle.example.annotations.TestAnnotationTwo | ||
@com.chrimle.example.annotations.TestAnnotationThree | ||
public record ExampleRecordWithSetFields( | ||
@javax.annotation.Nonnull Set<Boolean> field1, | ||
@javax.annotation.Nonnull Set<Boolean> field2, | ||
@javax.annotation.Nonnull Set<Boolean> field3) { | ||
|
||
public ExampleRecordWithSetFields( | ||
@javax.annotation.Nullable final Set<Boolean> field1, | ||
@javax.annotation.Nullable final Set<Boolean> field2, | ||
@javax.annotation.Nullable final Set<Boolean> field3) { | ||
this.field1 = Objects.requireNonNullElse(field1, new LinkedHashSet<>()); | ||
this.field2 = Objects.requireNonNullElse(field2, new LinkedHashSet<>()); | ||
this.field3 = Objects.requireNonNullElse(field3, new LinkedHashSet<>()); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
...l/src/gen/java/main/com/chrimle/example/serializableModel/ExampleRecordWithSetFields.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,54 @@ | ||
/* | ||
* Example OpenAPI Spec. | ||
* An example OpenAPI-spec to generate example Java records. | ||
* | ||
* 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. | ||
* | ||
* This class was generated using custom mustache templates from | ||
* openapi-to-java-records-mustache-templates. For further information, | ||
* questions, requesting features or reporting issues, please visit: | ||
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates. | ||
* Generated with Version: 1.6.0 | ||
* | ||
*/ | ||
|
||
package com.chrimle.example.serializableModel; | ||
|
||
import java.util.Objects; | ||
import com.google.gson.TypeAdapter; | ||
import com.google.gson.annotations.JsonAdapter; | ||
import com.google.gson.annotations.SerializedName; | ||
import com.google.gson.stream.JsonReader; | ||
import com.google.gson.stream.JsonWriter; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
import java.io.Serializable; | ||
|
||
/** | ||
* Example of a Record with Set fields | ||
* @param field1 a Set field | ||
* @param field2 another Set field | ||
* @param field3 yet another Set field | ||
*/ | ||
public record ExampleRecordWithSetFields( | ||
@javax.annotation.Nonnull Set<Boolean> field1, | ||
@javax.annotation.Nonnull Set<Boolean> field2, | ||
@javax.annotation.Nonnull Set<Boolean> field3) { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public ExampleRecordWithSetFields( | ||
@javax.annotation.Nullable final Set<Boolean> field1, | ||
@javax.annotation.Nullable final Set<Boolean> field2, | ||
@javax.annotation.Nullable final Set<Boolean> field3) { | ||
this.field1 = Objects.requireNonNullElse(field1, new LinkedHashSet<>()); | ||
this.field2 = Objects.requireNonNullElse(field2, new LinkedHashSet<>()); | ||
this.field3 = Objects.requireNonNullElse(field3, new LinkedHashSet<>()); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...c/standard/src/gen/java/main/com/chrimle/example/standard/ExampleRecordWithSetFields.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,51 @@ | ||
/* | ||
* Example OpenAPI Spec. | ||
* An example OpenAPI-spec to generate example Java records. | ||
* | ||
* 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. | ||
* | ||
* This class was generated using custom mustache templates from | ||
* openapi-to-java-records-mustache-templates. For further information, | ||
* questions, requesting features or reporting issues, please visit: | ||
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates. | ||
* Generated with Version: 1.6.0 | ||
* | ||
*/ | ||
|
||
package com.chrimle.example.standard; | ||
|
||
import java.util.Objects; | ||
import com.google.gson.TypeAdapter; | ||
import com.google.gson.annotations.JsonAdapter; | ||
import com.google.gson.annotations.SerializedName; | ||
import com.google.gson.stream.JsonReader; | ||
import com.google.gson.stream.JsonWriter; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* Example of a Record with Set fields | ||
* @param field1 a Set field | ||
* @param field2 another Set field | ||
* @param field3 yet another Set field | ||
*/ | ||
public record ExampleRecordWithSetFields( | ||
@javax.annotation.Nonnull Set<Boolean> field1, | ||
@javax.annotation.Nonnull Set<Boolean> field2, | ||
@javax.annotation.Nonnull Set<Boolean> field3) { | ||
|
||
public ExampleRecordWithSetFields( | ||
@javax.annotation.Nullable final Set<Boolean> field1, | ||
@javax.annotation.Nullable final Set<Boolean> field2, | ||
@javax.annotation.Nullable final Set<Boolean> field3) { | ||
this.field1 = Objects.requireNonNullElse(field1, new LinkedHashSet<>()); | ||
this.field2 = Objects.requireNonNullElse(field2, new LinkedHashSet<>()); | ||
this.field3 = Objects.requireNonNullElse(field3, new LinkedHashSet<>()); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
.../gen/java/main/com/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithSetFields.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,51 @@ | ||
/* | ||
* Example OpenAPI Spec. | ||
* An example OpenAPI-spec to generate example Java records. | ||
* | ||
* 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. | ||
* | ||
* This class was generated using custom mustache templates from | ||
* openapi-to-java-records-mustache-templates. For further information, | ||
* questions, requesting features or reporting issues, please visit: | ||
* https://github.com/Chrimle/openapi-to-java-records-mustache-templates. | ||
* Generated with Version: 1.6.0 | ||
* | ||
*/ | ||
|
||
package com.chrimle.example.useEnumCaseInsensitive; | ||
|
||
import java.util.Objects; | ||
import com.google.gson.TypeAdapter; | ||
import com.google.gson.annotations.JsonAdapter; | ||
import com.google.gson.annotations.SerializedName; | ||
import com.google.gson.stream.JsonReader; | ||
import com.google.gson.stream.JsonWriter; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.LinkedHashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* Example of a Record with Set fields | ||
* @param field1 a Set field | ||
* @param field2 another Set field | ||
* @param field3 yet another Set field | ||
*/ | ||
public record ExampleRecordWithSetFields( | ||
@javax.annotation.Nonnull Set<Boolean> field1, | ||
@javax.annotation.Nonnull Set<Boolean> field2, | ||
@javax.annotation.Nonnull Set<Boolean> field3) { | ||
|
||
public ExampleRecordWithSetFields( | ||
@javax.annotation.Nullable final Set<Boolean> field1, | ||
@javax.annotation.Nullable final Set<Boolean> field2, | ||
@javax.annotation.Nullable final Set<Boolean> field3) { | ||
this.field1 = Objects.requireNonNullElse(field1, new LinkedHashSet<>()); | ||
this.field2 = Objects.requireNonNullElse(field2, new LinkedHashSet<>()); | ||
this.field3 = Objects.requireNonNullElse(field3, new LinkedHashSet<>()); | ||
} | ||
} |