diff --git a/spring-web/src/main/java/com/webcohesion/enunciate/modules/spring_web/model/SimpleRequestParameter.java b/spring-web/src/main/java/com/webcohesion/enunciate/modules/spring_web/model/SimpleRequestParameter.java index 4268ae8cf..cf651127c 100644 --- a/spring-web/src/main/java/com/webcohesion/enunciate/modules/spring_web/model/SimpleRequestParameter.java +++ b/spring-web/src/main/java/com/webcohesion/enunciate/modules/spring_web/model/SimpleRequestParameter.java @@ -199,6 +199,10 @@ public SimpleRequestParameter(Element declaration, PathContext context, Resource } DecoratedTypeMirror parameterType = loadType(); + if (parameterType.isInstanceOf("java.util.Optional")) { + required = false; + } + this.multivalued = parameterType.isArray() || parameterType.isCollection() || parameterType.isStream(); this.parameterName = parameterName;