mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-11-25 06:46:25 +00:00
fix: pydantic extra keywords deprecated (#753)
Pydantic deprecates using extra keyword arguments on Field. Used json_schema_extra instead. Deprecated in Pydantic V2.0 to be removed in V3.0. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -22,14 +22,18 @@ class PVForecastImportCommonSettings(SettingsBaseModel):
|
||||
|
||||
import_file_path: Optional[Union[str, Path]] = Field(
|
||||
default=None,
|
||||
description="Path to the file to import PV forecast data from.",
|
||||
examples=[None, "/path/to/pvforecast.json"],
|
||||
json_schema_extra={
|
||||
"description": "Path to the file to import PV forecast data from.",
|
||||
"examples": [None, "/path/to/pvforecast.json"],
|
||||
},
|
||||
)
|
||||
|
||||
import_json: Optional[str] = Field(
|
||||
default=None,
|
||||
description="JSON string, dictionary of PV forecast value lists.",
|
||||
examples=['{"pvforecast_ac_power": [0, 8.05, 352.91]}'],
|
||||
json_schema_extra={
|
||||
"description": "JSON string, dictionary of PV forecast value lists.",
|
||||
"examples": ['{"pvforecast_ac_power": [0, 8.05, 352.91]}'],
|
||||
},
|
||||
)
|
||||
|
||||
# Validators
|
||||
|
||||
Reference in New Issue
Block a user