forked from googleapis/gapic-generator-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgapic_metadata.json.j2
More file actions
41 lines (41 loc) · 1.79 KB
/
gapic_metadata.json.j2
File metadata and controls
41 lines (41 loc) · 1.79 KB
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
{
"schema": "1.0",
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "python",
"protoPackage": "{{ api.naming.proto_package }}",
"libraryPackage": "{{ '.'.join(api.naming.module_namespace+(api.naming.versioned_module_name,)) }}",
"services": {
{% for service in api.services.values()|sort(attribute='name') -%}
"{{ service.name }}":{
{% if 'grpc' in opts.transport -%}
"grpc": {
"libraryClient": "{{ service.client_name }}",
"rpcs": {
{% for method in service.methods.values() -%}
"{{ method.name }}": ["{{ method.name|snake_case }}"]{{ "," if not loop.last else "" }}
{% endfor -%}{# method -#}
}
},
"grpcAsync": {
"libraryClient": "{{ service.async_client_name }}",
"rpcs": {
{% for method in service.methods.values() -%}
"{{ method.name }}": ["{{ method.name|snake_case }}"]{{ "," if not loop.last else "" }}
{% endfor -%}{# method -#}
}
}{{ "," if 'rest' in opts.transport else "" -}}
{% endif -%}
{% if 'rest' in opts.transport -%}
"rest": {
"libraryClient": "{{ service.client_name }}",
"rpcs": {
{% for method in service.methods.values() -%}
"{{ method.name }}": ["{{ method.name|snake_case }}"]{{ "," if not loop.last else "" }}
{% endfor -%}{# method -#}
}
}
{% endif -%}{# opts.transport #}
}{{ "," if not loop.last else "" }}
{% endfor -%}{# service -#}
}
}