diff --git a/docs/openapi.json b/docs/openapi.json index 80e27620..ae050ffe 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -2240,18 +2240,29 @@ "properties": { "ready": { "type": "boolean", - "title": "Ready" + "title": "Ready", + "description": "Flag indicating if service is ready", + "examples": [ + true, + false + ] }, "reason": { "type": "string", - "title": "Reason" + "title": "Reason", + "description": "The reason for the readiness", + "examples": [ + "Service is ready" + ] }, "providers": { "items": { "$ref": "#/components/schemas/ProviderHealthStatus" }, "type": "array", - "title": "Providers" + "title": "Providers", + "description": "List of unhealthy providers in case of readiness failure.", + "examples": [] } }, "type": "object", diff --git a/docs/openapi.md b/docs/openapi.md index 0c18c41f..1f57223e 100644 --- a/docs/openapi.md +++ b/docs/openapi.md @@ -754,7 +754,7 @@ Examples: feedback_request = FeedbackRequest( conversation_id="12345678-abcd-0000-0123-456789abcdef", user_question="what are you doing?", - user_feedback="Great service!", + user_feedback="This response is not helpful", llm_response="I don't know", sentiment=1 ) @@ -1124,9 +1124,9 @@ Example: | Field | Type | Description | |-------|------|-------------| -| ready | boolean | | -| reason | string | | -| providers | array | | +| ready | boolean | Flag indicating if service is ready | +| reason | string | The reason for the readiness | +| providers | array | List of unhealthy providers in case of readiness failure. | ## SQLiteDatabaseConfiguration diff --git a/docs/output.md b/docs/output.md index 144fabef..92e9a972 100644 --- a/docs/output.md +++ b/docs/output.md @@ -1114,9 +1114,9 @@ Example: | Field | Type | Description | |-------|------|-------------| -| ready | boolean | | -| reason | string | | -| providers | array | | +| ready | boolean | Flag indicating if service is ready | +| reason | string | The reason for the readiness | +| providers | array | List of unhealthy providers in case of readiness failure. | ## SQLiteDatabaseConfiguration diff --git a/src/models/responses.py b/src/models/responses.py index 96d8dc60..29b5e577 100644 --- a/src/models/responses.py +++ b/src/models/responses.py @@ -173,9 +173,23 @@ class ReadinessResponse(BaseModel): ``` """ - ready: bool - reason: str - providers: list[ProviderHealthStatus] + ready: bool = Field( + ..., + description="Flag indicating if service is ready", + examples=[True, False], + ) + + reason: str = Field( + ..., + description="The reason for the readiness", + examples=["Service is ready"], + ) + + providers: list[ProviderHealthStatus] = Field( + ..., + description="List of unhealthy providers in case of readiness failure.", + examples=[], + ) # provides examples for /docs endpoint model_config = {