Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit df22328

Browse filesBrowse files
sepehreJon Wayne Parrott
authored andcommitted
Update Endpoints samples: (GoogleCloudPlatform#706)
1. Change default service names to the new cloud.goog format. 2. Change app.yaml beta_settings to endpoints_api_service.
1 parent ca2d5fc commit df22328
Copy full SHA for df22328

File tree

Expand file treeCollapse file tree

6 files changed

+21
-15
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+21
-15
lines changed

‎appengine/standard/endpoints-frameworks-v2/echo/README.md

Copy file name to clipboardExpand all lines: appengine/standard/endpoints-frameworks-v2/echo/README.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ Install the Endpoints Frameworks v2 library:
1313

1414
## Deploying to Google App Engine
1515

16-
Generate a swagger file by running: `python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com`
16+
Generate a swagger file by running: `python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog`
17+
18+
Remember to replace [YOUR-PROJECT-ID] with your project ID.
1719

1820
To set up OAuth2, replace `your-oauth-client-id.com` under `audiences` in the annotation for `get_user_email` with your OAuth2 client ID. If you want to use Google OAuth2 Playground, use `407408718192.apps.googleusercontent.com` as your audience. To generate a JWT, go to the following address: `https://developers.google.com/oauthplayground`.
1921

2022
Deploy the generated swagger spec to Google Cloud Service Management: `gcloud alpha service-management deploy echo-v1_swagger.json`
2123

22-
Open the `app.yaml` file and in the `env_variables` section, replace `your-service.appspot.com` with your service name, and `2016-08-01r0` with your uploaded service management configuration.
24+
The command returns several lines of information, including a line similar to the following:
25+
26+
Service Configuration [2016-08-01r0] uploaded for service "echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog"
27+
28+
Open the `app.yaml` file and in the `env_variables` section, replace [YOUR-PROJECT-ID] in `echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog` with your project ID. This is your Endpoints service name. Then replace `2016-08-01r0` with your uploaded service management configuration.
2329

2430
Then, deploy the sample using `gcloud`:
2531

‎appengine/standard/endpoints-frameworks-v2/echo/app.yaml

Copy file name to clipboardExpand all lines: appengine/standard/endpoints-frameworks-v2/echo/app.yaml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ libraries:
2626
version: 2.7.11
2727

2828
env_variables:
29-
# Replace with your endpoints service name.
30-
ENDPOINTS_SERVICE_NAME: your-service.appspot.com
31-
# Replace with the version Id of your uploaded Endpoints service.
29+
# The following values are to be replaced by information from the output of
30+
# 'gcloud service-management deploy swagger.json' command.
31+
ENDPOINTS_SERVICE_NAME: echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog
3232
ENDPOINTS_SERVICE_VERSION: 2016-08-01r0

‎appengine/standard/endpoints-frameworks-v2/quickstart/app.yaml

Copy file name to clipboardExpand all lines: appengine/standard/endpoints-frameworks-v2/quickstart/app.yaml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ libraries:
2222
version: 2.7.11
2323

2424
env_variables:
25-
# Replace with your Endpoints service name.
26-
ENDPOINTS_SERVICE_NAME: your-service.appspot.com
27-
# Replace with the version ID of your uploaded Endpoints service.
25+
# The following values are to be replaced by information from the output of
26+
# 'gcloud service-management deploy swagger.json' command.
27+
ENDPOINTS_SERVICE_NAME: greeting-api.endpoints.[YOUR-PROJECT-ID].cloud.goog
2828
ENDPOINTS_SERVICE_VERSION: 2016-08-01r0

‎endpoints/bookstore-grpc/api_config.yaml

Copy file name to clipboardExpand all lines: endpoints/bookstore-grpc/api_config.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ config_version: 3
2626
#
2727
# Name of the service configuration.
2828
#
29-
name: bookstore.<MY_PROJECT_ID>.appspot.com
29+
name: bookstore.endpoints.<MY_PROJECT_ID>.cloud.goog
3030

3131
#
3232
# API title to appear in the user interface (Google Cloud Console).

‎endpoints/getting-started/app.yaml

Copy file name to clipboardExpand all lines: endpoints/getting-started/app.yaml
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ entrypoint: gunicorn -b :$PORT main:app
55
runtime_config:
66
python_version: 3
77

8-
beta_settings:
9-
# Enable Google Cloud Endpoints API management.
10-
use_endpoints_api_management: true
11-
# Specify the Open API specification.
12-
endpoints_swagger_spec_file: openapi.yaml
8+
endpoints_api_service:
9+
# The following values are to be replaced by information from the output of
10+
# 'gcloud service-management deploy openapi.yaml' command.
11+
name: ENDPOINTS SERVICE-NAME
12+
config_id: ENDPOINTS CONFIG-ID

‎endpoints/getting-started/openapi.yaml

Copy file name to clipboardExpand all lines: endpoints/getting-started/openapi.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ info:
44
description: "A simple Google Cloud Endpoints API example."
55
title: "Endpoints Example"
66
version: "1.0.0"
7-
host: "YOUR-PROJECT-ID.appspot.com"
7+
host: "echo-api.endpoints.YOUR-PROJECT-ID.cloud.goog"
88
# [END swagger]
99
basePath: "/"
1010
consumes:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.