Skip to content

Commit dd4f46f

Browse files
authored
Remove basePath: "/"
I'm updating all the openapi files in the getting-started sample in all the sample repos to remove basePath: "/" Here's the reason from simonz130: From the OpenAPI 2 spec: * basePath: "If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). " * Paths for methods: "A relative path to an individual endpoint. The field name MUST begin with a slash. The path is appended to the basePath in order to construct the full URL." This OpenAPI getting-started sample have basePath: "/", which (per strict spec interpretation) means all the paths start with double-slashes. (e.g "//v1/shelves" rather than "/v1/shelves"). Removing basepath="/" fixes that.
1 parent ef8c4dd commit dd4f46f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

endpoints/getting-started/openapi.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ info:
2020
version: "1.0.0"
2121
host: "echo-api.endpoints.YOUR-PROJECT-ID.cloud.goog"
2222
# [END swagger]
23-
basePath: "/"
2423
consumes:
2524
- "application/json"
2625
produces:

0 commit comments

Comments
 (0)