Skip to content

Commit 6c7b589

Browse files
authored
Merge pull request #1934 from tisnik/lcore-2572-3
LCORE-2572: Up to date OpenAPI documentation for /config and health endpoints
2 parents fedd645 + 197b4ea commit 6c7b589

4 files changed

Lines changed: 51 additions & 3 deletions

File tree

docs/openapi.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6710,7 +6710,7 @@
67106710
"config"
67116711
],
67126712
"summary": "Config Endpoint Handler",
6713-
"description": "Handle requests to the /config endpoint.\n\nProcess GET requests to the /config endpoint and returns the\ncurrent service configuration.\n\nEnsures the application configuration is loaded before returning it.\n\n### Parameters:\n- request: The incoming HTTP request.\n- auth: Authentication tuple from the auth dependency.\n\n### Returns:\n- ConfigurationResponse: The loaded service configuration response.",
6713+
"description": "Handle requests to the /config endpoint.\n\nProcess GET requests to the /config endpoint and returns the\ncurrent service configuration.\n\nEnsures the application configuration is loaded before returning it.\n\n### Parameters:\n- request: The incoming HTTP request.\n- auth: Authentication tuple from the auth dependency.\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 500 and a detail object containing `response`\n and `cause` when service configuration is wrong or incomplete.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when unable to connect to Llama Stack.\n\n### Returns:\n- ConfigurationResponse: The loaded service configuration response.",
67146714
"operationId": "config_endpoint_handler_v1_config_get",
67156715
"responses": {
67166716
"200": {
@@ -9964,7 +9964,7 @@
99649964
"health"
99659965
],
99669966
"summary": "Readiness Probe Get Method",
9967-
"description": "Handle the readiness probe endpoint, returning service readiness.\n\nIf any provider reports an error status, responds with HTTP 503\nand details of unhealthy providers; otherwise, indicates the\nservice is ready.\n\n### Parameters:\n- response: The outgoing HTTP response (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Returns:\n- ReadinessResponse: Object with `ready` indicating overall readiness,\n `reason` explaining the outcome, and `providers` containing the list of\n unhealthy ProviderHealthStatus entries (empty when ready).",
9967+
"description": "Handle the readiness probe endpoint, returning service readiness.\n\nIf any provider reports an error status, responds with HTTP 503\nand details of unhealthy providers; otherwise, indicates the\nservice is ready.\n\n### Parameters:\n- response: The outgoing HTTP response (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 500 and a detail object containing `response`\n and `cause` when service configuration is wrong or incomplete.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when unable to connect to Llama Stack.\n\n### Returns:\n- ReadinessResponse: Object with `ready` indicating overall readiness,\n `reason` explaining the outcome, and `providers` containing the list of\n unhealthy ProviderHealthStatus entries (empty when ready).",
99689968
"operationId": "readiness_probe_get_method_readiness_get",
99699969
"responses": {
99709970
"200": {
@@ -10115,7 +10115,7 @@
1011510115
"health"
1011610116
],
1011710117
"summary": "Liveness Probe Get Method",
10118-
"description": "Return the liveness status of the service.\n\n### Parameters:\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Returns:\n- LivenessResponse: Indicates that the service is alive.",
10118+
"description": "Return the liveness status of the service.\n\n### Parameters:\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 500 and a detail object containing `response`\n and `cause` when service configuration is wrong or incomplete.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when unable to connect to Llama Stack.\n\n### Returns:\n- LivenessResponse: Indicates that the service is alive.",
1011910119
"operationId": "liveness_probe_get_method_liveness_get",
1012010120
"responses": {
1012110121
"200": {

docs/openapi.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,6 +3035,14 @@ Ensures the application configuration is loaded before returning it.
30353035
- request: The incoming HTTP request.
30363036
- auth: Authentication tuple from the auth dependency.
30373037

3038+
### Raises:
3039+
- HTTPException: with status 401 for unauthorized access.
3040+
- HTTPException: with status 403 if permission is denied.
3041+
- HTTPException: with status 500 and a detail object containing `response`
3042+
and `cause` when service configuration is wrong or incomplete.
3043+
- HTTPException: with status 503 and a detail object containing `response`
3044+
and `cause` when unable to connect to Llama Stack.
3045+
30383046
### Returns:
30393047
- ConfigurationResponse: The loaded service configuration response.
30403048

@@ -4800,6 +4808,14 @@ service is ready.
48004808
- response: The outgoing HTTP response (used by middleware).
48014809
- auth: Authentication tuple from the auth dependency (used by middleware).
48024810

4811+
### Raises:
4812+
- HTTPException: with status 401 for unauthorized access.
4813+
- HTTPException: with status 403 if permission is denied.
4814+
- HTTPException: with status 500 and a detail object containing `response`
4815+
and `cause` when service configuration is wrong or incomplete.
4816+
- HTTPException: with status 503 and a detail object containing `response`
4817+
and `cause` when unable to connect to Llama Stack.
4818+
48034819
### Returns:
48044820
- ReadinessResponse: Object with `ready` indicating overall readiness,
48054821
`reason` explaining the outcome, and `providers` containing the list of
@@ -4880,6 +4896,14 @@ Return the liveness status of the service.
48804896
### Parameters:
48814897
- auth: Authentication tuple from the auth dependency (used by middleware).
48824898

4899+
### Raises:
4900+
- HTTPException: with status 401 for unauthorized access.
4901+
- HTTPException: with status 403 if permission is denied.
4902+
- HTTPException: with status 500 and a detail object containing `response`
4903+
and `cause` when service configuration is wrong or incomplete.
4904+
- HTTPException: with status 503 and a detail object containing `response`
4905+
and `cause` when unable to connect to Llama Stack.
4906+
48834907
### Returns:
48844908
- LivenessResponse: Indicates that the service is alive.
48854909

src/app/endpoints/config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ async def config_endpoint_handler(
5151
- request: The incoming HTTP request.
5252
- auth: Authentication tuple from the auth dependency.
5353
54+
### Raises:
55+
- HTTPException: with status 401 for unauthorized access.
56+
- HTTPException: with status 403 if permission is denied.
57+
- HTTPException: with status 500 and a detail object containing `response`
58+
and `cause` when service configuration is wrong or incomplete.
59+
- HTTPException: with status 503 and a detail object containing `response`
60+
and `cause` when unable to connect to Llama Stack.
61+
5462
### Returns:
5563
- ConfigurationResponse: The loaded service configuration response.
5664
"""

src/app/endpoints/health.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ async def readiness_probe_get_method(
127127
- response: The outgoing HTTP response (used by middleware).
128128
- auth: Authentication tuple from the auth dependency (used by middleware).
129129
130+
### Raises:
131+
- HTTPException: with status 401 for unauthorized access.
132+
- HTTPException: with status 403 if permission is denied.
133+
- HTTPException: with status 500 and a detail object containing `response`
134+
and `cause` when service configuration is wrong or incomplete.
135+
- HTTPException: with status 503 and a detail object containing `response`
136+
and `cause` when unable to connect to Llama Stack.
137+
130138
### Returns:
131139
- ReadinessResponse: Object with `ready` indicating overall readiness,
132140
`reason` explaining the outcome, and `providers` containing the list of
@@ -177,6 +185,14 @@ async def liveness_probe_get_method(
177185
### Parameters:
178186
- auth: Authentication tuple from the auth dependency (used by middleware).
179187
188+
### Raises:
189+
- HTTPException: with status 401 for unauthorized access.
190+
- HTTPException: with status 403 if permission is denied.
191+
- HTTPException: with status 500 and a detail object containing `response`
192+
and `cause` when service configuration is wrong or incomplete.
193+
- HTTPException: with status 503 and a detail object containing `response`
194+
and `cause` when unable to connect to Llama Stack.
195+
180196
### Returns:
181197
- LivenessResponse: Indicates that the service is alive.
182198
"""

0 commit comments

Comments
 (0)