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
16 changes: 8 additions & 8 deletions docs/openapi/monitoring-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -29659,7 +29659,7 @@
"updatedAt",
"displayOrder",
"pageOrder",
"collapsed"
"defaultOpen"
],
"type": "object",
"properties": {
Expand All @@ -29686,7 +29686,7 @@
"type": "integer",
"format": "int32"
},
"collapsed": {
"defaultOpen": {
"type": "boolean"
},
"components": {
Expand Down Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}
Expand Down
20 changes: 12 additions & 8 deletions src/devhelm/_generated.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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")]
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions tests/test_negative_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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]})


# ===================================================================
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading