Skip to content

Commit 1971239

Browse files
authored
Merge pull request #658 from tisnik/lcore-632-updated-openapi-docs---
LCORE-632: updated OpenAPI docs
2 parents 5baf0cc + 7a366a8 commit 1971239

File tree

3 files changed

+321
-39
lines changed

3 files changed

+321
-39
lines changed

docs/openapi.json

Lines changed: 187 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,15 @@
418418
"description": "Streaming response with Server-Sent Events",
419419
"content": {
420420
"application/json": {
421-
"schema": {}
421+
"schema": {
422+
"type": "string",
423+
"example": "data: {\"event\": \"start\", \"data\": {\"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\"}}\n\ndata: {\"event\": \"token\", \"data\": {\"id\": 0, \"token\": \"Hello\"}}\n\ndata: {\"event\": \"end\", \"data\": {\"referenced_documents\": [], \"truncated\": null, \"input_tokens\": 0, \"output_tokens\": 0}, \"available_quotas\": {}}\n\n"
424+
}
422425
},
423-
"text/event-stream": {
426+
"text/plain": {
424427
"schema": {
425428
"type": "string",
426-
"example": "data: {\"event\": \"start\", \"data\": {\"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\"}}\n\ndata: {\"event\": \"token\", \"data\": {\"id\": 0, \"role\": \"inference\", \"token\": \"Hello\"}}\n\ndata: {\"event\": \"end\", \"data\": {\"referenced_documents\": [], \"truncated\": null, \"input_tokens\": 0, \"output_tokens\": 0}, \"available_quotas\": {}}\n\n"
429+
"example": "Hello world!\n\n---\n\nReference: https://example.com/doc"
427430
}
428431
}
429432
}
@@ -1425,7 +1428,7 @@
14251428
}
14261429
]
14271430
},
1428-
"AuthenticationConfiguration": {
1431+
"AuthenticationConfiguration-Input": {
14291432
"properties": {
14301433
"module": {
14311434
"type": "string",
@@ -1465,7 +1468,7 @@
14651468
"jwk_config": {
14661469
"anyOf": [
14671470
{
1468-
"$ref": "#/components/schemas/JwkConfiguration"
1471+
"$ref": "#/components/schemas/JwkConfiguration-Input"
14691472
},
14701473
{
14711474
"type": "null"
@@ -1478,7 +1481,75 @@
14781481
"title": "AuthenticationConfiguration",
14791482
"description": "Authentication configuration."
14801483
},
1481-
"AuthorizationConfiguration": {
1484+
"AuthenticationConfiguration-Output": {
1485+
"properties": {
1486+
"module": {
1487+
"type": "string",
1488+
"title": "Module",
1489+
"default": "noop"
1490+
},
1491+
"skip_tls_verification": {
1492+
"type": "boolean",
1493+
"title": "Skip Tls Verification",
1494+
"default": false
1495+
},
1496+
"k8s_cluster_api": {
1497+
"anyOf": [
1498+
{
1499+
"type": "string",
1500+
"minLength": 1,
1501+
"format": "uri"
1502+
},
1503+
{
1504+
"type": "null"
1505+
}
1506+
],
1507+
"title": "K8S Cluster Api"
1508+
},
1509+
"k8s_ca_cert_path": {
1510+
"anyOf": [
1511+
{
1512+
"type": "string",
1513+
"format": "file-path"
1514+
},
1515+
{
1516+
"type": "null"
1517+
}
1518+
],
1519+
"title": "K8S Ca Cert Path"
1520+
},
1521+
"jwk_config": {
1522+
"anyOf": [
1523+
{
1524+
"$ref": "#/components/schemas/JwkConfiguration-Output"
1525+
},
1526+
{
1527+
"type": "null"
1528+
}
1529+
]
1530+
}
1531+
},
1532+
"additionalProperties": false,
1533+
"type": "object",
1534+
"title": "AuthenticationConfiguration",
1535+
"description": "Authentication configuration."
1536+
},
1537+
"AuthorizationConfiguration-Input": {
1538+
"properties": {
1539+
"access_rules": {
1540+
"items": {
1541+
"$ref": "#/components/schemas/AccessRule"
1542+
},
1543+
"type": "array",
1544+
"title": "Access Rules"
1545+
}
1546+
},
1547+
"additionalProperties": false,
1548+
"type": "object",
1549+
"title": "AuthorizationConfiguration",
1550+
"description": "Authorization configuration."
1551+
},
1552+
"AuthorizationConfiguration-Output": {
14821553
"properties": {
14831554
"access_rules": {
14841555
"items": {
@@ -1653,12 +1724,12 @@
16531724
"title": "Mcp Servers"
16541725
},
16551726
"authentication": {
1656-
"$ref": "#/components/schemas/AuthenticationConfiguration"
1727+
"$ref": "#/components/schemas/AuthenticationConfiguration-Output"
16571728
},
16581729
"authorization": {
16591730
"anyOf": [
16601731
{
1661-
"$ref": "#/components/schemas/AuthorizationConfiguration"
1732+
"$ref": "#/components/schemas/AuthorizationConfiguration-Output"
16621733
},
16631734
{
16641735
"type": "null"
@@ -2595,7 +2666,7 @@
25952666
"title": "JsonPathOperator",
25962667
"description": "Supported operators for JSONPath evaluation."
25972668
},
2598-
"JwkConfiguration": {
2669+
"JwkConfiguration-Input": {
25992670
"properties": {
26002671
"url": {
26012672
"type": "string",
@@ -2604,7 +2675,7 @@
26042675
"title": "Url"
26052676
},
26062677
"jwt_configuration": {
2607-
"$ref": "#/components/schemas/JwtConfiguration"
2678+
"$ref": "#/components/schemas/JwtConfiguration-Input"
26082679
}
26092680
},
26102681
"additionalProperties": false,
@@ -2615,7 +2686,52 @@
26152686
"title": "JwkConfiguration",
26162687
"description": "JWK configuration."
26172688
},
2618-
"JwtConfiguration": {
2689+
"JwkConfiguration-Output": {
2690+
"properties": {
2691+
"url": {
2692+
"type": "string",
2693+
"minLength": 1,
2694+
"format": "uri",
2695+
"title": "Url"
2696+
},
2697+
"jwt_configuration": {
2698+
"$ref": "#/components/schemas/JwtConfiguration-Output"
2699+
}
2700+
},
2701+
"additionalProperties": false,
2702+
"type": "object",
2703+
"required": [
2704+
"url"
2705+
],
2706+
"title": "JwkConfiguration",
2707+
"description": "JWK configuration."
2708+
},
2709+
"JwtConfiguration-Input": {
2710+
"properties": {
2711+
"user_id_claim": {
2712+
"type": "string",
2713+
"title": "User Id Claim",
2714+
"default": "user_id"
2715+
},
2716+
"username_claim": {
2717+
"type": "string",
2718+
"title": "Username Claim",
2719+
"default": "username"
2720+
},
2721+
"role_rules": {
2722+
"items": {
2723+
"$ref": "#/components/schemas/JwtRoleRule"
2724+
},
2725+
"type": "array",
2726+
"title": "Role Rules"
2727+
}
2728+
},
2729+
"additionalProperties": false,
2730+
"type": "object",
2731+
"title": "JwtConfiguration",
2732+
"description": "JWT configuration."
2733+
},
2734+
"JwtConfiguration-Output": {
26192735
"properties": {
26202736
"user_id_claim": {
26212737
"type": "string",
@@ -3207,9 +3323,10 @@
32073323
}
32083324
],
32093325
"title": "Media Type",
3210-
"description": "Media type (used just to enable compatibility)",
3326+
"description": "Media type for the response format",
32113327
"examples": [
3212-
"application/json"
3328+
"application/json",
3329+
"text/plain"
32133330
]
32143331
}
32153332
},
@@ -3219,7 +3336,7 @@
32193336
"query"
32203337
],
32213338
"title": "QueryRequest",
3222-
"description": "Model representing a request for the LLM (Language Model).\n\nAttributes:\n query: The query string.\n conversation_id: The optional conversation ID (UUID).\n provider: The optional provider.\n model: The optional model.\n system_prompt: The optional system prompt.\n attachments: The optional attachments.\n no_tools: Whether to bypass all tools and MCP servers (default: False).\n\nExample:\n ```python\n query_request = QueryRequest(query=\"Tell me about Kubernetes\")\n ```",
3339+
"description": "Model representing a request for the LLM (Language Model).\n\nAttributes:\n query: The query string.\n conversation_id: The optional conversation ID (UUID).\n provider: The optional provider.\n model: The optional model.\n system_prompt: The optional system prompt.\n attachments: The optional attachments.\n no_tools: Whether to bypass all tools and MCP servers (default: False).\n media_type: The optional media type for response format (application/json or text/plain).\n\nExample:\n ```python\n query_request = QueryRequest(query=\"Tell me about Kubernetes\")\n ```",
32233340
"examples": [
32243341
{
32253342
"attachments": [
@@ -3312,17 +3429,69 @@
33123429
}
33133430
]
33143431
]
3432+
},
3433+
"truncated": {
3434+
"type": "boolean",
3435+
"title": "Truncated",
3436+
"description": "Whether conversation history was truncated",
3437+
"default": false,
3438+
"examples": [
3439+
false,
3440+
true
3441+
]
3442+
},
3443+
"input_tokens": {
3444+
"type": "integer",
3445+
"title": "Input Tokens",
3446+
"description": "Number of tokens sent to LLM",
3447+
"default": 0,
3448+
"examples": [
3449+
150,
3450+
250,
3451+
500
3452+
]
3453+
},
3454+
"output_tokens": {
3455+
"type": "integer",
3456+
"title": "Output Tokens",
3457+
"description": "Number of tokens received from LLM",
3458+
"default": 0,
3459+
"examples": [
3460+
50,
3461+
100,
3462+
200
3463+
]
3464+
},
3465+
"available_quotas": {
3466+
"additionalProperties": {
3467+
"type": "integer"
3468+
},
3469+
"type": "object",
3470+
"title": "Available Quotas",
3471+
"description": "Quota available as measured by all configured quota limiters",
3472+
"examples": [
3473+
{
3474+
"daily": 1000,
3475+
"monthly": 50000
3476+
}
3477+
]
33153478
}
33163479
},
33173480
"type": "object",
33183481
"required": [
33193482
"response"
33203483
],
33213484
"title": "QueryResponse",
3322-
"description": "Model representing LLM response to a query.\n\nAttributes:\n conversation_id: The optional conversation ID (UUID).\n response: The response.\n rag_chunks: List of RAG chunks used to generate the response.\n referenced_documents: The URLs and titles for the documents used to generate the response.\n tool_calls: List of tool calls made during response generation.\n TODO: truncated: Whether conversation history was truncated.\n TODO: input_tokens: Number of tokens sent to LLM.\n TODO: output_tokens: Number of tokens received from LLM.\n TODO: available_quotas: Quota available as measured by all configured quota limiters\n TODO: tool_results: List of tool results.",
3485+
"description": "Model representing LLM response to a query.\n\nAttributes:\n conversation_id: The optional conversation ID (UUID).\n response: The response.\n rag_chunks: List of RAG chunks used to generate the response.\n referenced_documents: The URLs and titles for the documents used to generate the response.\n tool_calls: List of tool calls made during response generation.\n truncated: Whether conversation history was truncated.\n input_tokens: Number of tokens sent to LLM.\n output_tokens: Number of tokens received from LLM.\n available_quotas: Quota available as measured by all configured quota limiters.",
33233486
"examples": [
33243487
{
3488+
"available_quotas": {
3489+
"daily": 1000,
3490+
"monthly": 50000
3491+
},
33253492
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
3493+
"input_tokens": 150,
3494+
"output_tokens": 75,
33263495
"rag_chunks": [
33273496
{
33283497
"content": "OLM is a component of the Operator Framework toolkit...",
@@ -3347,7 +3516,8 @@
33473516
},
33483517
"tool_name": "knowledge_search"
33493518
}
3350-
]
3519+
],
3520+
"truncated": false
33513521
}
33523522
]
33533523
},
@@ -3807,4 +3977,4 @@
38073977
}
38083978
}
38093979
}
3810-
}
3980+
}

0 commit comments

Comments
 (0)