If there is a yaml like this:
Then Validator must fail. Because schemes are parsed as []string{"/abc"}.
According to the example in the Server URL Format subsection of OpenAPI document, / /v1/reports are also legal URLs.
Although the scheme://host[:port][/path] above is inconsistent, many places that don't require scheme and host validation already use something like /path.
This place may need to be optimized https://github.com/getkin/kin-openapi/blob/v0.74.0/routers/gorillamux/router.go#L38
Additional:
If I don't want to verify the host now, I can change
to
servers:
- url: http:///abc
But if I want to not check scheme, there seems to be no way now?
If there is a yaml like this:
Then Validator must fail. Because schemes are parsed as
[]string{"/abc"}.According to the example in the
Server URL Formatsubsection of OpenAPI document,//v1/reportsare also legal URLs.This place may need to be optimized https://github.com/getkin/kin-openapi/blob/v0.74.0/routers/gorillamux/router.go#L38
Additional:
If I don't want to verify the host now, I can change
to
But if I want to not check scheme, there seems to be no way now?