Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Add pointer to ParameterMetadata to fix the serialization, as it is a…
Browse files Browse the repository at this point in the history
…n OPTIONAL field.

Signed-off-by: Silvin Lubecki <[email protected]>
  • Loading branch information
silvin-lubecki committed Mar 22, 2019
1 parent 45306ff commit 09d1a2b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pkg/bundle/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ import (

// ParameterDefinition defines a single parameter for a CNAB bundle
type ParameterDefinition struct {
DataType string `json:"type" mapstructure:"type"`
DefaultValue interface{} `json:"defaultValue,omitempty" mapstructure:"defaultValue,omitempty"`
AllowedValues []interface{} `json:"allowedValues,omitempty" mapstructure:"allowedValues,omitempty"`
Required bool `json:"required" mapstructure:"required"`
MinValue *int `json:"minValue,omitempty" mapstructure:"minValue,omitempty"`
MaxValue *int `json:"maxValue,omitempty" mapstructure:"maxValue,omitempty"`
MinLength *int `json:"minLength,omitempty" mapstructure:"minLength,omitempty"`
MaxLength *int `json:"maxLength,omitempty" mapstructure:"maxLength,omitempty"`
Metadata ParameterMetadata `json:"metadata,omitempty" mapstructure:"metadata,omitempty"`
Destination *Location `json:"destination,omitempty" mapstructure:"destination,omitempty"`
ApplyTo []string `json:"apply-to,omitempty" mapstructure:"apply-to,omitempty"`
DataType string `json:"type" mapstructure:"type"`
DefaultValue interface{} `json:"defaultValue,omitempty" mapstructure:"defaultValue,omitempty"`
AllowedValues []interface{} `json:"allowedValues,omitempty" mapstructure:"allowedValues,omitempty"`
Required bool `json:"required" mapstructure:"required"`
MinValue *int `json:"minValue,omitempty" mapstructure:"minValue,omitempty"`
MaxValue *int `json:"maxValue,omitempty" mapstructure:"maxValue,omitempty"`
MinLength *int `json:"minLength,omitempty" mapstructure:"minLength,omitempty"`
MaxLength *int `json:"maxLength,omitempty" mapstructure:"maxLength,omitempty"`
Metadata *ParameterMetadata `json:"metadata,omitempty" mapstructure:"metadata,omitempty"`
Destination *Location `json:"destination,omitempty" mapstructure:"destination,omitempty"`
ApplyTo []string `json:"apply-to,omitempty" mapstructure:"apply-to,omitempty"`
}

// ParameterMetadata contains metadata for a parameter definition.
Expand Down

0 comments on commit 09d1a2b

Please sign in to comment.