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:
@@ -21,13 +21,17 @@ class FeedInTariffImportCommonSettings(SettingsBaseModel):
|
||||
|
||||
import_file_path: Optional[Union[str, Path]] = Field(
|
||||
default=None,
|
||||
description="Path to the file to import feed in tariff data from.",
|
||||
examples=[None, "/path/to/feedintariff.json"],
|
||||
json_schema_extra={
|
||||
"description": "Path to the file to import feed in tariff data from.",
|
||||
"examples": [None, "/path/to/feedintariff.json"],
|
||||
},
|
||||
)
|
||||
import_json: Optional[str] = Field(
|
||||
default=None,
|
||||
description="JSON string, dictionary of feed in tariff forecast value lists.",
|
||||
examples=['{"fead_in_tariff_wh": [0.000078, 0.000078, 0.000023]}'],
|
||||
json_schema_extra={
|
||||
"description": "JSON string, dictionary of feed in tariff forecast value lists.",
|
||||
"examples": ['{"fead_in_tariff_wh": [0.000078, 0.000078, 0.000023]}'],
|
||||
},
|
||||
)
|
||||
|
||||
# Validators
|
||||
|
||||
Reference in New Issue
Block a user