You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openfisca_web_api/openAPI.yml
+41-40Lines changed: 41 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -34,49 +34,49 @@ paths:
34
34
post:
35
35
summary: "Run a simulation"
36
36
tags:
37
-
- Calculations
37
+
- Calculations
38
38
operationId: "calculate"
39
39
consumes:
40
-
- "application/json"
40
+
- "application/json"
41
41
produces:
42
-
- "application/json"
42
+
- "application/json"
43
43
parameters:
44
44
- in: "body"
45
45
name: "Situation"
46
-
description: 'Describe the situation (persons and entities). Add the variable you wish to calculate in the proper entity, with null as the value. Learn more in our official documentation: https://openfisca.org/doc/openfisca-web-api/input-output-data.html'
46
+
description: "Describe the situation (persons and entities). Add the variable you wish to calculate in the proper entity, with null as the value. Learn more in our official documentation: https://openfisca.org/doc/openfisca-web-api/input-output-data.html"
47
47
required: true
48
48
schema:
49
-
$ref: '#/definitions/SituationInput'
49
+
$ref: "#/definitions/SituationInput"
50
50
responses:
51
51
200:
52
52
description: "The calculation result is sent back in the response body"
53
53
headers:
54
-
$ref: '#/commons/Headers'
54
+
$ref: "#/commons/Headers"
55
55
schema:
56
-
$ref: '#/definitions/SituationOutput'
56
+
$ref: "#/definitions/SituationOutput"
57
57
404:
58
58
description: "A variable mentioned in the input situation does not exist in the loaded tax and benefit system. Details are sent back in the response body"
59
59
headers:
60
-
$ref: '#/commons/Headers'
60
+
$ref: "#/commons/Headers"
61
61
400:
62
62
description: "The request is invalid. Details about the error are sent back in the response body"
63
63
headers:
64
-
$ref: '#/commons/Headers'
64
+
$ref: "#/commons/Headers"
65
65
/parameters:
66
66
get:
67
67
tags:
68
-
- "Parameters"
68
+
- "Parameters"
69
69
summary: "List all available parameters"
70
70
operationId: "getParameters"
71
71
produces:
72
-
- "application/json"
72
+
- "application/json"
73
73
responses:
74
74
200:
75
75
description: "The list of parameters is sent back in the response body"
76
76
headers:
77
-
$ref: '#/commons/Headers'
77
+
$ref: "#/commons/Headers"
78
78
schema:
79
-
$ref: '#/definitions/Parameters'
79
+
$ref: "#/definitions/Parameters"
80
80
/parameter/{parameterID}:
81
81
get:
82
82
tags:
@@ -95,13 +95,13 @@ paths:
95
95
200:
96
96
description: "The requested parameter's information is sent back in the response body"
97
97
headers:
98
-
$ref: '#/commons/Headers'
98
+
$ref: "#/commons/Headers"
99
99
schema:
100
100
$ref: "#/definitions/Parameter"
101
101
404:
102
102
description: "The requested parameter does not exist"
103
103
headers:
104
-
$ref: '#/commons/Headers'
104
+
$ref: "#/commons/Headers"
105
105
/variables:
106
106
get:
107
107
tags:
@@ -114,7 +114,7 @@ paths:
114
114
200:
115
115
description: "The list of variables is sent back in the response body"
116
116
headers:
117
-
$ref: '#/commons/Headers'
117
+
$ref: "#/commons/Headers"
118
118
schema:
119
119
$ref: "#/definitions/Variables"
120
120
/variable/{variableID}:
@@ -135,13 +135,13 @@ paths:
135
135
200:
136
136
description: "The requested variable's information is sent back in the response body"
137
137
headers:
138
-
$ref: '#/commons/Headers'
138
+
$ref: "#/commons/Headers"
139
139
schema:
140
140
$ref: "#/definitions/Variable"
141
141
404:
142
142
description: "The requested variable does not exist"
143
143
headers:
144
-
$ref: '#/commons/Headers'
144
+
$ref: "#/commons/Headers"
145
145
/entities:
146
146
get:
147
147
tags:
@@ -154,61 +154,61 @@ paths:
154
154
200:
155
155
description: "The list of the entities as well as their information is sent back in the response body"
156
156
headers:
157
-
$ref: '#/commons/Headers'
157
+
$ref: "#/commons/Headers"
158
158
schema:
159
159
$ref: "#/definitions/Entities"
160
160
/trace:
161
161
post:
162
162
summary: "Explore a simulation's steps in details."
163
163
tags:
164
-
- Calculations
164
+
- Calculations
165
165
operationId: "trace"
166
166
consumes:
167
-
- "application/json"
167
+
- "application/json"
168
168
produces:
169
-
- "application/json"
169
+
- "application/json"
170
170
parameters:
171
171
- in: "body"
172
172
name: "Situation"
173
-
description: 'Describe the situation (persons and entities). Add the variable you wish to calculate in the proper entity, with null as the value.'
173
+
description: "Describe the situation (persons and entities). Add the variable you wish to calculate in the proper entity, with null as the value."
174
174
required: true
175
175
schema:
176
-
$ref: '#/definitions/SituationInput'
176
+
$ref: "#/definitions/SituationInput"
177
177
responses:
178
178
200:
179
179
description: "The calculation details are sent back in the response body"
180
180
headers:
181
-
$ref: '#/commons/Headers'
181
+
$ref: "#/commons/Headers"
182
182
schema:
183
-
$ref: '#/definitions/Trace'
183
+
$ref: "#/definitions/Trace"
184
184
404:
185
185
description: "A variable mentioned in the input situation does not exist in the loaded tax and benefit system. Details are sent back in the response body"
186
186
headers:
187
-
$ref: '#/commons/Headers'
187
+
$ref: "#/commons/Headers"
188
188
400:
189
189
description: "The request is invalid. Details about the error are sent back in the response body"
190
190
headers:
191
-
$ref: '#/commons/Headers'
191
+
$ref: "#/commons/Headers"
192
192
/spec:
193
193
get:
194
194
summary: Provide the API documentation in an OpenAPI format
195
195
tags:
196
-
- Documentation
196
+
- Documentation
197
197
operationId: spec
198
198
produces:
199
-
- application/json
199
+
- application/json
200
200
responses:
201
201
200:
202
202
description: The API documentation is sent back in the response body
203
203
headers:
204
-
$ref: '#/commons/Headers'
204
+
$ref: "#/commons/Headers"
205
205
206
206
definitions:
207
207
Parameter:
208
208
type: "object"
209
209
properties:
210
210
values:
211
-
$ref: '#/definitions/Values'
211
+
$ref: "#/definitions/Values"
212
212
brackets:
213
213
type: "object"
214
214
additionalProperties:
@@ -219,7 +219,7 @@ definitions:
219
219
type: "object"
220
220
properties:
221
221
definition:
222
-
type: 'string'
222
+
type: "string"
223
223
metadata:
224
224
type: "object"
225
225
description:
@@ -237,9 +237,9 @@ definitions:
237
237
type: "object"
238
238
properties:
239
239
description:
240
-
type: 'string'
240
+
type: "string"
241
241
href:
242
-
type: 'string'
242
+
type: "string"
243
243
244
244
Variable:
245
245
type: "object"
@@ -284,9 +284,9 @@ definitions:
284
284
type: "object"
285
285
properties:
286
286
description:
287
-
type: 'string'
287
+
type: "string"
288
288
href:
289
-
type: 'string'
289
+
type: "string"
290
290
291
291
Formula:
292
292
type: "object"
@@ -303,10 +303,11 @@ definitions:
303
303
format: "float"
304
304
305
305
Values:
306
+
description: All keys are ISO dates. Values can be numbers, booleans, or arrays of a single type (number, boolean or string).
306
307
type: "object"
307
-
additionalProperties:
308
-
type: "number"
309
-
format: "float"
308
+
additionalProperties:true
309
+
#propertyNames: # this keyword is part of JSON Schema but is not supported in OpenAPI Specification at the time of writing, see https://swagger.io/docs/specification/data-models/keywords/#unsupported
310
+
#pattern: "^[12][0-9]{3}-[01][0-9]-[0-3][0-9]$" # all keys are ISO dates
0 commit comments