diff --git a/README.md b/README.md index ca701256..72908e31 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The mustache templates can be acquired through multiple ways. io.github.chrimle openapi-to-java-records-mustache-templates - 2.2.1 + 2.3.0 ``` diff --git a/docs/index.md b/docs/index.md index 1485c60b..c304f3b9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ The mustache templates can be acquired through multiple ways. io.github.chrimle openapi-to-java-records-mustache-templates - 2.2.1 + 2.3.0 ``` diff --git a/pom.xml b/pom.xml index 803872d0..55e8ca0f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.github.chrimle openapi-to-java-records-mustache-templates - 2.2.1 + 2.3.0 OpenAPI to Java records :: Mustache Templates diff --git a/src/main/java/io/github/chrimle/example/annotations/TestExtraAnnotation.java b/src/main/java/io/github/chrimle/example/annotations/TestExtraAnnotation.java new file mode 100644 index 00000000..fdd071e2 --- /dev/null +++ b/src/main/java/io/github/chrimle/example/annotations/TestExtraAnnotation.java @@ -0,0 +1,10 @@ +package io.github.chrimle.example.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface TestExtraAnnotation {} diff --git a/src/main/java/io/github/chrimle/example/annotations/TestExtraAnnotationTwo.java b/src/main/java/io/github/chrimle/example/annotations/TestExtraAnnotationTwo.java new file mode 100644 index 00000000..a4e6a92a --- /dev/null +++ b/src/main/java/io/github/chrimle/example/annotations/TestExtraAnnotationTwo.java @@ -0,0 +1,10 @@ +package io.github.chrimle.example.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface TestExtraAnnotationTwo {} diff --git a/src/main/resources/api.yaml b/src/main/resources/api.yaml index 65c34a71..2900af74 100644 --- a/src/main/resources/api.yaml +++ b/src/main/resources/api.yaml @@ -118,6 +118,24 @@ components: field1: type: boolean description: a boolean field + ExampleRecordWithOneExtraAnnotation: + type: object + description: Example of a Record with an extra annotation + x-class-extra-annotation: '@io.github.chrimle.example.annotations.TestExtraAnnotation' + properties: + field1: + type: boolean + description: a boolean field + ExampleRecordWithTwoExtraAnnotations: + type: object + description: Example of a Record with two extra annotations + x-class-extra-annotation: |- + @io.github.chrimle.example.annotations.TestExtraAnnotation + @io.github.chrimle.example.annotations.TestExtraAnnotationTwo + properties: + field1: + type: boolean + description: a boolean field ExampleRecordWithDefaultFields: type: object description: Example of a Record with default fields diff --git a/src/main/resources/templates/generateBuilders.mustache b/src/main/resources/templates/generateBuilders.mustache index fad758ef..eaa3e543 100644 --- a/src/main/resources/templates/generateBuilders.mustache +++ b/src/main/resources/templates/generateBuilders.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is a custom template, and is used by `pojo.mustache`. diff --git a/src/main/resources/templates/javadoc.mustache b/src/main/resources/templates/javadoc.mustache index 3492c418..e67d8627 100644 --- a/src/main/resources/templates/javadoc.mustache +++ b/src/main/resources/templates/javadoc.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is a custom template, and is used by `pojo.mustache` and `modelEnum.mustache`. diff --git a/src/main/resources/templates/licenseInfo.mustache b/src/main/resources/templates/licenseInfo.mustache index ea690bd6..452f9147 100644 --- a/src/main/resources/templates/licenseInfo.mustache +++ b/src/main/resources/templates/licenseInfo.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is overriding an official 'openapi-generator-maven-plugin' template. @@ -33,6 +33,6 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ \ No newline at end of file diff --git a/src/main/resources/templates/modelEnum.mustache b/src/main/resources/templates/modelEnum.mustache index ad78109f..05c6d6bb 100644 --- a/src/main/resources/templates/modelEnum.mustache +++ b/src/main/resources/templates/modelEnum.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is overriding an official 'openapi-generator-maven-plugin' template. diff --git a/src/main/resources/templates/pojo.mustache b/src/main/resources/templates/pojo.mustache index 080c8f21..f486b647 100644 --- a/src/main/resources/templates/pojo.mustache +++ b/src/main/resources/templates/pojo.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is overriding an official 'openapi-generator-maven-plugin' template. @@ -30,6 +30,9 @@ }}{{#isDeprecated}}@Deprecated {{/isDeprecated}}{{! }}{{>additionalModelTypeAnnotations}}{{! +}}{{#vendorExtensions.x-class-extra-annotation}}{{! + }}{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}}{{! }}public record {{classname}}( {{#vars}}@{{javaxPackage}}.annotation.{{#isNullable}}Nullable{{/isNullable}}{{^isNullable}}Nonnull{{/isNullable}}{{>useBeanValidation}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vars}}{{^serializableModel}}){{/serializableModel}}{{#serializableModel}} diff --git a/src/main/resources/templates/serializableModel.mustache b/src/main/resources/templates/serializableModel.mustache index 58ca18d9..db65b653 100644 --- a/src/main/resources/templates/serializableModel.mustache +++ b/src/main/resources/templates/serializableModel.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is a custom template, and is used by `pojo.mustache`. diff --git a/src/main/resources/templates/useBeanValidation.mustache b/src/main/resources/templates/useBeanValidation.mustache index 768deae4..5fe35f91 100644 --- a/src/main/resources/templates/useBeanValidation.mustache +++ b/src/main/resources/templates/useBeanValidation.mustache @@ -15,7 +15,7 @@ }}{{! Source: openapi-to-java-records-mustache-templates - Version: 2.2.1 + Version: 2.3.0 This template is a custom template, and is used by `pojo.mustache`. diff --git a/src/test/java/io/github/chrimle/example/GeneratedSource.java b/src/test/java/io/github/chrimle/example/GeneratedSource.java index 1c8f1ff6..5e0063dd 100644 --- a/src/test/java/io/github/chrimle/example/GeneratedSource.java +++ b/src/test/java/io/github/chrimle/example/GeneratedSource.java @@ -19,7 +19,9 @@ import io.github.chrimle.example.models.GeneratedClass; import io.github.chrimle.example.models.GeneratedField; import io.github.chrimle.example.utils.AssertionUtils; +import java.lang.annotation.Annotation; import java.util.Arrays; +import java.util.List; /** * Represents a generated source, which contains: @@ -93,6 +95,14 @@ public boolean isDeprecated() { return generatedClass.isDeprecated(); } + public boolean hasExtraAnnotations() { + return generatedClass.hasExtraAnnotations(); + } + + public List> getExtraAnnotations() { + return generatedClass.getExtraAnnotations(); + } + public Class[] fieldClasses() { return Arrays.stream(generatedFields).map(GeneratedField::type).toArray(Class[]::new); } diff --git a/src/test/java/io/github/chrimle/example/models/GeneratedClass.java b/src/test/java/io/github/chrimle/example/models/GeneratedClass.java index 5d204bf8..3f26ef2d 100644 --- a/src/test/java/io/github/chrimle/example/models/GeneratedClass.java +++ b/src/test/java/io/github/chrimle/example/models/GeneratedClass.java @@ -17,6 +17,8 @@ package io.github.chrimle.example.models; import io.github.chrimle.example.PluginExecution; +import java.lang.annotation.Annotation; +import java.util.List; /** * Enum class listing all expected classes ({@code record}s and {@code enum}s) to be generated from @@ -35,8 +37,8 @@ public interface GeneratedClass { String getSimpleClassName(); /** - * Whether the class is marked as deprecated. If {@code true}, the class should be annotated with - * {@link Deprecated}. + * Whether the class is marked as deprecated, set by the property {@code deprecated}. If {@code + * true}, the class should be annotated with {@link Deprecated}. * * @return whether the class is deprecated. */ @@ -50,9 +52,29 @@ public interface GeneratedClass { */ boolean isEnum(); + /** + * Whether the class has extra {@link Annotation}s, set by the {@code x-class-extra-annotation} + * property. + * + *

NOTE: this property does not support {@code enum} classes. + * + * @return whether the class has extra annotations. + */ + boolean hasExtraAnnotations(); + + /** + * Returns the collection of extra {@link Annotation}s, set by the {@code + * x-class-extra-annotation} property. + * + *

NOTE: this property does not support {@code enum} classes. + * + * @return the collection of annotations. + */ + List> getExtraAnnotations(); + /** * Returns the collection of {@link GeneratedField}s which are expected to be generated within the - * class. + * class. Corresponds to each {@code properties}-item. * * @return the collection of generatedFields. */ diff --git a/src/test/java/io/github/chrimle/example/models/GeneratedEnum.java b/src/test/java/io/github/chrimle/example/models/GeneratedEnum.java index f78eb8e4..1b27cfc2 100644 --- a/src/test/java/io/github/chrimle/example/models/GeneratedEnum.java +++ b/src/test/java/io/github/chrimle/example/models/GeneratedEnum.java @@ -16,6 +16,9 @@ */ package io.github.chrimle.example.models; +import java.lang.annotation.Annotation; +import java.util.List; + /** Enum class listing all expected {@code enum} classes to be generated from the OpenAPI spec. */ public enum GeneratedEnum implements GeneratedClass { DEPRECATED_EXAMPLE_ENUM( @@ -94,6 +97,26 @@ public boolean isEnum() { return true; } + /** + * {@inheritDoc} + * + * @return whether the class has extra annotations. + */ + @Override + public boolean hasExtraAnnotations() { + return false; + } + + /** + * {@inheritDoc} + * + * @return the collection of annotations. + */ + @Override + public List> getExtraAnnotations() { + return List.of(); + } + /** * {@inheritDoc} * diff --git a/src/test/java/io/github/chrimle/example/models/GeneratedRecord.java b/src/test/java/io/github/chrimle/example/models/GeneratedRecord.java index 10fbefda..07919cbf 100644 --- a/src/test/java/io/github/chrimle/example/models/GeneratedRecord.java +++ b/src/test/java/io/github/chrimle/example/models/GeneratedRecord.java @@ -16,6 +16,9 @@ */ package io.github.chrimle.example.models; +import io.github.chrimle.example.annotations.TestExtraAnnotation; +import io.github.chrimle.example.annotations.TestExtraAnnotationTwo; +import java.lang.annotation.Annotation; import java.math.BigDecimal; import java.util.List; import java.util.Set; @@ -24,15 +27,31 @@ /** Enum class listing all expected {@code record} classes to be generated from the OpenAPI spec. */ public enum GeneratedRecord implements GeneratedClass { DEPRECATED_EXAMPLE_RECORD( - "DeprecatedExampleRecord", true, GeneratedField.of("field1", Boolean.class).build()), - EXAMPLE_RECORD("ExampleRecord", false, GeneratedField.of("field1", Boolean.class).build()), + "DeprecatedExampleRecord", + true, + List.of(), + GeneratedField.of("field1", Boolean.class).build()), + EXAMPLE_RECORD( + "ExampleRecord", false, List.of(), GeneratedField.of("field1", Boolean.class).build()), EXAMPLE_RECORD_WITH_DEFAULT_FIELDS( "ExampleRecordWithDefaultFields", false, + List.of(), GeneratedField.of("field1", String.class).defaultValue("someDefaultValue").build()), + EXAMPLE_RECORD_WITH_ONE_EXTRA_ANNOTATION( + "ExampleRecordWithOneExtraAnnotation", + false, + List.of(TestExtraAnnotation.class), + GeneratedField.of("field1", Boolean.class).build()), + EXAMPLE_RECORD_WITH_TWO_EXTRA_ANNOTATIONS( + "ExampleRecordWithTwoExtraAnnotations", + false, + List.of(TestExtraAnnotation.class, TestExtraAnnotationTwo.class), + GeneratedField.of("field1", Boolean.class).build()), EXAMPLE_RECORD_WITH_NULLABLE_FIELDS_OF_EACH_TYPE( "ExampleRecordWithNullableFieldsOfEachType", false, + List.of(), GeneratedField.of("field1", Boolean.class).isNullable(true).build(), GeneratedField.of("field2", String.class).isNullable(true).build(), GeneratedField.of("field3", Integer.class).isNullable(true).build(), @@ -45,10 +64,11 @@ public enum GeneratedRecord implements GeneratedClass { * io.github.chrimle.example.TestSuite}. */ EXAMPLE_RECORD_WITH_REQUIRED_FIELDS_OF_EACH_TYPE( - "ExampleRecordWithRequiredFieldsOfEachType", false), + "ExampleRecordWithRequiredFieldsOfEachType", false, List.of()), RECORD_WITH_ALL_CONSTRAINTS( "RecordWithAllConstraints", false, + List.of(), GeneratedField.of("stringStandard", String.class).build(), GeneratedField.of("stringDefault", String.class).defaultValue("someDefaultValue").build(), GeneratedField.of("stringNullable", String.class).isNullable(true).build(), @@ -83,18 +103,23 @@ public enum GeneratedRecord implements GeneratedClass { * does not list all expected fields to be generated. This is done in {@link * io.github.chrimle.example.TestSuite}. */ - RECORD_WITH_INNER_ENUMS("RecordWithInnerEnums", false); + RECORD_WITH_INNER_ENUMS("RecordWithInnerEnums", false, List.of()); private final String simpleClassName; private final boolean isDeprecated; + private final boolean hasExtraAnnotations; + private final List> extraAnnotations; private final GeneratedField[] generatedFields; GeneratedRecord( final String simpleClassName, final boolean isDeprecated, + final List> extraAnnotations, final GeneratedField... generatedFields) { this.simpleClassName = simpleClassName; this.isDeprecated = isDeprecated; + this.hasExtraAnnotations = !extraAnnotations.isEmpty(); + this.extraAnnotations = extraAnnotations; this.generatedFields = generatedFields; } @@ -137,4 +162,24 @@ public boolean isEnum() { public GeneratedField[] getGeneratedFields() { return generatedFields; } + + /** + * {@inheritDoc} + * + * @return whether the class has extra annotations. + */ + @Override + public boolean hasExtraAnnotations() { + return hasExtraAnnotations; + } + + /** + * {@inheritDoc} + * + * @return the collection of annotations. + */ + @Override + public List> getExtraAnnotations() { + return extraAnnotations; + } } diff --git a/src/test/java/io/github/chrimle/example/utils/AssertionUtils.java b/src/test/java/io/github/chrimle/example/utils/AssertionUtils.java index 4a41a36e..0678ca25 100644 --- a/src/test/java/io/github/chrimle/example/utils/AssertionUtils.java +++ b/src/test/java/io/github/chrimle/example/utils/AssertionUtils.java @@ -73,7 +73,7 @@ private static void assertClassIsAnnotatedWith( } } - private static void assertClassIsAnnotatedWith(final Class clazz, final Class annotation) { + static void assertClassIsAnnotatedWith(final Class clazz, final Class annotation) { Assertions.assertTrue( Arrays.stream(clazz.getAnnotations()) .map(Annotation::annotationType) @@ -81,8 +81,7 @@ private static void assertClassIsAnnotatedWith(final Class clazz, final Class clazz.getCanonicalName() + " is NOT annotated with " + annotation.getCanonicalName()); } - private static void assertClassIsNotAnnotatedWith( - final Class clazz, final Class annotation) { + static void assertClassIsNotAnnotatedWith(final Class clazz, final Class annotation) { Assertions.assertTrue( Arrays.stream(clazz.getAnnotations()) .map(Annotation::annotationType) diff --git a/src/test/java/io/github/chrimle/example/utils/GeneratedRecordTestUtils.java b/src/test/java/io/github/chrimle/example/utils/GeneratedRecordTestUtils.java index 8497aef9..faa77211 100644 --- a/src/test/java/io/github/chrimle/example/utils/GeneratedRecordTestUtils.java +++ b/src/test/java/io/github/chrimle/example/utils/GeneratedRecordTestUtils.java @@ -17,7 +17,10 @@ package io.github.chrimle.example.utils; import io.github.chrimle.example.GeneratedSource; +import io.github.chrimle.example.annotations.TestExtraAnnotation; +import io.github.chrimle.example.annotations.TestExtraAnnotationTwo; import io.github.chrimle.example.models.GeneratedField; +import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.math.BigDecimal; import java.util.ArrayList; @@ -40,6 +43,7 @@ public static void assertRecord(final GeneratedSource generatedSource) { classUnderTest, generatedSource.isDeprecated()); AssertionUtils.assertClassIsAnnotatedWithAdditionalTypeAnnotations( classUnderTest, generatedSource.hasAdditionalModelTypeAnnotations()); + assertClassIsAnnotatedWithExtraAnnotation(generatedSource); AssertionUtils.assertModelIsSerializable(generatedSource); AssertionUtils.assertRecordHasFieldsOfTypeWithNullableAnnotations(generatedSource); AssertionUtils.assertClassImplementsSerializable(generatedSource); @@ -72,6 +76,19 @@ public static void assertRecord(final GeneratedSource generatedSource) { } } + private static void assertClassIsAnnotatedWithExtraAnnotation( + final GeneratedSource generatedSource) { + final Class classUnderTest = generatedSource.getClassUnderTest(); + if (generatedSource.hasExtraAnnotations()) { + for (final Class annotation : generatedSource.getExtraAnnotations()) { + AssertionUtils.assertClassIsAnnotatedWith(classUnderTest, annotation); + } + } else { + AssertionUtils.assertClassIsNotAnnotatedWith(classUnderTest, TestExtraAnnotation.class); + AssertionUtils.assertClassIsNotAnnotatedWith(classUnderTest, TestExtraAnnotationTwo.class); + } + } + private static void assertFieldHasEitherNullOrDefaultValueSet( GeneratedField generatedField, Object object) { AssertionUtils.assertInstanceMethodReturns( diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleEnum.java index 382e7d9b..7464123b 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleRecord.java index 19233620..2e7070a2 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnum.java index 74e5e3f1..9f2e4a8d 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnumWithIntegerValues.java index f841ab7d..12d5bb69 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecord.java index 43bc254f..cc0555e1 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithDefaultFields.java index 5c6f931a..b2bf8c27 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java index ccd89709..d22885b2 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..691aae86 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,43 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java index 631d1b73..92b09591 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..9ecc78f9 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,44 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithAllConstraints.java index a087c9c6..89a4fec1 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithInnerEnums.java index 236f7c74..3f48fcb1 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalEnumTypeAnnotations/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleEnum.java index d9dcb3a1..18270945 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleRecord.java index b9e030b1..7a1dd1f8 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnum.java index f512786b..b4dd5ad5 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnumWithIntegerValues.java index e9d323f5..fca03e6e 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecord.java index 7399e292..41e5caa2 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithDefaultFields.java index 705d32cb..a94fd023 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java index e91dafbc..12bb09b4 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..1750cea5 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,46 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestAnnotationOne +@io.github.chrimle.example.annotations.TestAnnotationTwo +@io.github.chrimle.example.annotations.TestAnnotationThree +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java index 8e9d4385..153c9649 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..8c1e069b --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,47 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestAnnotationOne +@io.github.chrimle.example.annotations.TestAnnotationTwo +@io.github.chrimle.example.annotations.TestAnnotationThree +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithAllConstraints.java index 647b161d..ecbac3bd 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithInnerEnums.java index 1cdb37d4..dad2152c 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/additionalModelTypeAnnotations/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleEnum.java index a0a313dd..172b7619 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleRecord.java index e50d5045..0e1f5ab1 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnum.java index 72ad7a7d..9d8c198f 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnumWithIntegerValues.java index b1b6f92a..a0ac5562 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecord.java index 3194fd9e..e9c33525 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithDefaultFields.java index 53c718e6..14185699 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithNullableFieldsOfEachType.java index 3aaf4725..70f4d81f 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..26fda56a --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,79 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.chrimle.example.generateBuilders; + +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; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } + + /** Builder class for {@link ExampleRecordWithOneExtraAnnotation } */ + public static class Builder { + + private Boolean field1; + + /** + * Sets the value of {@link ExampleRecordWithOneExtraAnnotation#field1 }. + * + *

NOTE: Pass-by-reference is used! + * @param field1 a boolean field + * @return this {@link Builder}-instance for method-chaining + */ + public Builder field1(final Boolean field1) { + this.field1 = field1; + return this; + } + + /** + * Builds a {@link ExampleRecordWithOneExtraAnnotation }-instance with the values provided in preceding + * builder methods. + * + *

NOTE: Pass-by-reference is used! + * @return a new {@link ExampleRecordWithOneExtraAnnotation }-instance + */ + public ExampleRecordWithOneExtraAnnotation build() { + return new ExampleRecordWithOneExtraAnnotation( + field1 + ); + } + } + + /** Creates a {@link Builder}-instance. */ + public static ExampleRecordWithOneExtraAnnotation.Builder builder() { + return new ExampleRecordWithOneExtraAnnotation.Builder(); + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithRequiredFieldsOfEachType.java index ed9c95ec..1d6481c3 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..c6d5a73e --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,80 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.chrimle.example.generateBuilders; + +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; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } + + /** Builder class for {@link ExampleRecordWithTwoExtraAnnotations } */ + public static class Builder { + + private Boolean field1; + + /** + * Sets the value of {@link ExampleRecordWithTwoExtraAnnotations#field1 }. + * + *

NOTE: Pass-by-reference is used! + * @param field1 a boolean field + * @return this {@link Builder}-instance for method-chaining + */ + public Builder field1(final Boolean field1) { + this.field1 = field1; + return this; + } + + /** + * Builds a {@link ExampleRecordWithTwoExtraAnnotations }-instance with the values provided in preceding + * builder methods. + * + *

NOTE: Pass-by-reference is used! + * @return a new {@link ExampleRecordWithTwoExtraAnnotations }-instance + */ + public ExampleRecordWithTwoExtraAnnotations build() { + return new ExampleRecordWithTwoExtraAnnotations( + field1 + ); + } + } + + /** Creates a {@link Builder}-instance. */ + public static ExampleRecordWithTwoExtraAnnotations.Builder builder() { + return new ExampleRecordWithTwoExtraAnnotations.Builder(); + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithAllConstraints.java index d5044871..ca736f7a 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithInnerEnums.java index 1ab5d737..2b7ce663 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/generateBuilders/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleEnum.java index 992de1e1..a683c41c 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleRecord.java index 0484061c..b0834449 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnum.java index b5909a85..f7fdc594 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnumWithIntegerValues.java index 9f6ac5d2..2d98adcd 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecord.java index 01556838..ff3fa871 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithDefaultFields.java index e140a243..5a4f29dd 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithNullableFieldsOfEachType.java index 99050ec3..f5dc9094 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..08a64cf4 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,47 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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.io.Serializable; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1 + ) implements Serializable { + + private static final long serialVersionUID = 1L; + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithRequiredFieldsOfEachType.java index f900fdc7..ab56b8b7 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..ddadec90 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,48 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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.io.Serializable; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1 + ) implements Serializable { + + private static final long serialVersionUID = 1L; + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithAllConstraints.java index 6699ecf8..6f222582 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithInnerEnums.java index 7402fc3f..8dc6b898 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/serializableModel/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleEnum.java index 207945f1..ebcc8c4f 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleRecord.java index 65ab77f8..97e7b026 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnum.java index 1b8db72c..5341f325 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnumWithIntegerValues.java index cffce471..c0a8c8b4 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecord.java index 7a0d0976..6dea05ae 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithDefaultFields.java index 881aad59..030bc5f3 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithNullableFieldsOfEachType.java index eb0e3bbe..53a1d7c6 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..afac3132 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,43 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithRequiredFieldsOfEachType.java index 61be4899..fd9ace0c 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..a014684e --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,44 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithAllConstraints.java index e7f0c16b..f83841a3 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithInnerEnums.java index 4133fa13..77115396 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/standard/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleEnum.java index fce76a31..aeb68662 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleRecord.java index 096805e4..e4b80556 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnum.java index a98f0495..096640b5 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnumWithIntegerValues.java index 16684dd6..1d789de9 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecord.java index 77b1a28b..84a1b251 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithDefaultFields.java index fc322594..eb5c33db 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithNullableFieldsOfEachType.java index 2ad188ee..c0837606 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..de10f0b4 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,45 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.chrimle.example.useBeanValidation; + +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 jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithRequiredFieldsOfEachType.java index 5ef125e9..609d18b3 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..75dce8c4 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,46 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.chrimle.example.useBeanValidation; + +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 jakarta.validation.constraints.*; +import jakarta.validation.Valid; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithAllConstraints.java index 3e769209..b1926f18 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithInnerEnums.java index 02acb9c8..3e610a48 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useBeanValidation/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleEnum.java index a59caaeb..efa321e1 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleRecord.java index a0fa0b4f..7d0ddde9 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnum.java index aa1b7fc2..8f75b373 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnumWithIntegerValues.java index b8930baa..87742bd4 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecord.java index 1dbee683..b6d970c2 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithDefaultFields.java index 4e2a2024..29a09cb2 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithNullableFieldsOfEachType.java index 6bfce350..08e133a7 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..34dd7dcb --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,43 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithRequiredFieldsOfEachType.java index c1456d5b..e38a6857 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..438d2d61 --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,44 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.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; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @javax.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithAllConstraints.java index 1eb04c3a..b041ab0f 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithInnerEnums.java index a279ac79..9ce528bd 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useEnumCaseInsensitive/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleEnum.java index dd8f7050..4a989188 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleRecord.java index 822808eb..0ca462d8 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/DeprecatedExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnum.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnum.java index b64fb780..e84c977d 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnum.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnum.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnumWithIntegerValues.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnumWithIntegerValues.java index 1255278b..6fa8e8e6 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnumWithIntegerValues.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleEnumWithIntegerValues.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecord.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecord.java index 17615be7..aeb11f82 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecord.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecord.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithDefaultFields.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithDefaultFields.java index acc50fea..ea105707 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithDefaultFields.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithDefaultFields.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithNullableFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithNullableFieldsOfEachType.java index cf15ec8f..44c3e03b 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithNullableFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithNullableFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithOneExtraAnnotation.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithOneExtraAnnotation.java new file mode 100644 index 00000000..d836a08c --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithOneExtraAnnotation.java @@ -0,0 +1,43 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.chrimle.example.useJakartaEe; + +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; + +/** + * Example of a Record with an extra annotation + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +public record ExampleRecordWithOneExtraAnnotation( + @jakarta.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithOneExtraAnnotation( + @jakarta.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithRequiredFieldsOfEachType.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithRequiredFieldsOfEachType.java index dc3d39b6..bdf2f909 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithRequiredFieldsOfEachType.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithRequiredFieldsOfEachType.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithTwoExtraAnnotations.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithTwoExtraAnnotations.java new file mode 100644 index 00000000..56e3e9fc --- /dev/null +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/ExampleRecordWithTwoExtraAnnotations.java @@ -0,0 +1,44 @@ +/* + * 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: 2.3.0 + * + */ + +package io.github.chrimle.example.useJakartaEe; + +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; + +/** + * Example of a Record with two extra annotations + * + * @param field1 a boolean field + */ +@io.github.chrimle.example.annotations.TestExtraAnnotation +@io.github.chrimle.example.annotations.TestExtraAnnotationTwo +public record ExampleRecordWithTwoExtraAnnotations( + @jakarta.annotation.Nonnull Boolean field1) { + + public ExampleRecordWithTwoExtraAnnotations( + @jakarta.annotation.Nonnull final Boolean field1) { + this.field1 = field1; + } +} diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithAllConstraints.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithAllConstraints.java index 1d7dfad8..9c2b0c59 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithAllConstraints.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithAllConstraints.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */ diff --git a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithInnerEnums.java b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithInnerEnums.java index 9933cecb..fdbf34d1 100644 --- a/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithInnerEnums.java +++ b/target/generated-sources/openapi/src/src/gen/java/main/io/github/chrimle/example/useJakartaEe/RecordWithInnerEnums.java @@ -12,7 +12,7 @@ * 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: 2.2.1 + * Generated with Version: 2.3.0 * */