Skip to content
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

Change label api group #1779

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Get labels for a resource",
"operationId": "GetLabels",
Expand Down Expand Up @@ -890,7 +890,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Create or update a label for a resource",
"operationId": "CreateOrUpdateLabel",
Expand Down Expand Up @@ -954,7 +954,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Remove a label from a resource",
"operationId": "RemoveLabel",
Expand Down Expand Up @@ -8767,7 +8767,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Get resources by label selector",
"operationId": "GetResourcesByLabelSelector",
Expand Down
8 changes: 4 additions & 4 deletions src/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Get labels for a resource",
"operationId": "GetLabels",
Expand Down Expand Up @@ -883,7 +883,7 @@
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Create or update a label for a resource",
"operationId": "CreateOrUpdateLabel",
Expand Down Expand Up @@ -947,7 +947,7 @@
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Remove a label from a resource",
"operationId": "RemoveLabel",
Expand Down Expand Up @@ -8760,7 +8760,7 @@
"application/json"
],
"tags": [
"[Label] Label Management"
"[Infra Resource] Common Utility"
],
"summary": "Get resources by label selector",
"operationId": "GetResourcesByLabelSelector",
Expand Down
8 changes: 4 additions & 4 deletions src/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3863,7 +3863,7 @@ paths:
$ref: '#/definitions/model.SimpleMsg'
summary: Get labels for a resource
tags:
- '[Label] Label Management'
- '[Infra Resource] Common Utility'
put:
consumes:
- application/json
Expand Down Expand Up @@ -3905,7 +3905,7 @@ paths:
$ref: '#/definitions/model.SimpleMsg'
summary: Create or update a label for a resource
tags:
- '[Label] Label Management'
- '[Infra Resource] Common Utility'
/label/{labelType}/{uuid}/{key}:
delete:
consumes:
Expand Down Expand Up @@ -3945,7 +3945,7 @@ paths:
$ref: '#/definitions/model.SimpleMsg'
summary: Remove a label from a resource
tags:
- '[Label] Label Management'
- '[Infra Resource] Common Utility'
/loadCommonResource:
get:
consumes:
Expand Down Expand Up @@ -9269,7 +9269,7 @@ paths:
$ref: '#/definitions/model.SimpleMsg'
summary: Get resources by label selector
tags:
- '[Label] Label Management'
- '[Infra Resource] Common Utility'
/stream-response/ns/{nsId}/mci/{mciId}/vpn/{vpnId}:
delete:
consumes:
Expand Down
8 changes: 4 additions & 4 deletions src/api/rest/server/common/label/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
// @ID CreateOrUpdateLabel
// @Summary Create or update a label for a resource
// @Description Create or update a label for a resource identified by its UUID
// @Tags [Label] Label Management
// @Tags [Infra Resource] Common Utility
// @Accept json
// @Produce json
// @Param labelType path string true "Label Type (e.g., ns, vnet)"
Expand Down Expand Up @@ -69,7 +69,7 @@ func RestCreateOrUpdateLabel(c echo.Context) error {
// @ID RemoveLabel
// @Summary Remove a label from a resource
// @Description Remove a label from a resource identified by its UUID
// @Tags [Label] Label Management
// @Tags [Infra Resource] Common Utility
// @Accept json
// @Produce json
// @Param labelType path string true "Label Type (e.g., ns, vnet)"
Expand Down Expand Up @@ -102,7 +102,7 @@ func RestRemoveLabel(c echo.Context) error {
// @ID GetLabels
// @Summary Get labels for a resource
// @Description Get labels for a resource identified by its UUID
// @Tags [Label] Label Management
// @Tags [Infra Resource] Common Utility
// @Accept json
// @Produce json
// @Param labelType path string true "Label Type (e.g., ns, vnet)"
Expand Down Expand Up @@ -144,7 +144,7 @@ type ResourcesResponse struct {
// @Description - `notin` : Selects resources where the label key is not in the specified set of values (e.g., `env notin (production, staging)`).
// @Description - `exists` : Selects resources where the label key exists (e.g., `env exists`).
// @Description - `!exists` : Selects resources where the label key does not exist (e.g., `env !exists`).
// @Tags [Label] Label Management
// @Tags [Infra Resource] Common Utility
// @Accept json
// @Produce json
// @Param labelType path string true "Label Type (e.g., ns, sshKey, vNet, vm, mci, k8s, etc.)"
Expand Down
Loading