Skip to content

Commit

Permalink
api: rest: Set sys.namespace as required
Browse files Browse the repository at this point in the history
  • Loading branch information
ish-hcc committed Nov 1, 2024
1 parent 6c03445 commit 67ebb97
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions server/pkg/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,7 @@ const docTemplate = `{
"type": "object",
"required": [
"id",
"label",
"resourceType"
],
"properties": {
Expand All @@ -1817,6 +1818,9 @@ const docTemplate = `{
},
"label": {
"type": "object",
"required": [
"sys.namespace"
],
"properties": {
"sys.namespace": {
"type": "string"
Expand Down
4 changes: 4 additions & 0 deletions server/pkg/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,7 @@
"type": "object",
"required": [
"id",
"label",
"resourceType"
],
"properties": {
Expand All @@ -1810,6 +1811,9 @@
},
"label": {
"type": "object",
"required": [
"sys.namespace"
],
"properties": {
"sys.namespace": {
"type": "string"
Expand Down
3 changes: 3 additions & 0 deletions server/pkg/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,14 @@ definitions:
properties:
sys.namespace:
type: string
required:
- sys.namespace
type: object
resourceType:
type: string
required:
- id
- label
- resourceType
type: object
github_com_cloud-barista_cm-honeybee_server_pkg_api_rest_model.SavedBenchmarkInfo:
Expand Down
4 changes: 2 additions & 2 deletions server/pkg/api/rest/model/sourceGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type RegisterTargetInfoReq struct {
ResourceType string `json:"resourceType" validate:"required"`
ID string `json:"id" validate:"required"`
Label struct {
SysNamespace string `json:"sys.namespace"`
} `json:"label"`
SysNamespace string `json:"sys.namespace" validate:"required"`
} `json:"label" validate:"required"`
}

type SourceGroup struct {
Expand Down

0 comments on commit 67ebb97

Please sign in to comment.