Skip to content
Open
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
12 changes: 6 additions & 6 deletions src/healthchecks_io/schemas/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ class CheckCreate(BaseModel):
description="Enables upsert functionality. Before creating a check, "
"Healthchecks.io looks for existing checks, filtered by fields listed "
"in unique. If Healthchecks.io does not find a matching check, it "
"creates a new check and returns it with the HTTP status code 201 "
"creates a new check and returns it with the HTTP status code 201. "
"If Healthchecks.io finds a matching check, it updates the existing "
"check and returns it with HTTP status code 200. The accepted values "
"for the unique field are name, tags, timeout, and grace.",
"for the unique field are name, slug, tags, timeout, and grace.",
)

@field_validator("schedule")
Expand Down Expand Up @@ -155,9 +155,9 @@ def validate_methods(cls, value: str) -> str:
def validate_unique(cls, value: List[Optional[str]]) -> List[Optional[str]]:
"""Validate unique list."""
for unique in value:
if unique not in ("name", "tags", "timeout", "grace"):
if unique not in ("name", "slug", "tags", "timeout", "grace"):
raise ValueError(
"Unique is not valid. Unique can only be name, tags, timeout, and grace or an empty list"
"Unique is not valid. Unique can only be name, slug, tags, timeout, and grace or an empty list"
)
return value

Expand Down Expand Up @@ -219,10 +219,10 @@ class CheckUpdate(CheckCreate):
description="Enables upsert functionality. Before creating a check, "
"Healthchecks.io looks for existing checks, filtered by fields listed "
"in unique. If Healthchecks.io does not find a matching check, it "
"creates a new check and returns it with the HTTP status code 201 "
"creates a new check and returns it with the HTTP status code 201. "
"If Healthchecks.io finds a matching check, it updates the existing "
"check and returns it with HTTP status code 200. The accepted values "
"for the unique field are name, tags, timeout, and grace.",
"for the unique field are name, slug, tags, timeout, and grace.",
)


Expand Down