Skip to content

Commit 31f486b

Browse files
committed
required when used on generic type (openapi-processor/openapi-processor-spring#350)
(cherry picked from commit 6e40ed6)
1 parent 6959547 commit 31f486b

File tree

3 files changed

+3
-3
lines changed
  • openapi-processor-core/src

3 files changed

+3
-3
lines changed

openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/writer/java/StringValuesWriter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class StringValuesWriter(
3333
target.write("\n")
3434

3535
target.write("""
36-
@Target({ElementType.FIELD, ElementType.PARAMETER})
36+
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE_USE})
3737
@Retention(RetentionPolicy.RUNTIME)
3838
@Constraint(validatedBy = ValueValidator.class)
3939
@Documented

openapi-processor-core/src/testInt/resources/tests/packages/outputs/io/openapiprocessor/openapi/validation/Values.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import javax.validation.Constraint;
66
import javax.validation.Payload;
77

8-
@Target({ElementType.FIELD, ElementType.PARAMETER})
8+
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE_USE})
99
@Retention(RetentionPolicy.RUNTIME)
1010
@Constraint(validatedBy = ValueValidator.class)
1111
@Documented

openapi-processor-core/src/testInt/resources/tests/params-enum-string/outputs/validation/Values.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import jakarta.validation.Payload;
66
import java.lang.annotation.*;
77

8-
@Target({ElementType.FIELD, ElementType.PARAMETER})
8+
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE_USE})
99
@Retention(RetentionPolicy.RUNTIME)
1010
@Constraint(validatedBy = ValueValidator.class)
1111
@Documented

0 commit comments

Comments
 (0)