feat: DataProperties

This commit is contained in:
Piotr Dec 2024-07-16 22:34:22 +02:00
parent 2f161d3481
commit 8d03c86c8f
Signed by: stawros
GPG key ID: F89F27AD8F881A91
5 changed files with 39 additions and 14 deletions

View file

@ -1,7 +1,8 @@
# Large file reading challenge
Welcome in the recruitment challenge.
Write an application that, at the endpoint specified by you, returns the yearly average temperatures for a given city in the format array of objects with the following fields: year, averageTemperature.
Write an application that, at the endpoint specified by you, returns the yearly average temperatures for a given city in
the format array of objects with the following fields: year, averageTemperature.
## Assumptions
@ -10,33 +11,40 @@ Write an application that, at the endpoint specified by you, returns the yearly
- The content of the source file may change during the application's running
## Example source file
[example_file.csv](example_file.csv)
[example_file.csv](example_file.csv)
## Response
### Schema
[response_schema](schema/response.json)
### Example
```json
[
{
"year": "2021",
"averageTemperature": 12.1
},
{
"year": "2022",
"averageTemperature": 11.1
},
{
"year": "2023",
"averageTemperature": 14.1
}
{
"year": "2021",
"averageTemperature": 12.1
},
{
"year": "2022",
"averageTemperature": 11.1
},
{
"year": "2023",
"averageTemperature": 14.1
}
]
```
## Configuration
| property | description | default |
|---------------|--------------------------------|-----------------------|
| data.file-url | path to file with temperatures | data/temperatures.csv |
## Usage
Temperature statistics endpoint: `/api/temperatures/{city}`