Skip to content

Commit 969904b

Browse files
authored
Merge pull request #451 from tisnik/regenerated-openapi-spec
Regenerated OpenAPI spec + doc
2 parents 7364a65 + ad19fb2 commit 969904b

File tree

3 files changed

+269
-26
lines changed

3 files changed

+269
-26
lines changed

docs/openapi.json

Lines changed: 134 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,50 @@
698698
},
699699
"components": {
700700
"schemas": {
701+
"AccessRule": {
702+
"properties": {
703+
"role": {
704+
"type": "string",
705+
"title": "Role"
706+
},
707+
"actions": {
708+
"items": {
709+
"$ref": "#/components/schemas/Action"
710+
},
711+
"type": "array",
712+
"title": "Actions"
713+
}
714+
},
715+
"type": "object",
716+
"required": [
717+
"role",
718+
"actions"
719+
],
720+
"title": "AccessRule",
721+
"description": "Rule defining what actions a role can perform."
722+
},
723+
"Action": {
724+
"type": "string",
725+
"enum": [
726+
"admin",
727+
"list_other_conversations",
728+
"read_other_conversations",
729+
"query_other_conversations",
730+
"delete_other_conversations",
731+
"query",
732+
"streaming_query",
733+
"get_conversation",
734+
"list_conversations",
735+
"delete_conversation",
736+
"feedback",
737+
"get_models",
738+
"get_metrics",
739+
"get_config",
740+
"info"
741+
],
742+
"title": "Action",
743+
"description": "Available actions in the system."
744+
},
701745
"Attachment": {
702746
"properties": {
703747
"attachment_type": {
@@ -721,7 +765,7 @@
721765
"title": "Content",
722766
"description": "The actual attachment content",
723767
"examples": [
724-
"warning: quota exceed"
768+
"warning: quota exceeded"
725769
]
726770
}
727771
},
@@ -732,7 +776,7 @@
732776
"content"
733777
],
734778
"title": "Attachment",
735-
"description": "Model representing an attachment that can be send from UI as part of query.\n\nList of attachments can be optional part of 'query' request.\n\nAttributes:\n attachment_type: The attachment type, like \"log\", \"configuration\" etc.\n content_type: The content type as defined in MIME standard\n content: The actual attachment content\n\nYAML attachments with **kind** and **metadata/name** attributes will\nbe handled as resources with specified name:\n```\nkind: Pod\nmetadata:\n name: private-reg\n```",
779+
"description": "Model representing an attachment that can be send from the UI as part of query.\n\nA list of attachments can be an optional part of 'query' request.\n\nAttributes:\n attachment_type: The attachment type, like \"log\", \"configuration\" etc.\n content_type: The content type as defined in MIME standard\n content: The actual attachment content\n\nYAML attachments with **kind** and **metadata/name** attributes will\nbe handled as resources with the specified name:\n```\nkind: Pod\nmetadata:\n name: private-reg\n```",
736780
"examples": [
737781
{
738782
"attachment_type": "log",
@@ -803,6 +847,20 @@
803847
"title": "AuthenticationConfiguration",
804848
"description": "Authentication configuration."
805849
},
850+
"AuthorizationConfiguration": {
851+
"properties": {
852+
"access_rules": {
853+
"items": {
854+
"$ref": "#/components/schemas/AccessRule"
855+
},
856+
"type": "array",
857+
"title": "Access Rules"
858+
}
859+
},
860+
"type": "object",
861+
"title": "AuthorizationConfiguration",
862+
"description": "Authorization configuration."
863+
},
806864
"AuthorizedResponse": {
807865
"properties": {
808866
"user_id": {
@@ -917,6 +975,16 @@
917975
"skip_tls_verification": false
918976
}
919977
},
978+
"authorization": {
979+
"anyOf": [
980+
{
981+
"$ref": "#/components/schemas/AuthorizationConfiguration"
982+
},
983+
{
984+
"type": "null"
985+
}
986+
]
987+
},
920988
"customization": {
921989
"anyOf": [
922990
{
@@ -1040,7 +1108,7 @@
10401108
"conversation_id"
10411109
],
10421110
"title": "ConversationDetails",
1043-
"description": "Model representing the details of a user conversation.\n\nAttributes:\n conversation_id: The conversation ID (UUID).\n created_at: When the conversation was created.\n last_message_at: When the last message was sent.\n message_count: Number of user messages in the conversation.\n model: The model used for the conversation.\n\nExample:\n ```python\n conversation = ConversationSummary(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\"\n created_at=\"2024-01-01T00:00:00Z\",\n last_message_at=\"2024-01-01T00:05:00Z\",\n message_count=5,\n model=\"gemini/gemini-2.0-flash\"\n )\n ```"
1111+
"description": "Model representing the details of a user conversation.\n\nAttributes:\n conversation_id: The conversation ID (UUID).\n created_at: When the conversation was created.\n last_message_at: When the last message was sent.\n message_count: Number of user messages in the conversation.\n last_used_model: The last model used for the conversation.\n last_used_provider: The provider of the last used model.\n\nExample:\n ```python\n conversation = ConversationDetails(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\"\n created_at=\"2024-01-01T00:00:00Z\",\n last_message_at=\"2024-01-01T00:05:00Z\",\n message_count=5,\n last_used_model=\"gemini/gemini-2.0-flash\",\n last_used_provider=\"gemini\",\n )\n ```"
10441112
},
10451113
"ConversationResponse": {
10461114
"properties": {
@@ -1101,22 +1169,24 @@
11011169
"conversations"
11021170
],
11031171
"title": "ConversationsListResponse",
1104-
"description": "Model representing a response for listing conversations of a user.\n\nAttributes:\n conversations: List of conversation details associated with the user.\n\nExample:\n ```python\n conversations_list = ConversationsListResponse(\n conversations=[\n ConversationDetails(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\",\n created_at=\"2024-01-01T00:00:00Z\",\n last_message_at=\"2024-01-01T00:05:00Z\",\n message_count=5,\n model=\"gemini/gemini-2.0-flash\"\n ),\n ConversationDetails(\n conversation_id=\"456e7890-e12b-34d5-a678-901234567890\"\n created_at=\"2024-01-01T01:00:00Z\",\n message_count=2,\n model=\"gemini/gemini-2.5-flash\"\n )\n ]\n )\n ```",
1172+
"description": "Model representing a response for listing conversations of a user.\n\nAttributes:\n conversations: List of conversation details associated with the user.\n\nExample:\n ```python\n conversations_list = ConversationsListResponse(\n conversations=[\n ConversationDetails(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\",\n created_at=\"2024-01-01T00:00:00Z\",\n last_message_at=\"2024-01-01T00:05:00Z\",\n message_count=5,\n last_used_model=\"gemini/gemini-2.0-flash\",\n last_used_provider=\"gemini\",\n ),\n ConversationDetails(\n conversation_id=\"456e7890-e12b-34d5-a678-901234567890\"\n created_at=\"2024-01-01T01:00:00Z\",\n message_count=2,\n last_used_model=\"gemini/gemini-2.0-flash\",\n last_used_provider=\"gemini\",\n )\n ]\n )\n ```",
11051173
"examples": [
11061174
{
11071175
"conversations": [
11081176
{
11091177
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
11101178
"created_at": "2024-01-01T00:00:00Z",
11111179
"last_message_at": "2024-01-01T00:05:00Z",
1112-
"message_count": 5,
1113-
"model": "gemini/gemini-2.0-flash"
1180+
"last_used_model": "gemini/gemini-2.0-flash",
1181+
"last_used_provider": "gemini",
1182+
"message_count": 5
11141183
},
11151184
{
11161185
"conversation_id": "456e7890-e12b-34d5-a678-901234567890",
11171186
"created_at": "2024-01-01T01:00:00Z",
1118-
"message_count": 2,
1119-
"model": "gemini/gemini-2.5-flash"
1187+
"last_used_model": "gemini/gemini-2.5-flash",
1188+
"last_used_provider": "gemini",
1189+
"message_count": 2
11201190
}
11211191
]
11221192
}
@@ -1464,14 +1534,24 @@
14641534
"version"
14651535
],
14661536
"title": "InfoResponse",
1467-
"description": "Model representing a response to a 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 ```",
1537+
"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 ```",
14681538
"examples": [
14691539
{
14701540
"name": "Lightspeed Stack",
14711541
"version": "1.0.0"
14721542
}
14731543
]
14741544
},
1545+
"JsonPathOperator": {
1546+
"type": "string",
1547+
"enum": [
1548+
"equals",
1549+
"contains",
1550+
"in"
1551+
],
1552+
"title": "JsonPathOperator",
1553+
"description": "Supported operators for JSONPath evaluation."
1554+
},
14751555
"JwkConfiguration": {
14761556
"properties": {
14771557
"url": {
@@ -1484,7 +1564,8 @@
14841564
"$ref": "#/components/schemas/JwtConfiguration",
14851565
"default": {
14861566
"user_id_claim": "user_id",
1487-
"username_claim": "username"
1567+
"username_claim": "username",
1568+
"role_rules": []
14881569
}
14891570
}
14901571
},
@@ -1506,12 +1587,54 @@
15061587
"type": "string",
15071588
"title": "Username Claim",
15081589
"default": "username"
1590+
},
1591+
"role_rules": {
1592+
"items": {
1593+
"$ref": "#/components/schemas/JwtRoleRule"
1594+
},
1595+
"type": "array",
1596+
"title": "Role Rules"
15091597
}
15101598
},
15111599
"type": "object",
15121600
"title": "JwtConfiguration",
15131601
"description": "JWT configuration."
15141602
},
1603+
"JwtRoleRule": {
1604+
"properties": {
1605+
"jsonpath": {
1606+
"type": "string",
1607+
"title": "Jsonpath"
1608+
},
1609+
"operator": {
1610+
"$ref": "#/components/schemas/JsonPathOperator"
1611+
},
1612+
"negate": {
1613+
"type": "boolean",
1614+
"title": "Negate",
1615+
"default": false
1616+
},
1617+
"value": {
1618+
"title": "Value"
1619+
},
1620+
"roles": {
1621+
"items": {
1622+
"type": "string"
1623+
},
1624+
"type": "array",
1625+
"title": "Roles"
1626+
}
1627+
},
1628+
"type": "object",
1629+
"required": [
1630+
"jsonpath",
1631+
"operator",
1632+
"value",
1633+
"roles"
1634+
],
1635+
"title": "JwtRoleRule",
1636+
"description": "Rule for extracting roles from JWT claims."
1637+
},
15151638
"LivenessResponse": {
15161639
"properties": {
15171640
"alive": {
@@ -2237,4 +2360,4 @@
22372360
}
22382361
}
22392362
}
2240-
}
2363+
}

docs/openapi.md

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,26 @@ Prometheus format.
404404

405405

406406

407+
## AccessRule
408+
409+
410+
Rule defining what actions a role can perform.
411+
412+
413+
| Field | Type | Description |
414+
|-------|------|-------------|
415+
| role | string | |
416+
| actions | array | |
417+
418+
419+
## Action
420+
421+
422+
Available actions in the system.
423+
424+
425+
426+
407427
## Attachment
408428

409429

@@ -447,6 +467,17 @@ Authentication configuration.
447467
| jwk_config | | |
448468

449469

470+
## AuthorizationConfiguration
471+
472+
473+
Authorization configuration.
474+
475+
476+
| Field | Type | Description |
477+
|-------|------|-------------|
478+
| access_rules | array | |
479+
480+
450481
## AuthorizedResponse
451482

452483

@@ -492,6 +523,7 @@ Global service configuration.
492523
| database | | |
493524
| mcp_servers | array | |
494525
| authentication | | |
526+
| authorization | | |
495527
| customization | | |
496528
| inference | | |
497529

@@ -533,16 +565,18 @@ Attributes:
533565
created_at: When the conversation was created.
534566
last_message_at: When the last message was sent.
535567
message_count: Number of user messages in the conversation.
536-
model: The model used for the conversation.
568+
last_used_model: The last model used for the conversation.
569+
last_used_provider: The provider of the last used model.
537570

538571
Example:
539572
```python
540-
conversation = ConversationSummary(
573+
conversation = ConversationDetails(
541574
conversation_id="123e4567-e89b-12d3-a456-426614174000"
542575
created_at="2024-01-01T00:00:00Z",
543576
last_message_at="2024-01-01T00:05:00Z",
544577
message_count=5,
545-
model="gemini/gemini-2.0-flash"
578+
last_used_model="gemini/gemini-2.0-flash",
579+
last_used_provider="gemini",
546580
)
547581
```
548582

@@ -607,13 +641,15 @@ Example:
607641
created_at="2024-01-01T00:00:00Z",
608642
last_message_at="2024-01-01T00:05:00Z",
609643
message_count=5,
610-
model="gemini/gemini-2.0-flash"
644+
last_used_model="gemini/gemini-2.0-flash",
645+
last_used_provider="gemini",
611646
),
612647
ConversationDetails(
613648
conversation_id="456e7890-e12b-34d5-a678-901234567890"
614649
created_at="2024-01-01T01:00:00Z",
615650
message_count=2,
616-
model="gemini/gemini-2.5-flash"
651+
last_used_model="gemini/gemini-2.0-flash",
652+
last_used_provider="gemini",
617653
)
618654
]
619655
)
@@ -773,7 +809,7 @@ Inference configuration.
773809
## InfoResponse
774810

775811

776-
Model representing a response to a info request.
812+
Model representing a response to an info request.
777813

778814
Attributes:
779815
name: Service name.
@@ -794,6 +830,14 @@ Example:
794830
| version | string | Service version |
795831

796832

833+
## JsonPathOperator
834+
835+
836+
Supported operators for JSONPath evaluation.
837+
838+
839+
840+
797841
## JwkConfiguration
798842

799843

@@ -816,6 +860,22 @@ JWT configuration.
816860
|-------|------|-------------|
817861
| user_id_claim | string | |
818862
| username_claim | string | |
863+
| role_rules | array | |
864+
865+
866+
## JwtRoleRule
867+
868+
869+
Rule for extracting roles from JWT claims.
870+
871+
872+
| Field | Type | Description |
873+
|-------|------|-------------|
874+
| jsonpath | string | |
875+
| operator | | |
876+
| negate | boolean | |
877+
| value | | |
878+
| roles | array | |
819879

820880

821881
## LivenessResponse

0 commit comments

Comments
 (0)