-
Notifications
You must be signed in to change notification settings - Fork 52
LCORE-433: Updated OpenAPI doc #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -165,11 +165,13 @@ Returns: | |||||||||||||||
|
|
||||||||||||||||
| | Status Code | Description | Component | | ||||||||||||||||
| |-------------|-------------|-----------| | ||||||||||||||||
| | 200 | Successful Response | [FeedbackResponse](#feedbackresponse) | ||||||||||||||||
| | 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) | ||||||||||||||||
| | 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) | ||||||||||||||||
| | 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 500 | User feedback can not be stored | [ErrorResponse](#errorresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) | ||||||||||||||||
| | | ||||||||||||||||
|
|
@@ -606,6 +608,17 @@ Database configuration. | |||||||||||||||
| | postgres | | | | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| ## ErrorResponse | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| Model representing error response for query endpoint. | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+611
to
+616
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Make ErrorResponse description endpoint-agnostic. It’s used by POST /v1/feedback (500). Current wording suggests it’s query-specific. -Model representing error response for query endpoint.
+Model representing a generic error response payload used by multiple endpoints.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| | Field | Type | Description | | ||||||||||||||||
| |-------|------|-------------| | ||||||||||||||||
| | detail | object | | | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| ## FeedbackCategory | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -661,7 +674,7 @@ Examples: | |||||||||||||||
| | llm_response | string | Response from LLM | | ||||||||||||||||
| | sentiment | | User sentiment, if provided must be -1 or 1 | | ||||||||||||||||
| | user_feedback | | Feedback on the LLM response. | | ||||||||||||||||
| | categories | array[FeedbackCategory] | List of feedback categories that describe issues with the LLM response (for negative feedback). | | ||||||||||||||||
| | categories | | List of feedback categories that describe issues with the LLM response (for negative feedback). | | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainRe-type FeedbackRequest.categories or document allowed values. The type is now unspecified while examples use an array of strings. If the enum was intentionally dropped:
-| categories | | List of feedback categories that describe issues with the LLM response (for negative feedback). |
+| categories | array | List of feedback categories (strings) describing issues with the LLM response (for negative feedback). Allowed values: "incomplete", "not_relevant", ... |Follow-up: If you intend to retain FeedbackCategory as a component, consider restoring:
🏁 Script executed: #!/bin/bash
# Locate FeedbackRequest definition in docs/openapi.md
rg -C3 "FeedbackRequest" docs/openapi.md || echo "FeedbackRequest not found"
# Find occurrences of FeedbackCategory
rg -C3 "FeedbackCategory" docs/openapi.md || echo "FeedbackCategory not found"Length of output: 855 🏁 Script executed: #!/bin/bash
# Display the enum values defined in FeedbackCategory
rg -A10 "## FeedbackCategory" docs/openapi.mdLength of output: 362 Document FeedbackRequest.categories type and allowed values The • In docs/openapi.md under FeedbackRequest: -| categories | | List of feedback categories that describe issues with the LLM response (for negative feedback). |
+| categories | array[string] | List of feedback categories describing issues with the LLM response (for negative feedback). Refer to `FeedbackCategory` for allowed values. |• Or inline the enum values if you’ve dropped the component, e.g.: -| categories | | … |
+| categories | array[string] | … Allowed values: `"incomplete"`, `"not_relevant"`, `"incorrect"`, … |If you intend to keep the categories:
type: array
items:
$ref: '#/components/schemas/FeedbackCategory'🤖 Prompt for AI Agents |
||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| ## FeedbackResponse | ||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -165,11 +165,13 @@ Returns: | |||||||||||||||
|
|
||||||||||||||||
| | Status Code | Description | Component | | ||||||||||||||||
| |-------------|-------------|-----------| | ||||||||||||||||
| | 200 | Successful Response | [FeedbackResponse](#feedbackresponse) | ||||||||||||||||
| | 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 400 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) | ||||||||||||||||
| | 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 403 | User is not authorized | [ForbiddenResponse](#forbiddenresponse) | ||||||||||||||||
| | 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) | ||||||||||||||||
| | | ||||||||||||||||
| | 500 | User feedback can not be stored | [ErrorResponse](#errorresponse) | ||||||||||||||||
| | | ||||||||||||||||
|
Comment on lines
+168
to
175
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainFix response table formatting and "cannot" wording; consider 401 consistency.
Apply: -| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse)
- |
-| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse)
- |
-| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse)
- |
-| 500 | User feedback can not be stored | [ErrorResponse](#errorresponse)
- |
+| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) |
+| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
+| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) |
+| 500 | User feedback cannot be stored | [ErrorResponse](#errorresponse) |If you want to check for other occurrences: 🏁 Script executed: #!/bin/bash
# Style/wording
rg -n "can not be stored|can not" docs
# Response code consistency for auth errors
rg -n $'\\| 400 \\| Missing or invalid credentials provided by client' docs
rg -n $'\\| 401 \\| Missing or invalid credentials provided by client' docsLength of output: 1657 Fix table formatting and wording in feedback endpoint docs
Apply to docs/output.md: -| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse)
- |
-| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse)
- |
-| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse)
- |
-| 500 | User feedback can not be stored | [ErrorResponse](#errorresponse)
- |
+| 200 | Feedback received and stored | [FeedbackResponse](#feedbackresponse) |
+| 401 | Missing or invalid credentials provided by client | [UnauthorizedResponse](#unauthorizedresponse) |
+| 403 | Client does not have permission to access resource | [ForbiddenResponse](#forbiddenresponse) |
+| 500 | User feedback cannot be stored | [ErrorResponse](#errorresponse) |And update the “can not” occurrences elsewhere: rg -n "can not be stored" docs/openapi.md docs/openapi.json🧰 Tools🪛 LanguageTool[style] ~174-~174: Unless you want to emphasize “not”, use “cannot” which is more common. (CAN_NOT_PREMIUM) 🪛 markdownlint-cli2 (0.17.2)168-168: Table pipe style (MD055, table-pipe-style) 169-169: Table column count (MD056, table-column-count) 170-170: Table pipe style (MD055, table-pipe-style) 171-171: Table column count (MD056, table-column-count) 172-172: Table pipe style (MD055, table-pipe-style) 173-173: Table column count (MD056, table-column-count) 174-174: Table pipe style (MD055, table-pipe-style) 175-175: Table column count (MD056, table-column-count) 🤖 Prompt for AI Agents |
||||||||||||||||
| | 422 | Validation Error | [HTTPValidationError](#httpvalidationerror) | ||||||||||||||||
| | | ||||||||||||||||
|
|
@@ -606,6 +608,17 @@ Database configuration. | |||||||||||||||
| | postgres | | | | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| ## ErrorResponse | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| Model representing error response for query endpoint. | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+611
to
+616
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Broaden ErrorResponse description beyond “query endpoint.” ErrorResponse is referenced by the feedback endpoint (500). The current description reads as query-specific and may confuse readers. -Model representing error response for query endpoint.
+Model representing a generic error response payload used by multiple endpoints.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| | Field | Type | Description | | ||||||||||||||||
| |-------|------|-------------| | ||||||||||||||||
| | detail | object | | | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| ## FeedbackCategory | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Fix response table formatting and "cannot" wording; verify 401 standardization.
Optional verification:
🏁 Script executed:
Length of output: 1657
Update table formatting, wording, and verify 401 usage
|on each row and remove stray blank-pipe lines.📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[style] ~174-~174: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...iddenresponse) | | 500 | User feedback can not be stored | [ErrorResponse](#errorrespo...
(CAN_NOT_PREMIUM)
🪛 markdownlint-cli2 (0.17.2)
168-168: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
(MD055, table-pipe-style)
169-169: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
170-170: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
(MD055, table-pipe-style)
171-171: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
172-172: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
(MD055, table-pipe-style)
173-173: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
174-174: Table pipe style
Expected: leading_and_trailing; Actual: leading_only; Missing trailing pipe
(MD055, table-pipe-style)
175-175: Table column count
Expected: 3; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
🤖 Prompt for AI Agents