go-openapi / spec

openapi specification object model
Apache License 2.0
389 stars 98 forks source link

preserve url.Parse behaviour before go1.19 #158

Closed zhsj closed 2 years ago

zhsj commented 2 years ago

Closes: #157

Signed-off-by: Shengjing Zhu zhsj@debian.org

youyuanwu commented 2 years ago

From go1.19 documentation: " net/url

The URL type now distinguishes between URLs with no authority and URLs with an empty authority. For example, http:///path has an empty authority (host), while http:/path has none.

The new URL field OmitHost is set to true when a URL has an empty authority. " This preserves the old behavior.