-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathweather-forecast-openapi-bad.yaml
166 lines (164 loc) · 4.13 KB
/
weather-forecast-openapi-bad.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
---
openapi: 3.0.2
info:
title: WeatherForecast API
version: 1.0.0
description: A simple API for demonstrating dispatching capabilities in Microcks
contact:
name: Laurent Broudoux
url: https://github.com/lbroudoux
email: [email protected]
license:
name: MIT License
url: https://opensource.org/licenses/MIT
x-microcks:
labels:
domain: weather-forecast
status: GA
team:
id: A
name: Team A
paths:
/forecast/{region}:
get:
operationId: GetForecast
summary: Get forecast for region
description: Get forecast for region
tags:
- forecast
x-microcks-operation:
delay: short
parameters:
- name: region
description: The region to get forecast for
schema:
type: string
in: path
required: true
examples:
#unknown:
# value: other
north:
value: north
west:
value: west
east:
value: east
south:
value: south
- name: apiKey
description: Client API key
schema:
type: string
in: query
required: true
responses:
"200":
description: Weather forecast for region
content:
application/json:
schema:
type: object
properties:
region:
type: string
temp:
format: double
type: number
weather:
type: string
visibility:
format: int32
type: integer
examples:
north:
value:
region: north
temp: -1.5
weather: snowy
visibility: 25
west:
value:
region: west
temp: 12.2
weather: rainy
visibility: 300
east:
value:
region: east
temp: -6.6
weather: frosty
visibility: 523
south:
value:
region: south
temp: "28.3"
weather: sunny
visibility: 1500
"404":
description: Region is unknown
content:
application/json:
schema:
type: string
examples:
unknown:
value: "Region is unknown. Choose in north, west, east or south."
put:
operationId: SetForecast
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Forecast'
examples:
north:
value:
region: north
temp: 3.0
weather: cloudy
visibility: 200
responses:
"200":
description: Forecast is updated
content:
application/json:
schema:
$ref: '#/components/schemas/Forecast'
delete:
operationId: DeleteForecast
tags:
- forecast
parameters:
- name: region
description: The region to get forecast for
schema:
type: string
in: path
required: true
examples:
center:
value: center
responses:
"204":
description: Forecast is deleted
x-microcks-refs:
- center-south
tags:
- name: forecast
description: Foreacast related operation
components:
schemas:
Forecast:
type: object
properties:
region:
type: string
temp:
format: double
type: number
weather:
type: string
visibility:
format: int32
type: integer