|
210 | 210 | }
|
211 | 211 | },
|
212 | 212 | "/api/polling_stations/{polling_station_id}/data_entries/{entry_number}": {
|
| 213 | + "get": { |
| 214 | + "tags": [ |
| 215 | + "polling_station" |
| 216 | + ], |
| 217 | + "summary": "Get an in-progress (not finalised) data entry for a polling station", |
| 218 | + "operationId": "polling_station_data_entry_get", |
| 219 | + "parameters": [ |
| 220 | + { |
| 221 | + "name": "polling_station_id", |
| 222 | + "in": "path", |
| 223 | + "description": "Polling station database id", |
| 224 | + "required": true, |
| 225 | + "schema": { |
| 226 | + "type": "integer", |
| 227 | + "format": "int32", |
| 228 | + "minimum": 0 |
| 229 | + } |
| 230 | + }, |
| 231 | + { |
| 232 | + "name": "entry_number", |
| 233 | + "in": "path", |
| 234 | + "description": "Data entry number (first or second data entry)", |
| 235 | + "required": true, |
| 236 | + "schema": { |
| 237 | + "type": "integer", |
| 238 | + "format": "int32", |
| 239 | + "minimum": 0 |
| 240 | + } |
| 241 | + } |
| 242 | + ], |
| 243 | + "responses": { |
| 244 | + "200": { |
| 245 | + "description": "Data entry retrieved successfully", |
| 246 | + "content": { |
| 247 | + "application/json": { |
| 248 | + "schema": { |
| 249 | + "$ref": "#/components/schemas/GetDataEntryResponse" |
| 250 | + } |
| 251 | + } |
| 252 | + } |
| 253 | + }, |
| 254 | + "404": { |
| 255 | + "description": "Not found", |
| 256 | + "content": { |
| 257 | + "application/json": { |
| 258 | + "schema": { |
| 259 | + "$ref": "#/components/schemas/ErrorResponse" |
| 260 | + } |
| 261 | + } |
| 262 | + } |
| 263 | + }, |
| 264 | + "500": { |
| 265 | + "description": "Internal server error", |
| 266 | + "content": { |
| 267 | + "application/json": { |
| 268 | + "schema": { |
| 269 | + "$ref": "#/components/schemas/ErrorResponse" |
| 270 | + } |
| 271 | + } |
| 272 | + } |
| 273 | + } |
| 274 | + } |
| 275 | + }, |
213 | 276 | "post": {
|
214 | 277 | "tags": [
|
215 | 278 | "polling_station"
|
216 | 279 | ],
|
217 | 280 | "summary": "Save or update a data entry for a polling station",
|
218 |
| - "operationId": "polling_station_data_entry", |
| 281 | + "operationId": "polling_station_data_entry_save", |
219 | 282 | "parameters": [
|
220 | 283 | {
|
221 | 284 | "name": "polling_station_id",
|
|
244 | 307 | "content": {
|
245 | 308 | "application/json": {
|
246 | 309 | "schema": {
|
247 |
| - "$ref": "#/components/schemas/DataEntryRequest" |
| 310 | + "$ref": "#/components/schemas/SaveDataEntryRequest" |
248 | 311 | }
|
249 | 312 | }
|
250 | 313 | },
|
|
256 | 319 | "content": {
|
257 | 320 | "application/json": {
|
258 | 321 | "schema": {
|
259 |
| - "$ref": "#/components/schemas/DataEntryResponse" |
| 322 | + "$ref": "#/components/schemas/SaveDataEntryResponse" |
260 | 323 | }
|
261 | 324 | }
|
262 | 325 | }
|
|
393 | 456 | ],
|
394 | 457 | "responses": {
|
395 | 458 | "200": {
|
396 |
| - "description": "Data entry finalised successfully", |
397 |
| - "content": { |
398 |
| - "application/json": { |
399 |
| - "schema": { |
400 |
| - "$ref": "#/components/schemas/DataEntryResponse" |
401 |
| - } |
402 |
| - } |
403 |
| - } |
| 459 | + "description": "Data entry finalised successfully" |
404 | 460 | },
|
405 | 461 | "404": {
|
406 | 462 | "description": "Not found",
|
|
522 | 578 | }
|
523 | 579 | }
|
524 | 580 | },
|
525 |
| - "DataEntryRequest": { |
526 |
| - "type": "object", |
527 |
| - "description": "Request structure for data entry of polling station results", |
528 |
| - "required": [ |
529 |
| - "data" |
530 |
| - ], |
531 |
| - "properties": { |
532 |
| - "data": { |
533 |
| - "$ref": "#/components/schemas/PollingStationResults" |
534 |
| - } |
535 |
| - } |
536 |
| - }, |
537 |
| - "DataEntryResponse": { |
538 |
| - "type": "object", |
539 |
| - "description": "Response structure for data entry of polling station results", |
540 |
| - "required": [ |
541 |
| - "validation_results" |
542 |
| - ], |
543 |
| - "properties": { |
544 |
| - "validation_results": { |
545 |
| - "$ref": "#/components/schemas/ValidationResults" |
546 |
| - } |
547 |
| - } |
548 |
| - }, |
549 | 581 | "DifferencesCounts": {
|
550 | 582 | "type": "object",
|
551 | 583 | "description": "Differences counts, part of the polling station results.",
|
|
720 | 752 | }
|
721 | 753 | }
|
722 | 754 | },
|
| 755 | + "GetDataEntryResponse": { |
| 756 | + "type": "object", |
| 757 | + "description": "Response structure for getting data entry of polling station results", |
| 758 | + "required": [ |
| 759 | + "data", |
| 760 | + "validation_results" |
| 761 | + ], |
| 762 | + "properties": { |
| 763 | + "data": { |
| 764 | + "$ref": "#/components/schemas/PollingStationResults" |
| 765 | + }, |
| 766 | + "validation_results": { |
| 767 | + "$ref": "#/components/schemas/ValidationResults" |
| 768 | + } |
| 769 | + } |
| 770 | + }, |
723 | 771 | "PoliticalGroup": {
|
724 | 772 | "type": "object",
|
725 | 773 | "description": "Political group with its candidates",
|
|
903 | 951 | "Mobiel"
|
904 | 952 | ]
|
905 | 953 | },
|
| 954 | + "SaveDataEntryRequest": { |
| 955 | + "type": "object", |
| 956 | + "description": "Request structure for saving data entry of polling station results", |
| 957 | + "required": [ |
| 958 | + "data" |
| 959 | + ], |
| 960 | + "properties": { |
| 961 | + "data": { |
| 962 | + "$ref": "#/components/schemas/PollingStationResults" |
| 963 | + } |
| 964 | + } |
| 965 | + }, |
| 966 | + "SaveDataEntryResponse": { |
| 967 | + "type": "object", |
| 968 | + "description": "Response structure for saving data entry of polling station results", |
| 969 | + "required": [ |
| 970 | + "validation_results" |
| 971 | + ], |
| 972 | + "properties": { |
| 973 | + "validation_results": { |
| 974 | + "$ref": "#/components/schemas/ValidationResults" |
| 975 | + } |
| 976 | + } |
| 977 | + }, |
906 | 978 | "ValidationResult": {
|
907 | 979 | "type": "object",
|
908 | 980 | "required": [
|
|
0 commit comments