Skip to content

Commit

Permalink
feat: add omitempty to IsHidden for both json and yaml
Browse files Browse the repository at this point in the history
Close #539

Signed-off-by: weichou <[email protected]>
  • Loading branch information
weichou1229 committed Mar 11, 2021
1 parent d416b80 commit dfbdc06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/dtos/devicecommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import "github.com/edgexfoundry/go-mod-core-contracts/v2/v2/models"
// https://app.swaggerhub.com/apis-docs/EdgeXFoundry1/core-metadata/2.x#/DeviceCommand
type DeviceCommand struct {
Name string `json:"name" yaml:"name" validate:"required,edgex-dto-none-empty-string,edgex-dto-rfc3986-unreserved-chars"`
IsHidden bool `json:"isHidden" yaml:"isHidden"`
IsHidden bool `json:"isHidden,omitempty" yaml:"isHidden,omitempty"`
ReadWrite string `json:"readWrite" yaml:"readWrite" validate:"required,oneof='R' 'W' 'RW'"`
ResourceOperations []ResourceOperation `json:"resourceOperations" yaml:"resourceOperations" validate:"gt=0,dive"`
}
Expand Down

0 comments on commit dfbdc06

Please sign in to comment.