protected boolean checkRequired(MemberScope<?, ?> member) {
        return this.getSchemaAnnotationValue(member,
                        schemaAnnotation -> schemaAnnotation.requiredMode() == Schema.RequiredMode.REQUIRED || schemaAnnotation.required(),
                        Boolean.TRUE::equals)
                .isPresent();
    }
Determine whether the given field/method is deemed required in its containing type based on {@code @Schema(required = true)}.

@param member field/method to check
@return whether the field/method is required
jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java