@@ -27,15 +27,15 @@ func (c *Capabilities) ParseYAML(doc []byte) error {
2727
2828// Capabilities struct needed for keeping all constraints and capabilities together
2929type Capabilities struct {
30- WMSCapabilities `xml:"WMSCapabilities" yaml:"wmsCapabilities"`
31- OptionalConstraints `xml:"OptionalConstraints" yaml:"optionalConstraints"`
30+ WMSCapabilities `xml:"WMSCapabilities" yaml:"wmsCapabilities"`
31+ * OptionalConstraints `xml:"OptionalConstraints" yaml:"optionalConstraints,omitempty "`
3232}
3333
3434// WMSCapabilities base struct
3535type WMSCapabilities struct {
3636 Request Request `xml:"Request" yaml:"request"`
3737 Exception ExceptionType `xml:"Exception" yaml:"exception"`
38- ExtendedCapabilities * ExtendedCapabilities `xml:"inspire_vs:ExtendedCapabilities" yaml:"extendedCapabilities"`
38+ ExtendedCapabilities * ExtendedCapabilities `xml:"inspire_vs:ExtendedCapabilities" yaml:"extendedCapabilities,omitempty "`
3939 Layer []Layer `xml:"Layer" yaml:"layer"`
4040}
4141
@@ -64,27 +64,27 @@ type ExceptionType struct {
6464type Layer struct {
6565 Queryable * int `xml:"queryable,attr" yaml:"queryable"`
6666 // layer has a full/complete map coverage
67- Opaque * string `xml:"opaque,attr" yaml:"opaque"`
67+ Opaque * string `xml:"opaque,attr" yaml:"opaque,omitempty "`
6868 // no cascaded attr in Layer element, because we don't do cascaded services e.g. wms services "proxying" and/or combining other wms services
6969 //Cascaded *string `xml:"cascaded,attr" yaml:"cascaded"`
70- Name * string `xml:"Name" yaml:"name"`
70+ Name * string `xml:"Name" yaml:"name,omitempty "`
7171 Title string `xml:"Title" yaml:"title"`
7272 Abstract * string `xml:"Abstract,omitempty" yaml:"abstract,omitempty"`
73- KeywordList * Keywords `xml:"KeywordList" yaml:"keywordList"`
74- CRS []CRS `xml:"CRS" yaml:"crs"`
75- EXGeographicBoundingBox * EXGeographicBoundingBox `xml:"EX_GeographicBoundingBox" yaml:"exGeographicBoundingBox"`
76- BoundingBox []* LayerBoundingBox `xml:"BoundingBox" yaml:"boundingBox"`
77- Dimension []* Dimension `xml:"Dimension" yaml:"dimension"`
78- Attribution * Attribution `xml:"Attribution,omitempty" yaml:"attribution"`
79- AuthorityURL * AuthorityURL `xml:"AuthorityURL" yaml:"authorityUrl"`
80- Identifier * Identifier `xml:"Identifier" yaml:"identifier"`
81- MetadataURL []* MetadataURL `xml:"MetadataURL" yaml:"metadataUrl"`
82- DataURL * URL `xml:"DataURL,omitempty" yaml:"dataUrl"`
83- FeatureListURL * URL `xml:"FeatureListURL,omitempty" yaml:"featureListUrl"`
84- Style []* Style `xml:"Style" yaml:"style"`
85- MinScaleDenominator * float64 `xml:"MinScaleDenominator,omitempty" yaml:"minScaleDenominator"`
86- MaxScaleDenominator * float64 `xml:"MaxScaleDenominator,omitempty" yaml:"maxScaleDenominator"`
87- Layer []* Layer `xml:"Layer" yaml:"layer"`
73+ KeywordList * Keywords `xml:"KeywordList" yaml:"keywordList,omitempty "`
74+ CRS []CRS `xml:"CRS" yaml:"crs,omitempty "`
75+ EXGeographicBoundingBox * EXGeographicBoundingBox `xml:"EX_GeographicBoundingBox" yaml:"exGeographicBoundingBox,omitempty "`
76+ BoundingBox []* LayerBoundingBox `xml:"BoundingBox" yaml:"boundingBox,omitempty "`
77+ Dimension []* Dimension `xml:"Dimension" yaml:"dimension,omitempty "`
78+ Attribution * Attribution `xml:"Attribution,omitempty" yaml:"attribution,omitempty "`
79+ AuthorityURL * AuthorityURL `xml:"AuthorityURL" yaml:"authorityUrl,omitempty "`
80+ Identifier * Identifier `xml:"Identifier" yaml:"identifier,omitempty "`
81+ MetadataURL []* MetadataURL `xml:"MetadataURL" yaml:"metadataUrl,omitempty "`
82+ DataURL * URL `xml:"DataURL,omitempty" yaml:"dataUrl,omitempty "`
83+ FeatureListURL * URL `xml:"FeatureListURL,omitempty" yaml:"featureListUrl,omitempty "`
84+ Style []* Style `xml:"Style" yaml:"style,omitempty "`
85+ MinScaleDenominator * float64 `xml:"MinScaleDenominator,omitempty" yaml:"minScaleDenominator,omitempty "`
86+ MaxScaleDenominator * float64 `xml:"MaxScaleDenominator,omitempty" yaml:"maxScaleDenominator,omitempty "`
87+ Layer []* Layer `xml:"Layer" yaml:"layer,omitempty "`
8888}
8989
9090// StyleDefined checks if the style that is defined is available for the requested layer
@@ -302,9 +302,9 @@ type LayerBoundingBox struct {
302302type Style struct {
303303 Name string `xml:"Name" yaml:"name"`
304304 Title string `xml:"Title" yaml:"title"`
305- Abstract * string `xml:"Abstract,omitempty" yaml:"abstract"`
305+ Abstract * string `xml:"Abstract,omitempty" yaml:"abstract,omitempty "`
306306 LegendURL * LegendURL `xml:"LegendURL" yaml:"legendUrl"`
307- StyleSheetURL * StyleSheetURL `xml:"StyleSheetURL,omitempty" yaml:"styleSheetUrl"`
307+ StyleSheetURL * StyleSheetURL `xml:"StyleSheetURL,omitempty" yaml:"styleSheetUrl,omitempty "`
308308}
309309
310310// LegendURL struct for the WMS 1.3.0
@@ -344,7 +344,7 @@ type OnlineResource struct {
344344type Dimension struct {
345345 Name * string `xml:"name,attr" yaml:"name"`
346346 Units * string `xml:"units,attr" yaml:"units"`
347- Default * string `xml:"default,attr,omitempty" yaml:"default"`
348- NearestValue * string `xml:"nearestValue,attr,omitempty" yaml:"nearestValue"`
347+ Default * string `xml:"default,attr,omitempty" yaml:"default,omitempty "`
348+ NearestValue * string `xml:"nearestValue,attr,omitempty" yaml:"nearestValue,omitempty "`
349349 Value * string `xml:",chardata" yaml:"value"`
350350}
0 commit comments