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

add missing parameter to zerops yaml validation endpoint call #121

Merged
merged 1 commit into from
Mar 7, 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: 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
}
Loading