diff --git a/go/models/deploy_environment_variable.go b/go/models/deploy_environment_variable.go index 37f4fc7f..21a4bf9f 100644 --- a/go/models/deploy_environment_variable.go +++ b/go/models/deploy_environment_variable.go @@ -21,7 +21,8 @@ import ( type DeployEnvironmentVariable struct { // is secret - IsSecret bool `json:"is_secret,omitempty"` + // Required: true + IsSecret *bool `json:"is_secret"` // key // Required: true @@ -40,6 +41,10 @@ type DeployEnvironmentVariable struct { func (m *DeployEnvironmentVariable) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateIsSecret(formats); err != nil { + res = append(res, err) + } + if err := m.validateKey(formats); err != nil { res = append(res, err) } @@ -58,6 +63,15 @@ func (m *DeployEnvironmentVariable) Validate(formats strfmt.Registry) error { return nil } +func (m *DeployEnvironmentVariable) validateIsSecret(formats strfmt.Registry) error { + + if err := validate.Required("is_secret", "body", m.IsSecret); err != nil { + return err + } + + return nil +} + func (m *DeployEnvironmentVariable) validateKey(formats strfmt.Registry) error { if err := validate.Required("key", "body", m.Key); err != nil { diff --git a/go/porcelain/deploy.go b/go/porcelain/deploy.go index 368ddb34..8196f39f 100644 --- a/go/porcelain/deploy.go +++ b/go/porcelain/deploy.go @@ -43,9 +43,9 @@ const ( lfsVersionString = "version https://git-lfs.github.com/spec/v1" - edgeFunctionsInternalPath = ".netlify/internal/edge-functions/" - edgeRedirectsInternalPath = ".netlify/deploy-config/" - dbMigrationsInternalPath = ".netlify/internal/db/migrations/" + edgeFunctionsInternalPath = ".netlify/internal/edge-functions/" + edgeRedirectsInternalPath = ".netlify/deploy-config/" + dbMigrationsInternalPath = ".netlify/internal/db/migrations/" ) var installDirs = []string{"node_modules/", "bower_components/"} @@ -77,12 +77,6 @@ type DeployWarner interface { OnWalkWarning(path, msg string) } -type DeployEnvironmentVariable struct { - Key string - Value string - IsSecret bool -} - // DeployOptions holds the option for creating a new deploy type DeployOptions struct { SiteID string diff --git a/swagger.yml b/swagger.yml index 7012d81a..252539d2 100644 --- a/swagger.yml +++ b/swagger.yml @@ -4152,6 +4152,7 @@ definitions: - key - value - scopes + - is_secret properties: key: type: string