-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.json
200 lines (200 loc) · 5.17 KB
/
openapi.json
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": "item4 API",
"description": "item4가 취미로 만든 정적 API들",
"version": "0.0.0"
},
"servers": [
{
"url": "https://item4.net/api",
"description": "실제 서버"
}
],
"paths": {
"/weather/": {
"get": {
"tags": [
"Weather"
],
"summary": "최신 전국 날씨정보",
"description": "가장 최근에 수집된 전국 날씨 정보입니다.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WeatherResult"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"WeatherResult": {
"type": "object",
"properties": {
"observed_at": {
"type": "string",
"format": "date-time",
"description": "관측일시"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WeatherRecord"
}
}
}
},
"WeatherRecord": {
"type": "object",
"description": "날씨 계측 정보",
"properties": {
"id": {
"type": "integer",
"description": "관측소 고유 ID"
},
"name": {
"type": "string",
"description": "관측소 이름"
},
"height": {
"type": "integer",
"description": "관측소 해발고도 (단위: m)"
},
"rain": {
"$ref": "#/components/schemas/RainData"
},
"temperature": {
"type": "number",
"description": "현재 기온 (단위: 섭씨)"
},
"wind1": {
"$ref": "#/components/schemas/Wind1Data"
},
"wind10": {
"$ref": "#/components/schemas/Wind10Data"
},
"humidity": {
"type": "integer",
"description": "습도 (단위: %)"
},
"atmospheric": {
"type": "number",
"description": "해면기압 (단위: hPa)"
},
"address": {
"type": "string",
"description": "관측소 소재지"
}
}
},
"RainData": {
"type": "object",
"description": "강수 상황",
"properties": {
"is_raining": {
"type": "string",
"enum": [
"Clear",
"Rain",
"Unavailable",
"Unknown"
],
"description": "강수 여부:\n * `Clear`: 현재 맑음\n * `Rain`: 현재 강수중\n * `Unavailable`: 강수 여부를 지원하지 않는 관측소\n * `Unknown`: 강수 여부가 파악되지 않고 있음\n"
},
"rain15": {
"type": "number",
"description": "15분 강수량 (단위: mm)"
},
"rain60": {
"type": "number",
"description": "60분 강수량 (단위: mm)"
},
"rain3h": {
"type": "number",
"description": "3시간 강수량 (단위: mm)"
},
"rain6h": {
"type": "number",
"description": "6시간 강수량 (단위: mm)"
},
"rain12h": {
"type": "number",
"description": "12시간 강수량 (단위: mm)"
},
"rainday": {
"type": "number",
"description": "일일 강수량 (단위: mm)"
}
}
},
"WindData": {
"type": "object",
"description": "바람 정보 (Base type)",
"properties": {
"direction_code": {
"type": "number",
"description": "방향계"
},
"direction_text": {
"type": "string",
"enum": [
"N",
"NNW",
"NW",
"WNW",
"W",
"WSW",
"SW",
"SSW",
"S",
"SSE",
"SE",
"ESE",
"E",
"ENE",
"NE",
"NNE",
"No",
"Unavailable"
],
"description": "풍향: 기본 방위 외의 요소만 설명합니다.\n * `No`: 바람 없음\n * `Unavailable`: 풍향 정보를 지원하지 않는 관측소\n"
},
"velocity": {
"type": "number",
"description": "풍속 (단위: m/s)"
}
}
},
"Wind1Data": {
"allOf": [
{
"$ref": "#/components/schemas/WindData"
},
{
"type": "object",
"description": "1분 바람 정보"
}
]
},
"Wind10Data": {
"allOf": [
{
"$ref": "#/components/schemas/WindData"
},
{
"type": "object",
"description": "10분 바람 정보"
}
]
}
}
}
}