From 9828724f0e5929da8aa21e16183ad909883b1348 Mon Sep 17 00:00:00 2001 From: navinger Date: Fri, 6 Apr 2018 13:07:02 -0700 Subject: [PATCH] Remove basePath: "/" (#589) 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. --- endpoints/getting-started/openapi-appengine.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/endpoints/getting-started/openapi-appengine.yaml b/endpoints/getting-started/openapi-appengine.yaml index 96fe0fc854..bd4abb399e 100644 --- a/endpoints/getting-started/openapi-appengine.yaml +++ b/endpoints/getting-started/openapi-appengine.yaml @@ -6,7 +6,6 @@ info: version: "1.0.0" host: "YOUR-PROJECT-ID.appspot.com" # [END swagger] -basePath: "/" consumes: - "application/json" produces: