Skip to content

Commit 08a4934

Browse files
committed
Updated OpenAPI documentation
1 parent 9e60ab4 commit 08a4934

File tree

4 files changed

+48
-13
lines changed

4 files changed

+48
-13
lines changed

docs/openapi.json

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@
6363
}
6464
},
6565
"name": "Service name",
66-
"version": "Service version"
66+
"service_version": "Service version",
67+
"llama_stack_version": "Llama Stack version"
68+
},
69+
"500": {
70+
"description": "Internal Server Error",
71+
"detail": {
72+
"response": "Unable to connect to Llama Stack",
73+
"cause": "Connection error."
74+
}
6775
}
6876
}
6977
}
@@ -1606,28 +1614,40 @@
16061614
"Lightspeed Stack"
16071615
]
16081616
},
1609-
"version": {
1617+
"service_version": {
16101618
"type": "string",
1611-
"title": "Version",
1619+
"title": "Service Version",
16121620
"description": "Service version",
16131621
"examples": [
16141622
"0.1.0",
16151623
"0.2.0",
16161624
"1.0.0"
16171625
]
1626+
},
1627+
"llama_stack_version": {
1628+
"type": "string",
1629+
"title": "Llama Stack Version",
1630+
"description": "Llama Stack version",
1631+
"examples": [
1632+
"0.2.1",
1633+
"0.2.2",
1634+
"0.2.18"
1635+
]
16181636
}
16191637
},
16201638
"type": "object",
16211639
"required": [
16221640
"name",
1623-
"version"
1641+
"service_version",
1642+
"llama_stack_version"
16241643
],
16251644
"title": "InfoResponse",
1626-
"description": "Model representing a response to an info request.\n\nAttributes:\n name: Service name.\n version: Service version.\n\nExample:\n ```python\n info_response = InfoResponse(\n name=\"Lightspeed Stack\",\n version=\"1.0.0\",\n )\n ```",
1645+
"description": "Model representing a response to an info request.\n\nAttributes:\n name: Service name.\n service_version: Service version.\n llama_stack_version: Llama Stack version.\n\nExample:\n ```python\n info_response = InfoResponse(\n name=\"Lightspeed Stack\",\n service_version=\"1.0.0\",\n llama_stack_version=\"0.2.18\",\n )\n ```",
16271646
"examples": [
16281647
{
1648+
"llama_stack_version": "1.0.0",
16291649
"name": "Lightspeed Stack",
1630-
"version": "1.0.0"
1650+
"service_version": "1.0.0"
16311651
}
16321652
]
16331653
},

docs/openapi.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Returns:
4848
| Status Code | Description | Component |
4949
|-------------|-------------|-----------|
5050
| 200 | Successful Response | [InfoResponse](#inforesponse) |
51+
| 500 | Internal Server Error | |
5152
## GET `/v1/models`
5253

5354
> **Models Endpoint Handler**
@@ -882,21 +883,24 @@ Model representing a response to an info request.
882883

883884
Attributes:
884885
name: Service name.
885-
version: Service version.
886+
service_version: Service version.
887+
llama_stack_version: Llama Stack version.
886888

887889
Example:
888890
```python
889891
info_response = InfoResponse(
890892
name="Lightspeed Stack",
891-
version="1.0.0",
893+
service_version="1.0.0",
894+
llama_stack_version="0.2.18",
892895
)
893896
```
894897

895898

896899
| Field | Type | Description |
897900
|-------|------|-------------|
898901
| name | string | Service name |
899-
| version | string | Service version |
902+
| service_version | string | Service version |
903+
| llama_stack_version | string | Llama Stack version |
900904

901905

902906
## JsonPathOperator

docs/output.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Returns:
4848
| Status Code | Description | Component |
4949
|-------------|-------------|-----------|
5050
| 200 | Successful Response | [InfoResponse](#inforesponse) |
51+
| 500 | Internal Server Error | |
5152
## GET `/v1/models`
5253

5354
> **Models Endpoint Handler**
@@ -872,21 +873,24 @@ Model representing a response to an info request.
872873

873874
Attributes:
874875
name: Service name.
875-
version: Service version.
876+
service_version: Service version.
877+
llama_stack_version: Llama Stack version.
876878

877879
Example:
878880
```python
879881
info_response = InfoResponse(
880882
name="Lightspeed Stack",
881-
version="1.0.0",
883+
service_version="1.0.0",
884+
llama_stack_version="0.2.18",
882885
)
883886
```
884887

885888

886889
| Field | Type | Description |
887890
|-------|------|-------------|
888891
| name | string | Service name |
889-
| version | string | Service version |
892+
| service_version | string | Service version |
893+
| llama_stack_version | string | Llama Stack version |
890894

891895

892896
## JsonPathOperator

src/app/endpoints/info.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
get_info_responses: dict[int | str, dict[str, Any]] = {
2626
200: {
2727
"name": "Service name",
28-
"version": "Service version",
28+
"service_version": "Service version",
29+
"llama_stack_version": "Llama Stack version",
30+
},
31+
500: {
32+
"detail": {
33+
"response": "Unable to connect to Llama Stack",
34+
"cause": "Connection error.",
35+
}
2936
},
3037
}
3138

0 commit comments

Comments
 (0)