generated from coulomb/repo-seed
46 lines
873 B
Python
46 lines
873 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class Link(BaseModel):
|
|
rel: str
|
|
href: str
|
|
|
|
|
|
class CatalogItem(BaseModel):
|
|
slug: str
|
|
name: str
|
|
description: str | None = None
|
|
|
|
|
|
class HubResource(BaseModel):
|
|
slug: str
|
|
name: str
|
|
status: str = "active"
|
|
description: str | None = None
|
|
capabilities: list[str] = Field(default_factory=list)
|
|
links: list[Link] = Field(default_factory=list)
|
|
|
|
|
|
class HubCapabilityManifest(BaseModel):
|
|
hub_slug: str
|
|
manifest_version: str = "0.1.0"
|
|
capabilities: list[str] = Field(default_factory=list)
|
|
endpoints: list[Link] = Field(default_factory=list)
|
|
|
|
|
|
class HealthResponse(BaseModel):
|
|
service: str
|
|
status: str
|
|
version: str
|
|
|
|
|
|
class ReadinessResponse(BaseModel):
|
|
service: str
|
|
status: str
|
|
checks: dict[str, str]
|
|
|
|
|
|
class ErrorDetail(BaseModel):
|
|
code: str
|
|
message: str
|