Skip to content

Commit e42062c

Browse files
authored
Merge pull request #501 from are-ces/liveness-endpoint
LCORE-286: update /liveness endpoint
2 parents b99ec36 + 1bc75dc commit e42062c

File tree

5 files changed

+2
-17
lines changed

5 files changed

+2
-17
lines changed

docs/openapi.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -665,16 +665,6 @@
665665
}
666666
}
667667
}
668-
},
669-
"503": {
670-
"description": "Service is not alive",
671-
"content": {
672-
"application/json": {
673-
"schema": {
674-
"$ref": "#/components/schemas/LivenessResponse"
675-
}
676-
}
677-
}
678668
}
679669
}
680670
}

docs/openapi.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ Returns:
376376
| Status Code | Description | Component |
377377
|-------------|-------------|-----------|
378378
| 200 | Service is alive | [LivenessResponse](#livenessresponse) |
379-
| 503 | Service is not alive | [LivenessResponse](#livenessresponse) |
380379
## POST `/authorized`
381380

382381
> **Authorized Endpoint Handler**

docs/output.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ Returns:
376376
| Status Code | Description | Component |
377377
|-------------|-------------|-----------|
378378
| 200 | Service is alive | [LivenessResponse](#livenessresponse) |
379-
| 503 | Service is not alive | [LivenessResponse](#livenessresponse) |
380379
## POST `/authorized`
381380

382381
> **Authorized Endpoint Handler**

src/app/endpoints/health.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ async def readiness_probe_get_method(
117117
"description": "Service is alive",
118118
"model": LivenessResponse,
119119
},
120-
503: {
121-
"description": "Service is not alive",
122-
"model": LivenessResponse,
123-
},
120+
# HTTP_503_SERVICE_UNAVAILABLE will never be returned when unreachable
124121
}
125122

126123

tests/integration/test_openapi_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_servers_section_present(spec: dict):
7070
("/v1/conversations/{conversation_id}", "get", {"200", "404", "503", "422"}),
7171
("/v1/conversations/{conversation_id}", "delete", {"200", "404", "503", "422"}),
7272
("/readiness", "get", {"200", "503"}),
73-
("/liveness", "get", {"200", "503"}),
73+
("/liveness", "get", {"200"}),
7474
("/authorized", "post", {"200", "400", "403"}),
7575
("/metrics", "get", {"200"}),
7676
],

0 commit comments

Comments
 (0)