@Nullable
	public static Boolean swaggerRequired(@Nullable io.swagger.v3.oas.annotations.media.Schema schema,
			@Nullable Parameter parameter) {
		if (parameter != null && parameter.required()) {
			return true;
		}
		if (schema != null) {
			if (schema.required()
					|| schema.requiredMode() == RequiredMode.REQUIRED) {
				return true;
			}
			if (schema.requiredMode() == RequiredMode.NOT_REQUIRED) {
				return false;
			}
		}
		return null;
	}
Is swagger required. it may return {@code null} if not specified require value or
mode

@param schema    the schema
@param parameter the parameter
@return the boolean or {@code null}
@see Parameter#required()
@see io.swagger.v3.oas.annotations.media.Schema#required()
@see io.swagger.v3.oas.annotations.media.Schema#requiredMode()
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SchemaUtils.java