-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat:Add GET endpoint for retrieving user Lora models in OpenAPI specification #92
Conversation
WalkthroughThe changes introduce a new endpoint to the OpenAPI specification for the DeepApi. A GET method is added for the path Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (4)
src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.GetUserLoras.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.GetUserLoras.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.GetUserLorasV1UserLorasGetResponse.Json.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.GetUserLorasV1UserLorasGetResponse.g.cs
is excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/DeepInfra/openapi.yaml
(1 hunks)
🔇 Additional comments (1)
src/libs/DeepInfra/openapi.yaml (1)
2176-2199
: LGTM on endpoint structure.
The endpoint follows consistent patterns with other endpoints in the API:
- Uses standard authentication via
xi-api-key
header - Follows RESTful conventions
- Includes standard validation error response
- Uses consistent security scheme
/v1/user/loras: | ||
get: | ||
summary: Get User Loras | ||
operationId: get_user_loras_v1_user_loras_get | ||
parameters: | ||
- name: xi-api-key | ||
in: header | ||
schema: | ||
title: Xi-Api-Key | ||
type: string | ||
responses: | ||
'200': | ||
description: Successful Response | ||
content: | ||
application/json: | ||
schema: { } | ||
'422': | ||
description: Validation Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/HTTPValidationError' | ||
security: | ||
- HTTPBearer: [ ] |
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.
Define response schema for successful response.
The endpoint's successful response schema is currently empty ({}
). This makes it unclear what data structure consumers should expect. Consider defining a proper response schema to improve API documentation and maintainability.
Consider adding a response schema similar to this:
responses:
'200':
description: Successful Response
content:
application/json:
schema: { }
+ schema:
+ type: object
+ properties:
+ loras:
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ type: string
+ description:
+ type: string
+ created_at:
+ type: string
+ format: date-time
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
/v1/user/loras: | |
get: | |
summary: Get User Loras | |
operationId: get_user_loras_v1_user_loras_get | |
parameters: | |
- name: xi-api-key | |
in: header | |
schema: | |
title: Xi-Api-Key | |
type: string | |
responses: | |
'200': | |
description: Successful Response | |
content: | |
application/json: | |
schema: { } | |
'422': | |
description: Validation Error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/HTTPValidationError' | |
security: | |
- HTTPBearer: [ ] | |
/v1/user/loras: | |
get: | |
summary: Get User Loras | |
operationId: get_user_loras_v1_user_loras_get | |
parameters: | |
- name: xi-api-key | |
in: header | |
schema: | |
title: Xi-Api-Key | |
type: string | |
responses: | |
'200': | |
description: Successful Response | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
loras: | |
type: array | |
items: | |
type: object | |
properties: | |
name: | |
type: string | |
description: | |
type: string | |
created_at: | |
type: string | |
format: date-time | |
'422': | |
description: Validation Error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/HTTPValidationError' | |
security: | |
- HTTPBearer: [ ] |
Summary by CodeRabbit
/v1/user/loras
.