diff --git a/docs/openapi/monitoring-api.json b/docs/openapi/monitoring-api.json index 3cde442..9e73bdb 100644 --- a/docs/openapi/monitoring-api.json +++ b/docs/openapi/monitoring-api.json @@ -22744,9 +22744,9 @@ "format": "int32", "nullable": true }, - "collapsed": { + "defaultOpen": { "type": "boolean", - "description": "Whether the group is collapsed by default (default: true)", + "description": "Initial expand/collapse state when a visitor first loads the page; renderer may auto-expand on active incidents (default: true)", "nullable": true } } @@ -22816,7 +22816,7 @@ }, "startDate": { "type": "string", - "description": "Date from which to start showing uptime data", + "description": "Date from which to start showing uptime; defaults to component creation. Set earlier to backdate (e.g. launch day); clamped at the monitor's createdAt for MONITOR-type components", "format": "date", "nullable": true } @@ -29659,7 +29659,7 @@ "updatedAt", "displayOrder", "pageOrder", - "collapsed" + "defaultOpen" ], "type": "object", "properties": { @@ -29686,7 +29686,7 @@ "type": "integer", "format": "int32" }, - "collapsed": { + "defaultOpen": { "type": "boolean" }, "components": { @@ -32405,9 +32405,9 @@ "format": "int32", "nullable": true }, - "collapsed": { + "defaultOpen": { "type": "boolean", - "description": "Whether the group is collapsed by default; null preserves current", + "description": "Initial expand/collapse state on first page load; null preserves current. Renderer may auto-expand on active incidents", "nullable": true } } @@ -32458,7 +32458,7 @@ }, "startDate": { "type": "string", - "description": "Date from which to start showing uptime data; null preserves current", + "description": "Date from which to start showing uptime; null preserves current. Bars never extend earlier than the underlying monitor's createdAt regardless of value", "format": "date", "nullable": true } diff --git a/src/devhelm/_generated.py b/src/devhelm/_generated.py index 40171d6..8969c84 100644 --- a/src/devhelm/_generated.py +++ b/src/devhelm/_generated.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: .openapi-preprocessed.json -# timestamp: 2026-04-22T07:20:30+00:00 +# timestamp: 2026-04-22T14:03:54+00:00 from __future__ import annotations from typing import Annotated, Any, Literal @@ -1023,9 +1023,12 @@ class CreateStatusPageComponentGroupRequest(BaseModel): int | None, Field(alias="displayOrder", description="Position in the group list"), ] = None - collapsed: Annotated[ + default_open: Annotated[ bool | None, - Field(description="Whether the group is collapsed by default (default: true)"), + Field( + alias="defaultOpen", + description="Initial expand/collapse state when a visitor first loads the page; renderer may auto-expand on active incidents (default: true)", + ), ] = None @@ -1088,7 +1091,7 @@ class CreateStatusPageComponentRequest(BaseModel): date_aliased | None, Field( alias="startDate", - description="Date from which to start showing uptime data", + description="Date from which to start showing uptime; defaults to component creation. Set earlier to backdate (e.g. launch day); clamped at the monitor's createdAt for MONITOR-type components", ), ] = None @@ -4730,7 +4733,7 @@ class StatusPageComponentGroupDto(BaseModel): description: str | None = None display_order: Annotated[int, Field(alias="displayOrder")] page_order: Annotated[int, Field(alias="pageOrder")] - collapsed: bool + default_open: Annotated[bool, Field(alias="defaultOpen")] components: list[StatusPageComponentDto] | None = None created_at: Annotated[AwareDatetime, Field(alias="createdAt")] updated_at: Annotated[AwareDatetime, Field(alias="updatedAt")] @@ -5760,10 +5763,11 @@ class UpdateStatusPageComponentGroupRequest(BaseModel): description="New position in the group list; null preserves current", ), ] = None - collapsed: Annotated[ + default_open: Annotated[ bool | None, Field( - description="Whether the group is collapsed by default; null preserves current" + alias="defaultOpen", + description="Initial expand/collapse state on first page load; null preserves current. Renderer may auto-expand on active incidents", ), ] = None @@ -5825,7 +5829,7 @@ class UpdateStatusPageComponentRequest(BaseModel): date_aliased | None, Field( alias="startDate", - description="Date from which to start showing uptime data; null preserves current", + description="Date from which to start showing uptime; null preserves current. Bars never extend earlier than the underlying monitor's createdAt regardless of value", ), ] = None diff --git a/tests/test_negative_validation.py b/tests/test_negative_validation.py index 5c4b71b..8fd6ba1 100644 --- a/tests/test_negative_validation.py +++ b/tests/test_negative_validation.py @@ -299,7 +299,7 @@ def _sp_group(**kw: object) -> dict[str, Any]: "name": "Infra", "displayOrder": 0, "pageOrder": 0, - "collapsed": True, + "defaultOpen": True, "createdAt": NOW, "updatedAt": NOW, } @@ -1874,9 +1874,9 @@ def test_missing_display_order(self) -> None: _del(_sp_group(), "displayOrder") ) - def test_missing_collapsed(self) -> None: - with pytest.raises(ValidationError, match="collapsed"): - StatusPageComponentGroupDto.model_validate(_del(_sp_group(), "collapsed")) + def test_missing_default_open(self) -> None: + with pytest.raises(ValidationError, match="defaultOpen"): + StatusPageComponentGroupDto.model_validate(_del(_sp_group(), "defaultOpen")) def test_empty_dict(self) -> None: with pytest.raises(ValidationError): @@ -1924,9 +1924,9 @@ def test_description_too_long(self) -> None: {"description": "x" * 501} ) - def test_wrong_collapsed_type(self) -> None: + def test_wrong_default_open_type(self) -> None: with pytest.raises(ValidationError): - UpdateStatusPageComponentGroupRequest.model_validate({"collapsed": [1]}) + UpdateStatusPageComponentGroupRequest.model_validate({"defaultOpen": [1]}) # =================================================================== diff --git a/uv.lock b/uv.lock index 88df424..b27703c 100644 --- a/uv.lock +++ b/uv.lock @@ -331,7 +331,7 @@ wheels = [ [[package]] name = "devhelm" -version = "0.2.0" +version = "0.2.1" source = { editable = "." } dependencies = [ { name = "httpx" },