Skip to content

Commit 1e7df8a

Browse files
committed
bte/service provider trapi: update comments, some minor fields
1 parent a93c2de commit 1e7df8a

File tree

2 files changed

+72
-38
lines changed

2 files changed

+72
-38
lines changed

biothings_explorer/service-provider-trapi.yaml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
openapi: 3.0.3
2+
## made this document by copying https://github.com/NCATS-Tangerine/translator-api-registry/blob/master/biothings_explorer/smartapi.yaml
3+
## section-by-section and adjusting when needed
24
info:
35
contact:
46
@@ -13,12 +15,15 @@ info:
1315
title: Service Provider TRAPI
1416
version: 2.8.1
1517
x-trapi:
16-
version: 1.2.0
18+
version: 1.2.0 ## will update to 1.3 once all instances have trapi1.3 code
1719
asyncquery: true
1820
operations:
19-
- lookup
20-
## look at https://standards.ncats.io/operation.json for details
21-
## perhaps advertise "lookup_and_score"?
21+
## look at https://standards.ncats.io/operation.json for details. was previously lookup
22+
- lookup_and_score
23+
## no batch_size_limit (BTE manages IDs for QNodes and sub-queries internally)
24+
## /query endpoints have a limit of 15 requests/client/min
25+
## /meta_knowledge_graph endpoints have a limit of 30 requests/client/min
26+
## other endpoints don't have rate limits
2227
x-translator:
2328
infores: "infores:service-provider-trapi"
2429
biolink-version: 2.4.8
@@ -39,17 +44,18 @@ servers:
3944
description: Non-ITRB dev (primary internal use)
4045
x-maturity: development
4146
tags:
42-
- name: 1.2.0
47+
- name: 1.2.0 ## will update to 1.3 once all instances have trapi1.3 code
4348
- name: meta_knowledge_graph
4449
- name: query
4550
- name: asyncquery
4651
- name: translator
4752
- name: trapi
4853
- name: biothings
49-
## Note: BTE has custom behavior so DO NOT blindly copy-paste the TRAPI specs / schemas below
54+
## Note: BTE has custom behavior so DO NOT blindly copy-paste the TRAPI specs / schemas into the document below
5055
## instead go through it and copy-paste in sections as-needed
5156
## examples are using MyVariant-specific query
5257
paths:
58+
## copied directly from TRAPI spec
5359
/meta_knowledge_graph:
5460
get:
5561
tags:
@@ -63,6 +69,7 @@ paths:
6369
application/json:
6470
schema:
6571
$ref: '#/components/schemas/MetaKnowledgeGraph'
72+
## modified TRAPI spec: example and BTE-specific parameters, used by developers running local instances of BTE
6673
/query:
6774
post:
6875
tags:
@@ -71,7 +78,6 @@ paths:
7178
Query Service Provider's SMARTAPI KP APIs (that have x-bte annotation) as an individual TRAPI
7279
service
7380
description: ''
74-
operationId: queryTeam
7581
parameters:
7682
- description: option to choose whether or not to enable caching
7783
in: query
@@ -141,10 +147,19 @@ paths:
141147
application/json:
142148
schema:
143149
type: string
144-
x-swagger-router-controller: swagger_server.controllers.query_controller
145150
## need to remove the extra stuff from server url to use this endpoint..
146151
## example: https://api.bte.ncats.io/check_query_status/{id}
152+
## not TRAPI spec: BTE-specific endpoint related to asyncquery
147153
# /check_query_status/{id}:
154+
# ## moved because smartapi-editor gave alert that a non-existent post endpoint wouldn't know what {id} is
155+
# parameters:
156+
# - description: job-id
157+
# in: path
158+
# name: id
159+
# required: true
160+
# ## Cache refreshing means this will be changing pretty often, so not including an example
161+
# schema:
162+
# type: string
148163
# get:
149164
# tags:
150165
# - asyncquery
@@ -155,15 +170,7 @@ paths:
155170
# the Response.
156171
# description: ''
157172
# parameters:
158-
# - description: job-id
159-
# ## could add example like hY2BrhJfcN (successfully completed) or ovllMzFfCe (failed)
160-
# in: path
161-
# name: id
162-
# required: true
163-
# ## Cache refreshing means this will be changing pretty often, so not including an example
164-
# schema:
165-
# type: string
166-
# - description: option to override original query log level
173+
# - description: option to override original query log level
167174
# in: query
168175
# name: log_level
169176
# required: false
@@ -203,7 +210,7 @@ paths:
203210
# properties:
204211
# response:
205212
# $ref: '#/components/schemas/Response'
206-
## note that the AsyncQuery schema is changed to make callback optional
213+
## modified TRAPI spec: summary sections tell users that AsyncQuery schema was changed to make callback optional
207214
/asyncquery:
208215
post:
209216
tags:
@@ -295,6 +302,13 @@ paths:
295302
schema:
296303
type: string
297304
components:
305+
## look for comments to see parts that have been modified for BTE
306+
## - Query: comment out workflow.allOf section since the $ref breaks execution of
307+
## BTE's api-schema-builder/openapi-validator-middleware
308+
## - AsyncQuery: callback property not required (commented it out of the 'required' field),
309+
## comment out workflow.allOf section
310+
## - Response: comment out workflow.allOf section
311+
## - QNode: commented out an example for some reason
298312
schemas:
299313
Query:
300314
description: >-

