Skip to content

Commit

Permalink
Merge pull request #238 from carolynvs/omit-empty-bundle-fields
Browse files Browse the repository at this point in the history
Omit empty bundle fields
  • Loading branch information
carolynvs-msft authored Mar 26, 2019
2 parents d291299 + 5c527f4 commit 9952ef8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions pkg/config/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ type ParameterDefinition struct {

type CredentialDefinition struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
EnvironmentVariable string `yaml:"env"`
Path string `yaml:"path,omitempty"`
EnvironmentVariable string `yaml:"env,omitempty"`
}

type Location struct {
Path string `yaml:"path"`
EnvironmentVariable string `yaml:"env"`
Path string `yaml:"path,omitempty"`
EnvironmentVariable string `yaml:"env,omitempty"`
}

// ParameterMetadata contains metadata for a parameter definition.
Expand Down
8 changes: 4 additions & 4 deletions pkg/porter/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ type InvocationImage struct {
//
// A location may be either a file (by path) or an environment variable.
type Location struct {
Path string `json:"path" toml:"path"`
EnvironmentVariable string `json:"env" toml:"env"`
Path string `json:"path,omitempty" toml:"path"`
EnvironmentVariable string `json:"env,omitempty" toml:"env"`
}

// Maintainer describes a code maintainer of a bundle
type Maintainer struct {
// Name is a user name or organization name
Name string `json:"name" toml:"name"`
// Email is an optional email address to contact the named maintainer
Email string `json:"email" toml:"email"`
Email string `json:"email,omitempty" toml:"email"`
// Url is an optional URL to an address for the named maintainer
URL string `json:"url" toml:"url"`
URL string `json:"url,omitempty" toml:"url"`
}

// Action describes a custom (non-core) action.
Expand Down

0 comments on commit 9952ef8

Please sign in to comment.