mirror of https://github.com/hashicorp/consul
Make sure we omit the Kind value in JSON if empty
parent
01f82717b4
commit
163fe11101
|
@ -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