Skip to content

Commit

Permalink
Renamed tags & removed array for "produces" key in swagger route specs
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-florentin-charles committed Nov 27, 2023
1 parent 30a7860 commit 11127e3
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/api/swagger/csv/minimal_csv_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
}
},
"parameters": [param.csv_path, *param.time_params],
"produces": [MediaType.TXT_CSV],
"produces": MediaType.TXT_CSV,
}
4 changes: 2 additions & 2 deletions src/api/swagger/rainfall/average_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"description": "Only the starting year is compulsory.\n"
"If no ending year is precised, "
"computes average until most recent year available.",
"tags": ["rainfall"],
"tags": ["Rainfall"],
"responses": {
"200": {"description": "The average rainfall (in mm)", "schema": RainfallSchema}
},
"parameters": [param.begin_year, param.end_year, *param.time_params],
"produces": [MediaType.APP_JSON],
"produces": MediaType.APP_JSON,
}
4 changes: 2 additions & 2 deletions src/api/swagger/rainfall/normal_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"operationId": "getRainfallNormal",
"summary": "Retrieve 30 years rainfall average for Barcelona after a given year.",
"description": "Commonly called rainfall normal",
"tags": ["rainfall"],
"tags": ["Rainfall"],
"responses": {
"200": {"description": "The 30 years normal (in mm)", "schema": RainfallSchema}
},
"parameters": [param.begin_year, *param.time_params],
"produces": [MediaType.APP_JSON],
"produces": MediaType.APP_JSON,
}
4 changes: 2 additions & 2 deletions src/api/swagger/rainfall/relative_distance_to_normal_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"Only the starting year is compulsory.\n"
"If no ending year is precised, "
"computes the relative distance until most recent year available.",
"tags": ["rainfall"],
"tags": ["Rainfall"],
"responses": {
"200": {
"description": "The relative distance to normal as a percentage.",
Expand All @@ -37,5 +37,5 @@
param.end_year,
*param.time_params,
],
"produces": [MediaType.APP_JSON],
"produces": MediaType.APP_JSON,
}
4 changes: 2 additions & 2 deletions src/api/swagger/rainfall/standard_deviation_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"description": "Only the starting year is compulsory.\n"
"If no ending year is precised, "
"computes average until most recent year available.",
"tags": ["rainfall"],
"tags": ["Rainfall"],
"responses": {
"200": {
"description": "The rainfall standard deviation (in mm)",
"schema": RainfallSchema,
}
},
"parameters": [param.begin_year, param.end_year, *param.time_params],
"produces": [MediaType.APP_JSON],
"produces": MediaType.APP_JSON,
}
4 changes: 2 additions & 2 deletions src/api/swagger/year/above_normal_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"summary": "Computes the number of years above normal for a specific year range.",
"description": "Normal is computed as a 30 years average "
"starting from the year set via normal_year.",
"tags": ["year"],
"tags": ["Year"],
"responses": {
"200": {
"description": "the number of years above normal",
Expand All @@ -27,5 +27,5 @@
param.end_year,
*param.time_params,
],
"produces": [MediaType.APP_JSON],
"produces": MediaType.APP_JSON,
}
4 changes: 2 additions & 2 deletions src/api/swagger/year/below_normal_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"summary": "Computes the number of years below normal for a specific year range.",
"description": "Normal is computed as a 30 years average "
"starting from the year set via normal_year.",
"tags": ["year"],
"tags": ["Year"],
"responses": {
"200": {
"description": "The number of years below normal",
Expand All @@ -27,5 +27,5 @@
param.end_year,
*param.time_params,
],
"produces": [MediaType.APP_JSON],
"produces": MediaType.APP_JSON,
}

0 comments on commit 11127e3

Please sign in to comment.