Skip to content

Commit

Permalink
feat(app): add necessary filed for app api (#451)
Browse files Browse the repository at this point in the history
Because

need more fields for app update

This commit

add necessary fileds

---------

Co-authored-by: droplet-bot <[email protected]>
  • Loading branch information
Yougigun and droplet-bot authored Sep 12, 2024
1 parent 24b899a commit cc0a140
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 15 deletions.
24 changes: 16 additions & 8 deletions app/app/v1alpha/app.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ enum AppType {
message CreateAppRequest {
// The app's owner(namespaces).
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
// The app name.
string name = 2 [(google.api.field_behavior) = REQUIRED];
// The app id.
// the app id should be lowercase without any space or special character besides the hyphen,
// it can not start with number or hyphen, and should be less than 32 characters.
string id = 2 [(google.api.field_behavior) = REQUIRED];
// The app description.
string description = 3 [(google.api.field_behavior) = OPTIONAL];
// The app tags.
Expand All @@ -121,14 +123,20 @@ message ListAppsResponse {

// UpdateAppRequest represents a request to update a app.
message UpdateAppRequest {
// The app id.
string app_id = 1 [(google.api.field_behavior) = REQUIRED];
// namespace id
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
// app id
string app_id = 2 [(google.api.field_behavior) = REQUIRED];
// The app id needs to follow the kebab case format.
string new_app_id = 3 [(google.api.field_behavior) = OPTIONAL];
// The app description.
string description = 2 [(google.api.field_behavior) = OPTIONAL];
string new_description = 4 [(google.api.field_behavior) = OPTIONAL];
// The app tags.
repeated string tags = 3 [(google.api.field_behavior) = OPTIONAL];
// The app owner(namespace).
string namespace_id = 4 [(google.api.field_behavior) = REQUIRED];
repeated string new_tags = 5 [(google.api.field_behavior) = OPTIONAL];
// last ai assistant app catalog uid
string last_ai_assistant_app_catalog_uid = 6 [(google.api.field_behavior) = OPTIONAL];
// last ai assistant app top k
int32 last_ai_assistant_app_top_k = 7 [(google.api.field_behavior) = OPTIONAL];
}

// UpdateAppResponse represents a response for updating a app.
Expand Down
27 changes: 20 additions & 7 deletions openapiv2/app/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ paths:
$ref: '#/definitions/rpcStatus'
parameters:
- name: namespaceId
description: The app owner(namespace).
description: namespace id
in: path
required: true
type: string
- name: appId
description: The app id.
description: app id
in: path
required: true
type: string
Expand Down Expand Up @@ -507,9 +507,12 @@ definitions:
AppPublicServiceCreateAppBody:
type: object
properties:
name:
id:
type: string
description: The app name.
description: |-
The app id.
the app id should be lowercase without any space or special character besides the hyphen,
it can not start with number or hyphen, and should be less than 32 characters.
description:
type: string
description: The app description.
Expand All @@ -520,7 +523,7 @@ definitions:
description: The app tags.
description: CreateAppRequest represents a request to create a app.
required:
- name
- id
AppPublicServiceCreateConversationBody:
type: object
properties:
Expand Down Expand Up @@ -574,14 +577,24 @@ definitions:
AppPublicServiceUpdateAppBody:
type: object
properties:
description:
newAppId:
type: string
description: The app id needs to follow the kebab case format.
newDescription:
type: string
description: The app description.
tags:
newTags:
type: array
items:
type: string
description: The app tags.
lastAiAssistantAppCatalogUid:
type: string
title: last ai assistant app catalog uid
lastAiAssistantAppTopK:
type: integer
format: int32
title: last ai assistant app top k
description: UpdateAppRequest represents a request to update a app.
AppPublicServiceUpdateConversationBody:
type: object
Expand Down

0 comments on commit cc0a140

Please sign in to comment.