Skip to content

Commit

Permalink
add missing parameter to zerops yaml validation endpoint call (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-hellmann authored Mar 7, 2024
1 parent f6dd907 commit c14d08e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
8 changes: 5 additions & 3 deletions src/cmd/servicePushDeployShared.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"path/filepath"

"github.com/pkg/errors"

"github.com/zeropsio/zcli/src/entity"
"github.com/zeropsio/zcli/src/httpClient"
"github.com/zeropsio/zcli/src/i18n"
Expand Down Expand Up @@ -136,9 +137,10 @@ func validateZeropsYamlContent(
yamlContent []byte,
) error {
resp, err := restApiClient.PostServiceStackZeropsYamlValidation(ctx, body.ZeropsYamlValidation{
ServiceStackName: service.Name,
ServiceStackTypeId: service.ServiceTypeId,
ZeropsYaml: types.NewMediumText(string(yamlContent)),
ServiceStackTypeVersionName: service.ServiceStackTypeVersionName,
ServiceStackName: service.Name,
ServiceStackTypeId: service.ServiceTypeId,
ZeropsYaml: types.NewMediumText(string(yamlContent)),
})
if err != nil {
return err
Expand Down
13 changes: 7 additions & 6 deletions src/entity/repository/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ func serviceFromEsSearch(esServiceStack zeropsRestApiClient.EsServiceStack) enti

func serviceFromApiOutput(service output.ServiceStack) entity.Service {
return entity.Service{
ID: service.Id,
ClientId: service.Project.ClientId,
Name: service.Name,
Status: service.Status,
ServiceTypeId: service.ServiceStackTypeId,
ServiceTypeCategory: service.ServiceStackTypeInfo.ServiceStackTypeCategory,
ID: service.Id,
ClientId: service.Project.ClientId,
Name: service.Name,
Status: service.Status,
ServiceTypeId: service.ServiceStackTypeId,
ServiceTypeCategory: service.ServiceStackTypeInfo.ServiceStackTypeCategory,
ServiceStackTypeVersionName: service.ServiceStackTypeInfo.ServiceStackTypeVersionName,
}
}
13 changes: 7 additions & 6 deletions src/entity/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
)

type Service struct {
ID uuid.ServiceStackId
ClientId uuid.ClientId
Name types.String
Status enum.ServiceStackStatusEnum
ServiceTypeId stringId.ServiceStackTypeId
ServiceTypeCategory enum.ServiceStackTypeCategoryEnum
ID uuid.ServiceStackId
ClientId uuid.ClientId
Name types.String
Status enum.ServiceStackStatusEnum
ServiceTypeId stringId.ServiceStackTypeId
ServiceTypeCategory enum.ServiceStackTypeCategoryEnum
ServiceStackTypeVersionName types.String
}

0 comments on commit c14d08e

Please sign in to comment.