Commit 19b790d3 authored by EnesKarakas's avatar EnesKarakas
Browse files

hg

parent 1d2e4b53
...@@ -37,33 +37,33 @@ import java.util.Map; ...@@ -37,33 +37,33 @@ import java.util.Map;
@Validated @Validated
public interface HistoricalweatherApi { public interface HistoricalweatherApi {
@Operation(summary = "Call Historical weather data for one location", description = "Get the historical weather info", tags = { @Operation(summary = "Call Historical weather data for one location", description = "Get the historical weather info", tags = {
"Historical Weather Data" }) "Historical Weather Data" })
@ApiResponses(value = { @ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successful response", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Model200.class))), @ApiResponse(responseCode = "200", description = "Successful response", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Model200.class))),
@ApiResponse(responseCode = "404", description = "Not found response", content = @Content(mediaType = "text/plain", schema = @Schema(implementation = String.class))) }) @ApiResponse(responseCode = "404", description = "Not found response", content = @Content(mediaType = "text/plain", schema = @Schema(implementation = String.class))) })
@RequestMapping(value = "/historicalweather", produces = { "application/json", @RequestMapping(value = "/historicalweather", produces = { "application/json",
"text/plain" }, method = RequestMethod.GET) "text/plain" }, method = RequestMethod.GET)
ResponseEntity<InlineResponse200> historicalWeatherData( ResponseEntity<InlineResponse200> historicalWeatherData(
@NotNull @Parameter(in = ParameterIn.QUERY, description = "Latitude of the location", required = true, schema = @Schema()) @Valid @RequestParam(value = "latitude", required = true) Float latitude, @NotNull @Parameter(in = ParameterIn.QUERY, description = "Latitude of the location", required = true, schema = @Schema()) @Valid @RequestParam(value = "latitude", required = true) Float latitude,
@NotNull @Parameter(in = ParameterIn.QUERY, description = "Longitude of the location", required = true, schema = @Schema()) @Valid @RequestParam(value = "longitude", required = true) Float longitude, @NotNull @Parameter(in = ParameterIn.QUERY, description = "Longitude of the location", required = true, schema = @Schema()) @Valid @RequestParam(value = "longitude", required = true) Float longitude,
@NotNull @Parameter(in = ParameterIn.QUERY, description = "The time interval to get weather data. A day must be specified as an ISO8601 date (e.g. 2022-12-31).", required = true, schema = @Schema()) @Valid @RequestParam(value = "start_date", required = true) String start_date, @NotNull @Parameter(in = ParameterIn.QUERY, description = "The time interval to get weather data. A day must be specified as an ISO8601 date (e.g. 2022-12-31).", required = true, schema = @Schema()) @Valid @RequestParam(value = "start_date", required = true) String start_date,
@NotNull @Parameter(in = ParameterIn.QUERY, description = "The time interval to get weather data. A day must be specified as an ISO8601 date (e.g. 2022-12-31).", required = true, schema = @Schema()) @Valid @RequestParam(value = "end_date", required = true) String end_date, @NotNull @Parameter(in = ParameterIn.QUERY, description = "The time interval to get weather data. A day must be specified as an ISO8601 date (e.g. 2022-12-31).", required = true, schema = @Schema()) @Valid @RequestParam(value = "end_date", required = true) String end_date,
@Parameter(in = ParameterIn.QUERY, description = "If fahrenheit is set, all temperature values are converted to Fahrenheit.", required = false, schema = @Schema()) @Valid @RequestParam(value = "temperature_unit", required = false) String temperature_unit, @Parameter(in = ParameterIn.QUERY, description = "If fahrenheit is set, all temperature values are converted to Fahrenheit.", required = false, schema = @Schema()) @Valid @RequestParam(value = "temperature_unit", required = false) String temperature_unit,
@Parameter(in = ParameterIn.QUERY, description = "Other wind speed speed units: ms, mph and kn", required = false, schema = @Schema()) @Valid @RequestParam(value = "wind_speed_unit", required = false) String wind_speed_unit, @Parameter(in = ParameterIn.QUERY, description = "Other wind speed speed units: ms, mph and kn", required = false, schema = @Schema()) @Valid @RequestParam(value = "wind_speed_unit", required = false) String wind_speed_unit,
@Parameter(in = ParameterIn.QUERY, description = "Other precipitation amount units: inch", required = false, schema = @Schema()) @Valid @RequestParam(value = "precipitation_unit", required = false) String precipitation_unit, @Parameter(in = ParameterIn.QUERY, description = "Other precipitation amount units: inch", required = false, schema = @Schema()) @Valid @RequestParam(value = "precipitation_unit", required = false) String precipitation_unit,
@Parameter(in = ParameterIn.QUERY, description = "If timezone is set, all timestamps are returned as local-time and data is returned starting at 00:00 local-time. Any time zone name from the time zone database is supported If auto is set as a time zone, the coordinates will be automatically resolved to the local time zone. For multiple coordinates, a comma separated list of timezones can be specified.", required = false, schema = @Schema()) @Valid @RequestParam(value = "timezone", required = false) String timezone, @Parameter(in = ParameterIn.QUERY, description = "If timezone is set, all timestamps are returned as local-time and data is returned starting at 00:00 local-time. Any time zone name from the time zone database is supported If auto is set as a time zone, the coordinates will be automatically resolved to the local time zone. For multiple coordinates, a comma separated list of timezones can be specified.", required = false, schema = @Schema()) @Valid @RequestParam(value = "timezone", required = false) String timezone,
@Parameter(in = ParameterIn.QUERY, description = "filter parameter hourly", required = false, schema = @Schema()) @Valid @RequestParam(value = "filterHourly", required = false) String filterHourly, @Parameter(in = ParameterIn.QUERY, description = "filter parameter hourly", required = false, schema = @Schema()) @Valid @RequestParam(value = "filterHourly", required = false) String filterHourly,
@Parameter(in = ParameterIn.QUERY, description = "filter parameter daily", required = false, schema = @Schema()) @Valid @RequestParam(value = "filterDaily", required = false) String filterDaily); @Parameter(in = ParameterIn.QUERY, description = "filter parameter daily", required = false, schema = @Schema()) @Valid @RequestParam(value = "filterDaily", required = false) String filterDaily);
} }
...@@ -61,7 +61,7 @@ public class HistoricalweatherApiController implements HistoricalweatherApi { ...@@ -61,7 +61,7 @@ public class HistoricalweatherApiController implements HistoricalweatherApi {
) { ) {
try { try {
String datafree = "{\"location\":{},\"current\": {\"condition\": {},\"air_quality\": {}}}";
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
ApiService apiService = new ApiService(restTemplate); ApiService apiService = new ApiService(restTemplate);
......
...@@ -70,7 +70,7 @@ public class DayCondition { ...@@ -70,7 +70,7 @@ public class DayCondition {
private Integer dailyChanceOfSnow = null; private Integer dailyChanceOfSnow = null;
@JsonProperty("uv") @JsonProperty("uv")
private Float uv_day = null; private Float uv = null;
public DayCondition maxtempC(Float maxtempC) { public DayCondition maxtempC(Float maxtempC) {
this.maxtempC = maxtempC; this.maxtempC = maxtempC;
...@@ -429,25 +429,25 @@ public class DayCondition { ...@@ -429,25 +429,25 @@ public class DayCondition {
this.dailyChanceOfSnow = dailyChanceOfSnow; this.dailyChanceOfSnow = dailyChanceOfSnow;
} }
public DayCondition uv_day(Float uv_day) { public DayCondition uv(Float uv) {
this.uv_day = uv_day; this.uv = uv;
return this; return this;
} }
/** /**
* Get uv_day * Get uv
* *
* @return uv_day * @return uv
**/ **/
@Schema(description = "") @Schema(description = "")
@NotNull @NotNull
public Float getUv_day() { public Float getUv() {
return uv_day; return uv;
} }
public void setUv_day(Float uv_day) { public void setUv(Float uv) {
this.uv_day = uv_day; this.uv = uv;
} }
@Override @Override
...@@ -476,14 +476,14 @@ public class DayCondition { ...@@ -476,14 +476,14 @@ public class DayCondition {
Objects.equals(this.dailyChanceOfRain, dayCondition.dailyChanceOfRain) && Objects.equals(this.dailyChanceOfRain, dayCondition.dailyChanceOfRain) &&
Objects.equals(this.dailyWillItSnow, dayCondition.dailyWillItSnow) && Objects.equals(this.dailyWillItSnow, dayCondition.dailyWillItSnow) &&
Objects.equals(this.dailyChanceOfSnow, dayCondition.dailyChanceOfSnow) && Objects.equals(this.dailyChanceOfSnow, dayCondition.dailyChanceOfSnow) &&
Objects.equals(this.uv_day, dayCondition.uv_day); Objects.equals(this.uv, dayCondition.uv);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(maxtempC, maxtempF, mintempC, mintempF, avgtempC, avgtempF, maxwindMph, maxwindKph, return Objects.hash(maxtempC, maxtempF, mintempC, mintempF, avgtempC, avgtempF, maxwindMph, maxwindKph,
totalprecipMm, totalprecipIn, avgvisKm, avgvisMiles, avghumidity, dailyWillItRain, dailyChanceOfRain, totalprecipMm, totalprecipIn, avgvisKm, avgvisMiles, avghumidity, dailyWillItRain, dailyChanceOfRain,
dailyWillItSnow, dailyChanceOfSnow, uv_day); dailyWillItSnow, dailyChanceOfSnow, uv);
} }
@Override @Override
...@@ -508,7 +508,7 @@ public class DayCondition { ...@@ -508,7 +508,7 @@ public class DayCondition {
sb.append(" dailyChanceOfRain: ").append(toIndentedString(dailyChanceOfRain)).append("\n"); sb.append(" dailyChanceOfRain: ").append(toIndentedString(dailyChanceOfRain)).append("\n");
sb.append(" dailyWillItSnow: ").append(toIndentedString(dailyWillItSnow)).append("\n"); sb.append(" dailyWillItSnow: ").append(toIndentedString(dailyWillItSnow)).append("\n");
sb.append(" dailyChanceOfSnow: ").append(toIndentedString(dailyChanceOfSnow)).append("\n"); sb.append(" dailyChanceOfSnow: ").append(toIndentedString(dailyChanceOfSnow)).append("\n");
sb.append(" uv_day: ").append(toIndentedString(uv_day)).append("\n"); sb.append(" uv: ").append(toIndentedString(uv)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment