You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/v3/shared_types.go
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -182,14 +182,19 @@ type Custom struct {
182
182
Typestring`json:"type"`
183
183
}
184
184
185
-
// Data holds the data source configuration
186
-
// +kubebuilder:validation:XValidation:rule="has(self.gpkg) || has(self.tif) || has(self.postgis)", message="Atleast one of the datasource should be provided (postgis, gpkg, tif)"
187
-
typeDatastruct {
185
+
// BaseData holds the data source configuration for gpkg and postgis
186
+
typeBaseDatastruct {
188
187
// Gpkg configures a GeoPackage file source
189
188
Gpkg*Gpkg`json:"gpkg,omitempty"`
190
189
191
190
// Postgis configures a Postgis table source
192
191
Postgis*Postgis`json:"postgis,omitempty"`
192
+
}
193
+
194
+
// Data holds the data source configuration
195
+
// +kubebuilder:validation:XValidation:rule="has(self.gpkg) || has(self.tif) || has(self.postgis)", message="Atleast one of the datasource should be provided (postgis, gpkg, tif)"
Copy file name to clipboardExpand all lines: api/v3/wfs_types.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,8 @@ type FeatureType struct {
187
187
188
188
// FeatureType data connection
189
189
// +kubebuilder:validation:Type=object
190
-
DataData`json:"data"`
190
+
// +kubebuilder:validation:XValidation:rule="has(self.gpkg) || has(self.postgis)", message="At least one of the datasource should be provided (postgis, gpkg)"
191
+
DataBaseData`json:"data"`
191
192
}
192
193
193
194
// FeatureBbox is the optional featureType bounding box, if provided it overrides the default extent
Copy file name to clipboardExpand all lines: api/v3/wms_types.go
+37-55Lines changed: 37 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,8 @@ type WMSSpec struct {
108
108
ServiceWMSService`json:"service"`
109
109
}
110
110
111
+
// +kubebuilder:validation:XValidation:message="service requires styling, either through service.mapfile, or stylingAssets.configMapRefs",rule=has(self.mapfile) || (has(self.stylingAssets) && has(self.stylingAssets.configMapRefs))
112
+
// +kubebuilder:validation:XValidation:message="when using service.mapfile, don't include stylingAssets.configMapRefs",rule=!has(self.mapfile) || (!has(self.stylingAssets) || !has(self.stylingAssets.configMapRefs))
111
113
typeWMSServicestruct {
112
114
BaseService`json:",inline"`
113
115
@@ -187,9 +189,9 @@ type ConfigMapRef struct {
187
189
188
190
// +kubebuilder:validation:XValidation:message="A layer should have exactly one of sublayers or data", rule="(has(self.data) || has(self.layers)) && !(has(self.data) && has(self.layers))"
189
191
// +kubebuilder:validation:XValidation:message="A layer with data attribute should have styling", rule="!has(self.data) || has(self.styles)"
190
-
// +kubebuilder:validation:XValidation:message="A layer should have keywords when visible", rule="!self.visible || has(self.keywords)"
191
192
// +kubebuilder:validation:XValidation:message="A layer should have a title when visible", rule="!self.visible || has(self.title)"
192
193
// +kubebuilder:validation:XValidation:message="A layer should have an abstract when visible", rule="!self.visible || has(self.abstract)"
194
+
// +kubebuilder:validation:XValidation:message="A layer should have keywords when visible", rule="!self.visible || has(self.keywords)"
193
195
typeLayerstruct {
194
196
// Name of the layer, required for layers on the 2nd or 3rd level
0 commit comments