Documentation
¶
Overview ¶
Package serverurl reads OpenAPI server URLs, which may be templates that url.Parse rejects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BasePath ¶
BasePath returns the path of an OpenAPI server URL, as url.Parse reports it.
A server variable in the scheme, host, or port (for example "https://{host}/api/v1") makes url.Parse fail, so the path is then read from after the host instead.
func TrimBasePath ¶ added in v0.16.3
TrimBasePath removes base from the start of path when base ends on a segment boundary, so a base of "/api" matches "/api" and "/api/pets" but not "/apistatus". It reports whether base matched.
Types ¶
This section is empty.