diff --git a/models/common/models/inoutputs.go b/models/common/models/inoutputs.go index 436b8ca..5381b84 100644 --- a/models/common/models/inoutputs.go +++ b/models/common/models/inoutputs.go @@ -8,14 +8,10 @@ type Artifact struct { type Param struct { Attr string `json:"attr" bson:"attr" validate:"required"` + Value string `json:"value,omitempty" bson:"value,omitempty"` Readonly bool `json:"readonly" bson:"readonly" default:"true"` } -type ParamValue struct { - Param - Value string `json:"value" bson:"value" validate:"required"` -} - type InOutputs struct { Params []Param `json:"parameters" bson:"parameters"` Artifacts []Artifact `json:"artifacts" bson:"artifacts"` diff --git a/models/resources/resource.go b/models/resources/resource.go index 01473fa..311b271 100644 --- a/models/resources/resource.go +++ b/models/resources/resource.go @@ -141,13 +141,13 @@ type GeoPoint struct { type ResourceInstance[T ResourcePartnerITF] struct { utils.AbstractObject - Location GeoPoint `json:"location,omitempty" bson:"location,omitempty"` - Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"` - AccessProtocol string `json:"access_protocol,omitempty" bson:"access_protocol,omitempty"` - Env map[string]models.ParamValue `json:"env,omitempty" bson:"env,omitempty"` - Inputs []models.InOutputs `json:"inputs,omitempty" bson:"inputs,omitempty"` - Outputs []models.InOutputs `json:"outputs,omitempty" bson:"outputs,omitempty"` - Partnerships []T `json:"partnerships,omitempty" bson:"partnerships,omitempty"` + Location GeoPoint `json:"location,omitempty" bson:"location,omitempty"` + Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"` + AccessProtocol string `json:"access_protocol,omitempty" bson:"access_protocol,omitempty"` + Env []models.Param `json:"env,omitempty" bson:"env,omitempty"` + Inputs []models.InOutputs `json:"inputs,omitempty" bson:"inputs,omitempty"` + Outputs []models.InOutputs `json:"outputs,omitempty" bson:"outputs,omitempty"` + Partnerships []T `json:"partnerships,omitempty" bson:"partnerships,omitempty"` } func (ri *ResourceInstance[T]) GetAccessor(request *tools.APIRequest) utils.Accessor {