Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions documentation/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Infrastructure / Support

Bugfixes
-----------
* Allow flex-model and flex-context to be missing from scheduling requests, because by now the whole flex-config can be defined on assets (in the db) instead [see `PR #2237 <https://www.github.com/FlexMeasures/flexmeasures/pull/2237>`_]
* Let storage scheduling treat missing constant SoC bounds as unconstrained lower or upper bounds [see `PR #2221 <https://www.github.com/FlexMeasures/flexmeasures/pull/2221>`_]
* Allow root assets belonging to different accounts to share the same name, while keeping asset names unique among root assets within the same account and among children of the same parent [see `PR #2226 <https://www.github.com/FlexMeasures/flexmeasures/pull/2226>`_]

Expand Down
12 changes: 6 additions & 6 deletions flexmeasures/api/v3_0/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, *args, **kwargs):

flex_context = fields.Nested(
flex_context_schema_openAPI,
required=True,
load_default={},
data_key="flex-context",
metadata=dict(
description="The flex-context is validated according to the scheduler's `FlexContextSchema`.",
Expand All @@ -115,11 +115,11 @@ def __init__(self, *args, **kwargs):
flex_model = fields.List(
fields.Nested(
storage_flex_model_schema_openAPI(exclude=["asset"]),
required=True,
data_key="flex-model",
metadata=dict(
description="Flex-model per device (identified by `sensor`). The flex-model validation is handled by the scheduler. What follows is the schema used by the `StorageScheduler`.",
),
),
load_default=[],
data_key="flex-model",
metadata=dict(
description="Flex-model per device (identified by `sensor`). The flex-model may (partly) also be defined on the asset, and sending it here overrides those settings for the schedule at hand. The flex-model validation is handled by the scheduler. What follows is the schema used by the `StorageScheduler`.",
),
)

Expand Down
7 changes: 4 additions & 3 deletions flexmeasures/ui/static/openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6255,14 +6255,16 @@
"example": "PT2H",
"format": "duration"
},
"flex_model": {
"flex-model": {
"type": "array",
"default": [],
"description": "Flex-model per device (identified by `sensor`). The flex-model may (partly) also be defined on the asset, and sending it here overrides those settings for the schedule at hand. The flex-model validation is handled by the scheduler. What follows is the schema used by the `StorageScheduler`.",
"items": {
"description": "Flex-model per device (identified by `sensor`). The flex-model validation is handled by the scheduler. What follows is the schema used by the `StorageScheduler`.",
"$ref": "#/components/schemas/StorageFlexModelSchemaOpenAPI"
}
},
"flex-context": {
"default": {},
"description": "The flex-context is validated according to the scheduler's `FlexContextSchema`.",
"$ref": "#/components/schemas/FlexContextOpenAPISchema"
},
Expand All @@ -6277,7 +6279,6 @@
}
},
"required": [
"flex-context",
"start"
],
"additionalProperties": false
Expand Down
Loading