Skip to content

Commit 1d17d84

Browse files
committed
YAML tags for marshalling WFS capabilities
1 parent a70d7e8 commit 1d17d84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/wfs200/capabilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ type FeatureType struct {
146146
Abstract string `xml:"Abstract" yaml:"abstract"`
147147
Keywords *[]wsc110.Keywords `xml:"ows:Keywords" yaml:"keywords"`
148148
DefaultCRS *CRS `xml:"DefaultCRS" yaml:"defaultCrs"`
149-
OtherCRS *[]CRS `xml:"OtherCRS" yaml:"otherCrs"`
149+
OtherCRS []*CRS `xml:"OtherCRS" yaml:"otherCrs"`
150150
OutputFormats *OutputFormats `xml:"OutputFormats" yaml:"outputFormats,omitempty"`
151151
WGS84BoundingBox *wsc110.WGS84BoundingBox `xml:"ows:WGS84BoundingBox" yaml:"wgs84BoundingBox,omitempty"`
152152
MetadataURL MetadataHref `xml:"MetadataURL" yaml:"metadataUrl"`

pkg/wfs200/getcapabilities_response.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (gc GetCapabilitiesResponse) ToXML() []byte {
3939
// GetCapabilitiesResponse base struct
4040
type GetCapabilitiesResponse struct {
4141
XMLName xml.Name `xml:"WFS_Capabilities" yaml:"-"`
42-
Namespaces `yaml:"namespaces"`
42+
*Namespaces `yaml:"namespaces,omitempty"`
4343
ServiceIdentification ServiceIdentification `xml:"ows:ServiceIdentification" yaml:"serviceIdentification"`
4444
ServiceProvider ServiceProvider `xml:"ows:ServiceProvider" yaml:"serviceProvider"`
4545
Capabilities `yaml:"capabilities"`
@@ -112,7 +112,7 @@ type ContactInfo struct {
112112

113113
// Phone struct containing the contact telephone or fax number
114114
type Phone struct {
115-
Voice *string `xml:"ows:Voice" yaml:"voice"`
115+
Voice *string `xml:"ows:Voice" yaml:"voice,omitempty"`
116116
Facsimile *string `xml:"ows:Facsimile" yaml:"facsimile,omitempty"`
117117
}
118118

0 commit comments

Comments
 (0)