feat: support custom server deployment drafts
This commit is contained in:
@@ -13,10 +13,14 @@ func ValidateServerLifecycleCreate(create domain.ServerLifecycleCreate) error {
|
||||
var violations []string
|
||||
violations = appendRequired(violations, "id", create.ID)
|
||||
violations = appendRequired(violations, "pluginId", create.PluginID)
|
||||
violations = appendRequired(violations, "runEndpointId", create.RunEndpointID)
|
||||
violations = appendRequired(violations, "name", create.Name)
|
||||
violations = appendRequired(violations, "profileKey", create.ProfileKey)
|
||||
if create.RunEndpointID != "" {
|
||||
violations = appendRequired(violations, "profileKey", create.ProfileKey)
|
||||
}
|
||||
violations = appendLifecycleIdempotencyViolations(violations, create.IdempotencyKey)
|
||||
if err := ValidateServerDeploymentDefinition(create.Deployment); err != nil {
|
||||
violations = append(violations, err.Error())
|
||||
}
|
||||
return finish(violations)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user