Skip to content

Commit 98985aa

Browse files
author
Kaleidox
committed
parameter is not required when annotated as Nullable
1 parent a4f0c32 commit 98985aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/comroid/interaction/annotation/Parameter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ record Resolved(String value, @Nullable String description, boolean required, Co
4040
public static Resolved of(Element element) {
4141
return new Resolved(RegistryHelper.findName(element).orElseThrow(),
4242
RegistryHelper.findDescription(element.annotated).orElse(null),
43-
element.parameter.required(),
43+
element.parameter.required() || element.annotated.isAnnotationPresent(Nullable.class),
4444
Optional.of(element.annotated.getType())
4545
.filter(Class::isEnum)
4646
.map(eType -> Arrays.stream(eType.getEnumConstants()).flatMap(Streams.cast(Enum.class)).map(Enum::name).toArray(String[]::new))

0 commit comments

Comments
 (0)