-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathservice-registry.yaml
200 lines (196 loc) · 7.41 KB
/
service-registry.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
openapi: 3.0.2
info:
title: 'GA4GH Service Registry API Specification'
version: 1.0.0
description: |
Service registry is a GA4GH service providing information about other GA4GH services, primarily for the purpose of organizing services into networks or groups and service discovery across organizational boundaries. Information about the individual services in the registry is described in a complementary [service-info](https://github.com/ga4gh-discovery/ga4gh-service-info) specification.
More information on [GitHub](https://github.com/ga4gh-discovery/ga4gh-service-registry/).
license:
name: 'Apache 2.0'
url: 'https://raw.githubusercontent.com/ga4gh-discovery/ga4gh-service-registry/develop/LICENSE'
contact:
name: 'GA4GH Discovery Networks Team'
email: '[email protected]'
security:
- bearerAuth: []
paths:
/services:
get:
summary: 'List services in the registry'
operationId: getServices
tags:
- services
responses:
'200':
description: 'List of services'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ExternalService'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/Error'
/services/{serviceId}:
get:
summary: 'Find service in the registry by ID'
operationId: getServiceById
tags:
- services
parameters:
- name: serviceId
in: path
description: 'ID of the service to find'
required: true
schema:
type: string
responses:
'200':
description: 'Information about a service with the given ID'
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalService'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/Error'
/services/types:
get:
summary: 'List types of services exposed by the registry'
description: 'List all distinct values of the `type` field of exposed services (see `Service`).'
operationId: getServiceTypes
tags:
- services
responses:
'200':
description: 'List of service types'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ServiceType'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/Error'
/service-info:
get:
summary: 'Show information about the registry'
operationId: getServiceInfo
tags:
- service-info
responses:
'200':
description: |
Display service information about this service registry.
Use `"type": {"group": "org.ga4gh", "artifact": "service-registry", "version": "1.0.0"}` when implementing this specification directly.
content:
application/json:
schema:
$ref: '#/components/schemas/Service'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
default:
$ref: '#/components/responses/Error'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
responses:
Unauthorized:
description: 'Unauthorized ([RFC 7235](https://tools.ietf.org/html/rfc7235))'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: 'Forbidden ([RFC 7231](https://tools.ietf.org/html/rfc7231))'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: 'Not found ([RFC 7231](https://tools.ietf.org/html/rfc7231))'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
InternalServerError:
description: 'Internal server error ([RFC 7231](https://tools.ietf.org/html/rfc7231))'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error:
description: 'Unexpected error ([RFC 7231](https://tools.ietf.org/html/rfc7231))'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Service:
$ref: 'https://raw.githubusercontent.com/ga4gh-discovery/ga4gh-service-info/v1.0.0/service-info.yaml#/components/schemas/Service'
ExternalService:
description: 'GA4GH service with a URL'
allOf:
- $ref: '#/components/schemas/Service'
- type: object
properties:
url:
type: string
format: uri
description: |
Base URL of the service ([RFC 3986](https://tools.ietf.org/html/rfc3986) format).
For REST API services, this is the URL to which all endpoints should be relative. In particular, services implementing GA4GH specifications defined in OAS format (as per the `type` field) should respond to requests constructed by appending relative paths from the specification to this base URL (e.g. `{url}/service-info`). See [API Server and Base URL](https://swagger.io/docs/specification/api-host-and-base-path/) for more information on specifying base URLs in OAS 3.
example: 'https://api.example.com/v1'
required:
- url
ServiceType:
$ref: 'https://raw.githubusercontent.com/ga4gh-discovery/ga4gh-service-info/v1.0.0/service-info.yaml#/components/schemas/ServiceType'
Error:
type: object
properties:
status:
type: integer
format: int32
description: |
HTTP status code (as per [RFC 7231](https://tools.ietf.org/html/rfc7231)) generated by the server for this occurrence of the problem.
This must match the status code in the actual HTTP response. Used for convenience of clients (e.g. to determine what the original status code was in cases where it has been changed by an intermediary or cache or when message bodies persist without HTTP information).
example: '500'
title:
type: string
description: |
A short, human-readable description of the error.
The value should not change from occurrence to occurrence of an error, except for purposes of localization.
example: 'Internal server error'
detail:
type: string
description: 'A human-readable explanation specific to this occurrence of the error.'
example: 'Internal server error'
required:
- status
- title