Skip to content

Commit 6013aa3

Browse files
committed
Add YAML spec
1 parent 3a0a039 commit 6013aa3

File tree

3 files changed

+140
-3
lines changed

3 files changed

+140
-3
lines changed

.idea/workspace.xml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

swagger.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,11 @@
158158
"ExtractorInfo": {
159159
"type": "object",
160160
"properties": {
161+
"DataFeedTag": {
162+
"type": "string"
163+
},
161164
"Description": {
162-
"type": "string",
163-
"x-go-name": "DataFeedTag"
165+
"type": "string"
164166
}
165167
},
166168
"x-go-package": "_/usr/local/var/www/gravity-node-data-extractor/model"

swagger.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
consumes:
2+
- application/json
3+
produces:
4+
- application/json
5+
schemes:
6+
- http
7+
- https
8+
swagger: '2.0'
9+
info:
10+
description: |-
11+
This application represents viable extractor methods.
12+
Declared methods are compulsory for appropriate extractor functioning.
13+
title: Gravity Extractor RPC API.
14+
termsOfService: >-
15+
there are no TOS at this moment, use at your own risk we take no
16+
responsibility
17+
contact:
18+
name: venlab.dev
19+
url: 'https://venlab.dev'
20+
21+
license:
22+
name: MIT
23+
url: 'http://opensource.org/licenses/MIT'
24+
version: '1.0'
25+
host: extractor.gravityhub.org
26+
basePath: /
27+
paths:
28+
/extracted:
29+
get:
30+
security:
31+
- api_key: []
32+
description: No additional info
33+
consumes:
34+
- application/json
35+
produces:
36+
- application/json
37+
schemes:
38+
- http
39+
- https
40+
tags:
41+
- Extractor
42+
summary: Extracts mapped data
43+
operationId: getExtractedData
44+
responses:
45+
'200':
46+
description: BinancePriceIndexResponse
47+
schema:
48+
$ref: '#/definitions/BinancePriceIndexResponse'
49+
/info:
50+
get:
51+
security:
52+
- api_key: []
53+
description: No additional info
54+
consumes:
55+
- application/json
56+
produces:
57+
- application/json
58+
schemes:
59+
- http
60+
- https
61+
tags:
62+
- Extractor
63+
summary: Returns extractor common info
64+
operationId: getExtractorInfo
65+
responses:
66+
'200':
67+
description: ExtractorInfo
68+
schema:
69+
$ref: '#/definitions/ExtractorInfo'
70+
/raw:
71+
get:
72+
security:
73+
- api_key: []
74+
description: No additional info
75+
consumes:
76+
- application/json
77+
produces:
78+
- application/json
79+
schemes:
80+
- http
81+
- https
82+
tags:
83+
- Extractor
84+
summary: Resolves raw data
85+
operationId: getRawData
86+
responses:
87+
'200':
88+
description: '[]bytes'
89+
definitions:
90+
BinancePriceExtractor:
91+
type: object
92+
properties:
93+
Tag:
94+
type: string
95+
x-go-name: SymbolPair
96+
x-go-package: _/usr/local/var/www/gravity-node-data-extractor/model
97+
BinancePriceIndexResponse:
98+
type: object
99+
properties:
100+
calcTime:
101+
type: integer
102+
format: int64
103+
x-go-name: CalcTime
104+
price:
105+
type: string
106+
x-go-name: Price
107+
symbol:
108+
type: string
109+
x-go-name: Symbol
110+
x-go-package: _/usr/local/var/www/gravity-node-data-extractor/model
111+
ExtractorInfo:
112+
type: object
113+
properties:
114+
DataFeedTag:
115+
type: string
116+
Description:
117+
type: string
118+
x-go-package: _/usr/local/var/www/gravity-node-data-extractor/model
119+
securityDefinitions:
120+
api_key:
121+
type: apiKey
122+
name: KEY
123+
in: header
124+
security:
125+
- api_key: []
126+
x-meta-array:
127+
- value1
128+
- value2
129+
x-meta-array-obj:
130+
- name: obj
131+
value: field
132+
x-meta-value: value

0 commit comments

Comments
 (0)