From a035fae877418db79b4b7e550af2d5ca40cbeabf Mon Sep 17 00:00:00 2001 From: Martin Schoene <martin.schoene@t-systems.com> Date: Thu, 2 Jul 2020 10:55:33 +0200 Subject: [PATCH] avoid 'servers not defined in the spec' warn-spam on maven console (#6837) --- .../main/java/org/openapitools/codegen/utils/URLPathUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java index d2babe91a0c..cbe94870103 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java @@ -210,7 +210,7 @@ public class URLPathUtils { once(LOGGER).warn("'scheme' not defined in the spec (2.0). Default to [http] for server URL [{}]", url); } else if (url.startsWith("/")) { url = LOCAL_HOST + url; - once(LOGGER).warn("'host' (OAS 2.0) or 'servers' (OAS 3.0) not defined in the spec. Default to [{}] for server URL [{}]", LOCAL_HOST, url); + once(LOGGER).info("'host' (OAS 2.0) or 'servers' (OAS 3.0) not defined in the spec. Default to [{}] for server URL [{}]", LOCAL_HOST, url); } else if (!url.matches("[a-zA-Z][0-9a-zA-Z.+\\-]+://.+")) { // Add http scheme for urls without a scheme. // 2.0 spec is restricted to the following schemes: "http", "https", "ws", "wss" -- GitLab