Skip to content

Commit 584410a

Browse files
committed
updated smartapi api metadata
1 parent d1f5a91 commit 584410a

File tree

1 file changed

+127
-27
lines changed

1 file changed

+127
-27
lines changed

SmartAPI/smartapi_openapi.yml

Lines changed: 127 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
openapi: '3.0'
1+
openapi: 3.0.0
22
info:
3-
version: 3.0.0
3+
version: '1.0'
44
title: SmartAPI API
5-
description: >-
6-
MyGene.info provides simple-to-use REST web services to query/retrieve gene annotation data.
7-
It supports all species with known genes and provides always up-to-date gene annotations (updated weekly).
8-
Learn more about [MyGene.info](http://mygene.info/).
9-
termsOfService: 'http://mygene.info/terms/'
5+
description: 'This is the API provided from [SmartAPI](http://smart-api.info) application.'
6+
termsOfService: 'http://smart-api.info'
107
contact:
118
name: Chunlei Wu
129
x-role: responsible developer
13-
email: help@mygene.info
10+
email: cwu@scripps.edu
1411
x-id: 'http://orcid.org/0000-0002-2629-6124'
12+
url: 'http://github.com/newgene'
1513
x-maturity: production
1614
x-implementationLanguage: Python
1715
externalDocs:
1816
description: Find more info here
19-
url: 'https://docs.mygene.info'
17+
url: 'http://smart-api.info'
2018
x-externalResources:
2119
- x-url: 'http://example.org/api/docs'
2220
x-type: api documentation
@@ -28,38 +26,140 @@ x-externalResources:
2826
servers:
2927
- url: 'http://dev.smart-api.info/api'
3028
description: Development server
29+
variables: {}
3130
- url: 'http://smart-api.info/api'
3231
description: Production server
3332
tags:
34-
- API
35-
- metadata
36-
- registry
37-
33+
- name: api
34+
- name: metadata
35+
- name: openapi
3836
paths:
39-
/metadata/{api_id}:
37+
'/metadata/{api_id}':
4038
get:
41-
tags:
42-
- metadata
43-
description: Makes gene query and returns matching gene list.
44-
x-accessRestriction: fee
39+
summary: ''
40+
description: Return matching API metadata
4541
parameters:
4642
- name: api_id
4743
in: path
48-
description: >-
49-
Pass a metadata id, and it returns the saved metadata for the given API,
50-
e.g. "a9baab984f6af0021aaece6a163e0cf4".
51-
If "all" is passed, return a list of all saved metadata (default first ten,
52-
with the pagination controlled by size and from parameters).
5344
required: true
45+
schema:
46+
type: string
47+
- name: raw
48+
in: query
49+
required: false
50+
schema:
51+
type: string
52+
description: >-
53+
return raw metadata document if passed "1" or "true". Default is
54+
"false".
55+
- name: fields
56+
in: query
57+
required: false
58+
schema:
59+
type: string
60+
description: >-
61+
You can use this parameter to filter the fields returned from the
62+
raw metadata document. Only effective when "raw=1" is passed. E.g.
63+
"info.contact.name,servers". Nested fields are supported via dot
64+
notation, and multiple fields can be passed as a comma-separated
65+
string.
66+
- name: from
67+
in: query
68+
required: false
69+
schema:
70+
type: string
71+
description: >-
72+
Number of items to be skipped. Combining with "size" parameter, this
73+
can be used for the pagination of the long result.
74+
default: '0'
75+
- name: size
76+
in: query
77+
required: false
78+
schema:
79+
type: string
80+
description: >-
81+
The number of items returned in one request. Combining with "from"
82+
parameter, this can be used for the pagination of the long result.
83+
default: '10'
84+
operationId: ''
85+
responses:
86+
default:
87+
description: default response
88+
tags:
89+
- metadata
5490
/query/:
5591
get:
56-
tags:
57-
- query
5892
description: Query metadata for matching APIs.
5993
parameters:
6094
- name: q
6195
in: query
6296
description: >-
63-
Can pass any string as the query term to match any field, e.g. "mygene.info",
64-
or pass a fielded query term like "info.contact.name:wu".
97+
Can pass any string as the query term to match any field, e.g.
98+
"mygene.info", or pass a fielded query term like
99+
"info.contact.name:wu".
65100
required: true
101+
- name: fields
102+
in: query
103+
required: false
104+
schema:
105+
type: string
106+
description: >-
107+
You can use this parameter to filter the fields returned from the
108+
raw metadata document. Only effective when "raw=1" is passed. E.g.
109+
"info.contact.name,servers". Nested fields are supported via dot
110+
notation, and multiple fields can be passed as a comma-separated
111+
string.
112+
- name: raw
113+
in: query
114+
required: false
115+
schema:
116+
type: string
117+
description: >-
118+
return raw metadata document if passed "1" or "true". Default is
119+
"false".
120+
/validate:
121+
get:
122+
summary: Validate input SmartAPI metadata
123+
description: ''
124+
parameters:
125+
- name: url
126+
in: query
127+
required: true
128+
schema:
129+
type: string
130+
description: >-
131+
The full URL of an input SmartAPI metadata to validate. The file
132+
format can be either JSON or YAML.
133+
operationId: ''
134+
responses:
135+
'200':
136+
description: default response
137+
/suggestion:
138+
get:
139+
summary: ''
140+
description: ''
141+
parameters:
142+
- name: field
143+
in: query
144+
required: false
145+
schema:
146+
type: string
147+
description: >-
148+
An input field to return the suggested values and their occurrence
149+
numbers.
150+
- name: size
151+
in: query
152+
required: false
153+
schema:
154+
type: string
155+
description: The maximum number of suggested values to return
156+
default: '100'
157+
operationId: ''
158+
responses:
159+
default:
160+
description: Default response
161+
security: []
162+
components:
163+
links: {}
164+
callbacks: {}
165+
schemas: {}

0 commit comments

Comments
 (0)