-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
106 lines (106 loc) · 3.21 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
swagger: "2.0"
info:
description: "A simple Google Cloud Endpoints API example."
title: "Endpoints Example"
version: "1.0.0"
host: "echo-api.endpoints.gsrc-lords.cloud.goog"
basePath: "/"
consumes:
- "application/json"
produces:
- "application/json"
schemes:
- "https"
paths:
"/echo":
get:
description: "Echo back a given message."
operationId: "echo"
produces:
- "application/json"
responses:
200:
description: "Echo"
schema:
$ref: "#/definitions/echoMessage"
# parameters:
# -
# description: "Message to echo"
# in: body
# name: message
# required: true
# schema:
# $ref: "#/definitions/echoMessage"
security:
- api_key: []
# "/auth/info/googlejwt":
# get:
# description: "Returns the requests' authentication information."
# operationId: "auth_info_google_jwt"
# produces:
# - "application/json"
# responses:
# 200:
# description: "Authenication info."
# schema:
# $ref: "#/definitions/authInfoResponse"
# security:
# - api_key: []
# google_jwt: []
# "/auth/info/googleidtoken":
# get:
# description: "Returns the requests' authentication information."
# operationId: "authInfoGoogleIdToken"
# produces:
# - "application/json"
# responses:
# 200:
# description: "Authenication info."
# schema:
# $ref: "#/definitions/authInfoResponse"
# security:
# - api_key: []
# google_id_token: []
definitions:
echoMessage:
properties:
message:
type: "string"
# authInfoResponse:
# properties:
# id:
# type: "string"
# email:
# type: "string"
#securityDefinitions:
# # This section configures basic authentication with an API key.
# api_key:
# type: "apiKey"
# name: "key"
# in: "query"
# # This section configures authentication using Google API Service Accounts
# # to sign a json web token. This is mostly used for server-to-server
# # communication.
# google_jwt:
# authorizationUrl: ""
# flow: "implicit"
# type: "oauth2"
# # This must match the 'iss' field in the JWT.
# x-google-issuer: "jwt-client.endpoints.sample.google.com"
# # Update this with your service account's email address.
# x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/jwk/YOUR-SERVICE-ACCOUNT-EMAIL"
# # This must match the "aud" field in the JWT. You can add multiple
# # audiences to accept JWTs from multiple clients.
# x-google-audiences: "echo.endpoints.sample.google.com"
# # This section configures authentication using Google OAuth2 ID Tokens.
# # ID Tokens can be obtained using OAuth2 clients, and can be used to access
# # your API on behalf of a particular user.
# google_id_token:
# authorizationUrl: ""
# flow: "implicit"
# type: "oauth2"
# x-google-issuer: "https://accounts.google.com"
# x-google-jwks_uri: "https://www.googleapis.com/oauth2/v3/certs"
# # Your OAuth2 client's Client ID must be added here. You can add
# # multiple client IDs to accept tokens from multiple clients.
# x-google-audiences: "YOUR-CLIENT-ID"