We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c864f1b + f5d2778 commit adf8dddCopy full SHA for adf8ddd
modules/swagger-core/src/main/java/io/swagger/jackson/ModelResolver.java
@@ -632,7 +632,14 @@ else if(PrimitiveType.fromType(type) != null) {
632
}
633
Class<?> not = schemaAnnotation.not();
634
if (!Void.class.equals(not)) {
635
- model.not((new Schema().$ref(context.resolve(not.getClass()).getName())));
+ model.not((new Schema().$ref(context.resolve(not).getName())));
636
+ }
637
+ if (schemaAnnotation.requiredProperties() != null &&
638
+ schemaAnnotation.requiredProperties().length > 0 &&
639
+ StringUtils.isNotBlank(schemaAnnotation.requiredProperties()[0])) {
640
+ for (String prop: schemaAnnotation.requiredProperties()) {
641
+ model.addRequiredItem(prop);
642
643
644
645
0 commit comments