Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ handlers:
libraries:
- name: pycrypto
version: 2.6
- name: ssl
version: latest

# Endpoints Frameworks 2.0 uses background threads for caching and reporting to
# service management and service control.
manual_scaling:
instances: 1

beta_settings:
use_endpoints_api_management: true
endpoints_swagger_spec_file: echo-v1_swagger.json

env_variables:
# Replace with your endpoints service name.
ENDPOINTS_SERVICE_NAME: your-service.appspot.com
ENDPOINTS_SERVICE_NAME: my-service.appspot.com
# Replace with the version Id of your uploaded Endpoints service.
ENDPOINTS_SERVICE_VERSION: 2016-08-01r01
ENDPOINTS_SERVICE_VERSION: 2016-08-01r0
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"host": "my-service.appspot.com",
"basePath": "/_ah/api",
"consumes": [
"application/json"
],
"definitions": {
"MainEcho": {
"properties": {
"message": {
"type": "string"
}
},
"type": "object"
}
},
"info": {
"title": "echo",
"version": "v1"
},
"paths": {
"/echo/v1/echo": {
"post": {
"operationId": "EchoApi_echo",
"parameters": [],
"responses": {
"200": {
"description": "200_response",
"schema": {
"$ref": "#/definitions/MainEcho"
}
}
}
}
},
"/echo/v1/echo/getUserEmail": {
"get": {
"operationId": "EchoApi_getUserEmail",
"parameters": [],
"responses": {
"200": {
"description": "200_response",
"schema": {
"$ref": "#/definitions/MainEcho"
}
}
}
}
}
},
"produces": [
"application/json"
],
"schemes": [
"https"
],
"swagger": "2.0",
"x-security": [
{
"google_id_token": {
"audiences": [
"407408718192.apps.googleusercontent.com"
]
}
}
],
"securityDefinitions": {
"google_id_token": {
"authorizationUrl": "",
"flow": "implicit",
"type": "oauth2",
"x-issuer": "https://accounts.google.com",
"x-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ class Echo(messages.Message):


# [START echo_api]
@endpoints.api(name='echo', version='v1')
@endpoints.api(name='echo',
version='v1',
allowed_client_ids=[
endpoints.API_EXPLORER_CLIENT_ID,
'407408718192.apps.googleusercontent.com'
])
class EchoApi(remote.Service):

@endpoints.method(
Expand Down