biothings_explorer/smartapi.yaml

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,27 @@ info:
99
title: BioThings Explorer ReasonerStdAPI
1010
version: 2.8.1
1111
x-trapi:
12-
version: 1.2.0
12+
version: 1.2.0 ## will update to 1.3 once all instances have trapi1.3 code
1313
asyncquery: true
1414
operations:
15-
- lookup
16-
## look at https://standards.ncats.io/operation.json for details
17-
## perhaps advertise "lookup_and_score"?
15+
## look at https://standards.ncats.io/operation.json for details. was previously lookup
16+
- lookup_and_score
17+
## no batch_size_limit (BTE manages IDs for QNodes and sub-queries internally)
18+
## /query endpoints have a limit of 15 requests/client/min
19+
## /meta_knowledge_graph endpoints have a limit of 30 requests/client/min
20+
## other endpoints don't have rate limits
1821
x-translator:
1922
infores: "infores:biothings-explorer"
2023
biolink-version: 2.4.8
2124
component: ARA
2225
team:
2326
- Exploring Agent
2427
servers:
28+
## ITRB Production and Test are deployed manually, based on the staging instance
29+
## ITRB CI / staging is basically deployed manually, from main branches
30+
## - automatic for updates in bte-trapi-workspace main branch, but those rarely happen
31+
## - we could technically control what branches are used (but right now we don't do this)
32+
## non-ITRB dev: total manual control on updates (what branches of modules are used for updates)
2533
- url: https://bte.transltr.io/v1
2634
description: ITRB Production server
2735
x-maturity: production
@@ -35,17 +43,18 @@ servers:
3543
description: Non-ITRB dev (primary internal use)
3644
x-maturity: development
3745
tags:
38-
- name: 1.2.0
46+
- name: 1.2.0 ## will update to 1.3 once all instances have trapi1.3 code
3947
- name: meta_knowledge_graph
4048
- name: query
4149
- name: asyncquery
4250
- name: translator
4351
- name: trapi
4452
- name: biothings
45-
## Note: BTE has custom behavior so DO NOT blindly copy-paste the TRAPI specs / schemas below
53+
## Note: BTE has custom behavior so DO NOT blindly copy-paste the TRAPI specs / schemas into the document below
4654
## instead go through it and copy-paste in sections as-needed
4755
## examples are using MyVariant-specific query
4856
paths:
57+
## copied directly from TRAPI spec
4958
/meta_knowledge_graph:
5059
get:
5160
tags:
@@ -59,6 +68,7 @@ paths:
5968
application/json:
6069
schema:
6170
$ref: '#/components/schemas/MetaKnowledgeGraph'
71+
## copied from /meta_knowledge_graph above and modified: BTE-specific endpoint
6272
/smartapi/{smartapi_id}/meta_knowledge_graph:
6373
get:
6474
tags:
@@ -80,6 +90,7 @@ paths:
8090
application/json:
8191
schema:
8292
$ref: '#/components/schemas/MetaKnowledgeGraph'
93+
## copied from /meta_knowledge_graph above and modified: BTE-specific endpoint
8394
/team/{team_name}/meta_knowledge_graph:
8495
get:
8596
tags:
@@ -105,12 +116,12 @@ paths:
105116
application/json:
106117
schema:
107118
$ref: '#/components/schemas/MetaKnowledgeGraph'
119+
## modified TRAPI spec: example and BTE-specific parameters, used by developers running local instances of BTE
108120
/query:
109121
post:
110122
tags:
111123
- query
112124
summary: Query BioThings Explorer TRAPI API as ARA with a TRAPI query
113-
operationId: query
114125
parameters:
115126
- description: option to choose whether or not to enable caching
116127
in: query
@@ -180,13 +191,12 @@ paths:
180191
application/json:
181192
schema:
182193
type: string
183-
x-swagger-router-controller: swagger_server.controllers.query_controller
194+
## copied from /query above and modified: BTE-specific endpoint
184195
/smartapi/{smartapi_id}/query:
185196
post:
186197
tags:
187198
- query
188199
summary: Query individual SmartAPI KP API (that has x-bte annotation) as a TRAPI API
189-
operationId: querySmartAPI
190200
parameters:
191201
- description: SmartAPI ID of an API, you can get it from https://smart-api.info/registry
192202
in: path
@@ -263,7 +273,7 @@ paths:
263273
application/json:
264274
schema:
265275
type: string
266-
x-swagger-router-controller: swagger_server.controllers.query_controller
276+
## copied from /query above and modified: BTE-specific endpoint
267277
/team/{team_name}/query:
268278
post:
269279
tags:
@@ -272,7 +282,6 @@ paths:
272282
Query an individual Translator team's SMARTAPI KP APIs (that have x-bte annotation) as an individual TRAPI
273283
service using team name
274284
description: ''
275-
operationId: queryTeam
276285
parameters:
277286
- description: Translator Team Name, e.g. Service Provider, Multiomics Provider
278287
in: path
@@ -353,8 +362,17 @@ paths:
353362
application/json:
354363
schema:
355364
type: string
356-
x-swagger-router-controller: swagger_server.controllers.query_controller
365+
## not TRAPI spec: BTE-specific endpoint related to asyncquery
357366
/check_query_status/{id}:
367+
## moved because smartapi-editor gave alert that a non-existent post endpoint wouldn't know what {id} is
368+
parameters:
369+
- description: job-id
370+
in: path
371+
name: id
372+
required: true
373+
## Cache refreshing means this will be changing pretty often, so not including an example
374+
schema:
375+
type: string
358376
get:
359377
tags:
360378
- asyncquery
@@ -365,13 +383,6 @@ paths:
365383
the Response.
366384
description: ''
367385
parameters:
368-
- description: job-id
369-
in: path
370-
name: id
371-
required: true
372-
## Cache refreshing means this will be changing pretty often, so not including an example
373-
schema:
374-
type: string
375386
- description: option to override original query log level
376387
in: query
377388
name: log_level
@@ -412,7 +423,7 @@ paths:
412423
properties:
413424
response:
414425
$ref: '#/components/schemas/Response'
415-
## note that the AsyncQuery schema is changed to make callback optional
426+
## modified TRAPI spec: summary sections tell users that AsyncQuery schema was changed to make callback optional
416427
/asyncquery:
417428
post:
418429
tags:
@@ -498,6 +509,7 @@ paths:
498509
application/json:
499510
schema:
500511
type: string
512+
## copied from /asyncquery above and modified: BTE-specific endpoint
501513
/smartapi/{smartapi_id}/asyncquery:
502514
post:
503515
tags:
@@ -592,6 +604,7 @@ paths:
592604
application/json:
593605
schema:
594606
type: string
607+
## copied from /asyncquery above and modified: BTE-specific endpoint
595608
/team/{team_name}/asyncquery:
596609
post:
597610
tags:
@@ -692,6 +705,13 @@ paths:
692705
schema:
693706
type: string
694707
components:
708+
## look for comments to see parts that have been modified for BTE
709+
## - Query: comment out workflow.allOf section since the $ref breaks execution of
710+
## BTE's api-schema-builder/openapi-validator-middleware
711+
## - AsyncQuery: callback property not required (commented it out of the 'required' field),
712+
## comment out workflow.allOf section
713+
## - Response: comment out workflow.allOf section
714+
## - QNode: commented out an example for some reason
695715
schemas:
696716
Query:
697717
description: >-

0 commit comments

Comments
 (0)