Make sure we omit the Kind value in JSON if empty
This commit is contained in:
parent
2f90768662
commit
8b27c3268a
|
@ -14,7 +14,7 @@ import (
|
|||
// ServiceDefinition is used to JSON decode the Service definitions. For
|
||||
// documentation on specific fields see NodeService which is better documented.
|
||||
type ServiceDefinition struct {
|
||||
Kind ServiceKind
|
||||
Kind ServiceKind `json:",omitempty"`
|
||||
ID string
|
||||
Name string
|
||||
Tags []string
|
||||
|
|
|
@ -512,7 +512,7 @@ type NodeService struct {
|
|||
// Kind is the kind of service this is. Different kinds of services may
|
||||
// have differing validation, DNS behavior, etc. An empty kind will default
|
||||
// to the Default kind. See ServiceKind for the full list of kinds.
|
||||
Kind ServiceKind
|
||||
Kind ServiceKind `json:",omitempty"`
|
||||
|
||||
ID string
|
||||
Service string
|
||||
|
|
Loading…
Reference in New Issue