avoid 'servers not defined in the spec' warn-spam on maven console (#6837) (#6838)

This commit is contained in:
maschoene
2020-08-16 07:47:30 +02:00
committed by GitHub
parent 14c14bf9a2
commit f0e2e372db

View File

@@ -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"