-
Notifications
You must be signed in to change notification settings - Fork 7
/
gendocu_apispec.yaml
32 lines (31 loc) · 1.7 KB
/
gendocu_apispec.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
spectype: gendocu
servers:
- selector: "*" # the * must be wrapped with ""
envs:
- name: "gcp" # the first environment is the default one
# proxy: your-rpc-invoker-instance-address # this is optional feature for private-only gRPC services
urls:
- grpcwebs://library-app-grpcweb-uqnits2f5q-uc.a.run.app
- grpcs://library-app-grpc-uqnits2f5q-uc.a.run.app:443
# - rests://library-app-grpc-uqnits2f5q-uc.a.run.app # rest API is not exposed in this environment
- name: "aws" # aws lambda doesn't support the grpc out of the box
urls:
- grpcwebs://t30z1m0w81.execute-api.us-east-1.amazonaws.com
securitySchemes:
- name: public
title: Public API
description: # you can also use the 'file:' instead of text to load a markdown from external file
text: The default authentication method - does not require any authentication. All the endpoints support anonymous users.
- name: token-private
title: Token Auth
description:
text: The standard token authentication. This authentication method is only for demo purposes - the backend ignores the token in the current implementation.
callAuthentication:
token: # e.g. HTTP Header "Authorization: Bearer aaa.bbbbbbb.ccc"
exampleValue: "aaa.bbbbbbb.ccc" # this value should be shared across all the schemes. It should have exactly the same scheme for each protocol - if it differs, then it should be separate authentication method
grpc:
meta: "x-authorization"
valuePrefix: "bearer " # including whitespaces, the prefix for each value
grpcweb:
header: "authorization"
valuePrefix: "Bearer " # including whitespaces, the prefix for each value