-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.yaml
More file actions
141 lines (139 loc) · 3.98 KB
/
Copy pathswagger.yaml
File metadata and controls
141 lines (139 loc) · 3.98 KB
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
swagger: "2.0"
info:
version: 1.0.0
title: Gas and Electricity Usage
description: Gives a real time current and previous months usage of Gas and Electricity Services
host: private-b4f96-energy1.apiary-mock.com
basePath: /api
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/usage/current/month/4859634:
x-summary: Current Month 4859634
x-description: |
Returns gas and electricity usage of current month for the account number: 4859634.
get:
responses:
200:
description: Gas & Electricity usage response for current month
examples:
application/json:
[
{
"account_number": "4859634",
"name": "Darko",
"gas_usage": "20,006 Btu",
"gas_cost": "46,896",
"electricity_usage": "3,430 kW",
"electricity_cost": "12,932",
"environment": "Japan 1"
}
]
schema:
$ref: '#/definitions/Usage'
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
/usage/last/month/4859634:
x-summary: Last Month 4859634
x-description: |
Returns gas and electricity usage of last month for the account number: 4859634.
get:
responses:
200:
description: Gas & Electricity usage response for last month
examples:
application/json:
[
{
"account_number": "4859634",
"name": "Darko",
"gas_usage": "30,000 Btu",
"gas_cost": "¥ 56,436",
"electricity_usage": "2,920 kW",
"electricity_cost": "¥ 8,210",
"environment": "Japan 1"
}
]
schema:
$ref: '#/definitions/Usage'
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
/usage/current/month/5845241:
x-summary: Current Month 5845241
x-description: |
Returns gas and electricity usage of current month for the account number: 5845241.
get:
responses:
200:
description: Gas & Electricity usage response for current month
examples:
application/json:
[
{
"account_number": "5845241",
"name": "John",
"gas_usage": "45,200 Btu",
"gas_cost": "¥ 73,295",
"electricity_usage": "0 kW",
"electricity_cost": "¥ 0",
"environment": "Japan 1"
}
]
schema:
$ref: '#/definitions/Usage'
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
/usage/last/month/5845241:
x-summary: Last Month 5845241
x-description: |
Returns gas and electricity usage of last month for the account number: 5845241.
get:
responses:
200:
description: Gas & Electricity usage response for last month
examples:
application/json:
[
{
"account_number": "5845241",
"name": "John",
"gas_usage": "923,100 Btu",
"gas_cost": "¥ 453,332",
"electricity_usage": "0 kW",
"electricity_cost": "¥ 0",
"environment": "Japan 1"
}
]
schema:
$ref: '#/definitions/Usage'
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Usage:
required:
- account_number
properties:
account_number:
type: string
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string