@@ -158,17 +158,17 @@ func (s Services) MarshalJSON() ([]byte, error) {
158158type ServiceConfig struct {
159159 Name string `yaml:"-" json:"-"`
160160
161- Build BuildConfig `yaml:",omitempty" json:"build,omitempty "`
161+ Build BuildConfig `yaml:",omitempty" json:"build"`
162162 CapAdd []string `mapstructure:"cap_add" yaml:"cap_add,omitempty" json:"cap_add,omitempty"`
163163 CapDrop []string `mapstructure:"cap_drop" yaml:"cap_drop,omitempty" json:"cap_drop,omitempty"`
164164 CgroupNSMode string `mapstructure:"cgroupns_mode" yaml:"cgroupns_mode,omitempty" json:"cgroupns_mode,omitempty"`
165165 CgroupParent string `mapstructure:"cgroup_parent" yaml:"cgroup_parent,omitempty" json:"cgroup_parent,omitempty"`
166166 Command ShellCommand `yaml:",omitempty" json:"command,omitempty"`
167167 Configs []ServiceConfigObjConfig `yaml:",omitempty" json:"configs,omitempty"`
168168 ContainerName string `mapstructure:"container_name" yaml:"container_name,omitempty" json:"container_name,omitempty"`
169- CredentialSpec CredentialSpecConfig `mapstructure:"credential_spec" yaml:"credential_spec,omitempty" json:"credential_spec,omitempty "`
169+ CredentialSpec CredentialSpecConfig `mapstructure:"credential_spec" yaml:"credential_spec,omitempty" json:"credential_spec"`
170170 DependsOn []string `mapstructure:"depends_on" yaml:"depends_on,omitempty" json:"depends_on,omitempty"`
171- Deploy DeployConfig `yaml:",omitempty" json:"deploy,omitempty "`
171+ Deploy DeployConfig `yaml:",omitempty" json:"deploy"`
172172 Devices []string `yaml:",omitempty" json:"devices,omitempty"`
173173 DNS StringList `yaml:",omitempty" json:"dns,omitempty"`
174174 DNSSearch StringList `mapstructure:"dns_search" yaml:"dns_search,omitempty" json:"dns_search,omitempty"`
@@ -273,9 +273,9 @@ type DeployConfig struct {
273273 Labels Labels `yaml:",omitempty" json:"labels,omitempty"`
274274 UpdateConfig * UpdateConfig `mapstructure:"update_config" yaml:"update_config,omitempty" json:"update_config,omitempty"`
275275 RollbackConfig * UpdateConfig `mapstructure:"rollback_config" yaml:"rollback_config,omitempty" json:"rollback_config,omitempty"`
276- Resources Resources `yaml:",omitempty" json:"resources,omitempty "`
276+ Resources Resources `yaml:",omitempty" json:"resources"`
277277 RestartPolicy * RestartPolicy `mapstructure:"restart_policy" yaml:"restart_policy,omitempty" json:"restart_policy,omitempty"`
278- Placement Placement `yaml:",omitempty" json:"placement,omitempty "`
278+ Placement Placement `yaml:",omitempty" json:"placement"`
279279 EndpointMode string `mapstructure:"endpoint_mode" yaml:"endpoint_mode,omitempty" json:"endpoint_mode,omitempty"`
280280}
281281
@@ -453,8 +453,8 @@ type NetworkConfig struct {
453453 Name string `yaml:",omitempty" json:"name,omitempty"`
454454 Driver string `yaml:",omitempty" json:"driver,omitempty"`
455455 DriverOpts map [string ]string `mapstructure:"driver_opts" yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
456- Ipam IPAMConfig `yaml:",omitempty" json:"ipam,omitempty "`
457- External External `yaml:",omitempty" json:"external,omitempty "`
456+ Ipam IPAMConfig `yaml:",omitempty" json:"ipam"`
457+ External External `yaml:",omitempty" json:"external"`
458458 Internal bool `yaml:",omitempty" json:"internal,omitempty"`
459459 Attachable bool `yaml:",omitempty" json:"attachable,omitempty"`
460460 Labels Labels `yaml:",omitempty" json:"labels,omitempty"`
@@ -477,7 +477,7 @@ type VolumeConfig struct {
477477 Name string `yaml:",omitempty" json:"name,omitempty"`
478478 Driver string `yaml:",omitempty" json:"driver,omitempty"`
479479 DriverOpts map [string ]string `mapstructure:"driver_opts" yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"`
480- External External `yaml:",omitempty" json:"external,omitempty "`
480+ External External `yaml:",omitempty" json:"external"`
481481 Labels Labels `yaml:",omitempty" json:"labels,omitempty"`
482482 Extras map [string ]any `yaml:",inline" json:"-"`
483483 Spec * ClusterVolumeSpec `mapstructure:"x-cluster-spec" yaml:"x-cluster-spec,omitempty" json:"x-cluster-spec,omitempty"`
@@ -574,7 +574,7 @@ type CredentialSpecConfig struct {
574574type FileObjectConfig struct {
575575 Name string `yaml:",omitempty" json:"name,omitempty"`
576576 File string `yaml:",omitempty" json:"file,omitempty"`
577- External External `yaml:",omitempty" json:"external,omitempty "`
577+ External External `yaml:",omitempty" json:"external"`
578578 Labels Labels `yaml:",omitempty" json:"labels,omitempty"`
579579 Extras map [string ]any `yaml:",inline" json:"-"`
580580 Driver string `yaml:",omitempty" json:"driver,omitempty"`
0 commit comments