Skip to content

Commit 5cb55bb

Browse files
authored
Merge pull request #33 from PDOK/wr/general-provider-site
updates
2 parents b00892d + 206a8e6 commit 5cb55bb

File tree

4 files changed

+107
-104
lines changed

4 files changed

+107
-104
lines changed

api/v1/ownerinfo_types.go

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ import (
3030
)
3131

3232
// OwnerInfoSpec defines the desired state of OwnerInfo.
33+
// +kubebuilder:validation:XValidation:message="providerSite is required when using wms or wfs",rule="(!has(self.wms) && !has(self.wfs)) || has(self.providerSite)"
3334
type OwnerInfoSpec struct {
3435
MetadataUrls *MetadataUrls `json:"metadataUrls,omitempty"`
3536
Atom *Atom `json:"atom,omitempty"`
3637
WFS *WFS `json:"wfs,omitempty"`
3738
WMS *WMS `json:"wms,omitempty"`
3839
NamespaceTemplate *string `json:"namespaceTemplate,omitempty"`
40+
ProviderSite *ProviderSite `json:"providerSite,omitempty"`
3941
}
4042

4143
// MetadataUrls contains various URL templates for metadata access
4244
type MetadataUrls struct {
4345
CSW *MetadataURL `json:"csw,omitempty"`
44-
OpenSearch *MetadataURL `json:"opensearch,omitempty"`
46+
OpenSearch *MetadataURL `json:"openSearch,omitempty"`
4547
HTML *MetadataURL `json:"html,omitempty"`
4648
}
4749

@@ -60,14 +62,13 @@ type Atom struct {
6062

6163
// WFS contains Web Feature Service related information
6264
type WFS struct {
63-
ServiceProvider ServiceProvider `json:"serviceprovider"`
65+
ServiceProvider ServiceProvider `json:"serviceProvider"`
6466
}
6567

6668
// ServiceProvider describes the provider of the WFS service
6769
type ServiceProvider struct {
68-
ProviderName *string `json:"providername,omitempty"`
69-
ProviderSite *ProviderSite `json:"providersite,omitempty"`
70-
ServiceContact *ServiceContact `json:"servicecontact,omitempty"`
70+
ProviderName *string `json:"providerName,omitempty"`
71+
ServiceContact *ServiceContact `json:"serviceContact,omitempty"`
7172
}
7273

7374
// ProviderSite holds information about the provider's site
@@ -78,9 +79,9 @@ type ProviderSite struct {
7879

7980
// ServiceContact provides contact information for the service
8081
type ServiceContact struct {
81-
IndividualName *string `json:"individualname,omitempty"`
82-
PositionName *string `json:"positionname,omitempty"`
83-
ContactInfo *ContactInfo `json:"contactinfo,omitempty"`
82+
IndividualName *string `json:"individualName,omitempty"`
83+
PositionName *string `json:"positionName,omitempty"`
84+
ContactInfo *ContactInfo `json:"contactInfo,omitempty"`
8485
Role *string `json:"role,omitempty"`
8586
}
8687

@@ -89,25 +90,25 @@ type ContactInfo struct {
8990
Text *string `json:"text,omitempty"`
9091
Phone *Phone `json:"phone,omitempty"`
9192
Address *Address `json:"address,omitempty"`
92-
OnlineResource *OnlineResource `json:"onlineresource,omitempty"`
93-
HoursOfService *string `json:"hoursofservice,omitempty"`
94-
ContactInstructions *string `json:"contactinstructions,omitempty"`
93+
OnlineResource *OnlineResource `json:"onlineResource,omitempty"`
94+
HoursOfService *string `json:"hoursOfService,omitempty"`
95+
ContactInstructions *string `json:"contactInstructions,omitempty"`
9596
}
9697

9798
// Phone contains voice and facsimile numbers
9899
type Phone struct {
99100
Voice *string `json:"voice,omitempty"`
100-
Facsimile *string `json:"facsmile,omitempty"`
101+
Facsimile *string `json:"facsimile,omitempty"`
101102
}
102103

103104
// Address provides physical address details
104105
type Address struct {
105-
DeliveryPoint *string `json:"deliverypoint,omitempty"`
106+
DeliveryPoint *string `json:"deliveryPoint,omitempty"`
106107
City *string `json:"city,omitempty"`
107-
AdministrativeArea *string `json:"administrativearea,omitempty"`
108-
PostalCode *string `json:"postalcode,omitempty"`
108+
AdministrativeArea *string `json:"administrativeArea,omitempty"`
109+
PostalCode *string `json:"postalCode,omitempty"`
109110
Country *string `json:"country,omitempty"`
110-
ElectronicMailAddress *string `json:"electronicmailaddress,omitempty"`
111+
ElectronicMailAddress *string `json:"electronicMailAddress,omitempty"`
111112
}
112113

113114
// OnlineResource describes an online resource associated with the contact
@@ -118,32 +119,32 @@ type OnlineResource struct {
118119

119120
// WMS contains Web Map Service related information
120121
type WMS struct {
121-
ContactInformation ContactInformation `json:"contactinformation"`
122+
ContactInformation ContactInformation `json:"contactInformation"`
122123
}
123124

124125
// Information about a contact person for the service
125126
type ContactInformation struct {
126-
ContactPersonPrimary *ContactPersonPrimary `json:"contactpersonprimary,omitempty"`
127-
ContactPosition *string `json:"contactposition,omitempty"`
128-
ContactAddress *ContactAddress `json:"contactaddress,omitempty"`
129-
ContactVoiceTelephone *string `json:"contactvoicetelephone,omitempty"`
130-
ContactFacsimileTelephone *string `json:"contactfacsimiletelephone,omitempty"`
131-
ContactElectronicMailAddress *string `json:"contactelectronicmailAddress,omitempty"`
127+
ContactPersonPrimary *ContactPersonPrimary `json:"contactPersonPrimary,omitempty"`
128+
ContactPosition *string `json:"contactPosition,omitempty"`
129+
ContactAddress *ContactAddress `json:"contactAddress,omitempty"`
130+
ContactVoiceTelephone *string `json:"contactVoiceTelephone,omitempty"`
131+
ContactFacsimileTelephone *string `json:"contactFacsimileTelephone,omitempty"`
132+
ContactElectronicMailAddress *string `json:"contactElectronicMailAddress,omitempty"`
132133
}
133134

134135
// The primary contact person
135136
type ContactPersonPrimary struct {
136-
ContactPerson *string `json:"contactperson,omitempty"`
137-
ContactOrganization *string `json:"contactorganization,omitempty"`
137+
ContactPerson *string `json:"contactPerson,omitempty"`
138+
ContactOrganization *string `json:"contactOrganization,omitempty"`
138139
}
139140

140141
// The address for the contact supplying the service
141142
type ContactAddress struct {
142-
AddressType *string `json:"addresstype,omitempty"`
143+
AddressType *string `json:"addressType,omitempty"`
143144
Address *string `json:"address,omitempty"`
144145
City *string `json:"city,omitempty"`
145-
StateOrProvince *string `json:"stateorprovince,omitempty"`
146-
PostCode *string `json:"postcode,omitempty"`
146+
StateOrProvince *string `json:"stateOrProvince,omitempty"`
147+
PostCode *string `json:"postCode,omitempty"`
147148
Country *string `json:"country,omitempty"`
148149
}
149150

api/v1/zz_generated.deepcopy.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/pdok.nl_ownerinfo.yaml

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ spec:
9292
- hrefTemplate
9393
- type
9494
type: object
95-
opensearch:
95+
openSearch:
9696
description: MetadataURL holds information about URL templates
9797
for specific metadata formats
9898
properties:
@@ -107,56 +107,55 @@ spec:
107107
type: object
108108
namespaceTemplate:
109109
type: string
110+
providerSite:
111+
description: ProviderSite holds information about the provider's site
112+
properties:
113+
href:
114+
type: string
115+
type:
116+
type: string
117+
required:
118+
- href
119+
- type
120+
type: object
110121
wfs:
111122
description: WFS contains Web Feature Service related information
112123
properties:
113-
serviceprovider:
124+
serviceProvider:
114125
description: ServiceProvider describes the provider of the WFS
115126
service
116127
properties:
117-
providername:
128+
providerName:
118129
type: string
119-
providersite:
120-
description: ProviderSite holds information about the provider's
121-
site
122-
properties:
123-
href:
124-
type: string
125-
type:
126-
type: string
127-
required:
128-
- href
129-
- type
130-
type: object
131-
servicecontact:
130+
serviceContact:
132131
description: ServiceContact provides contact information for
133132
the service
134133
properties:
135-
contactinfo:
134+
contactInfo:
136135
description: ContactInfo encapsulates various types of
137136
contact information
138137
properties:
139138
address:
140139
description: Address provides physical address details
141140
properties:
142-
administrativearea:
141+
administrativeArea:
143142
type: string
144143
city:
145144
type: string
146145
country:
147146
type: string
148-
deliverypoint:
147+
deliveryPoint:
149148
type: string
150-
electronicmailaddress:
149+
electronicMailAddress:
151150
type: string
152-
postalcode:
151+
postalCode:
153152
type: string
154153
type: object
155-
contactinstructions:
154+
contactInstructions:
156155
type: string
157-
hoursofservice:
156+
hoursOfService:
158157
type: string
159-
onlineresource:
158+
onlineResource:
160159
description: OnlineResource describes an online resource
161160
associated with the contact
162161
properties:
@@ -168,68 +167,71 @@ spec:
168167
phone:
169168
description: Phone contains voice and facsimile numbers
170169
properties:
171-
facsmile:
170+
facsimile:
172171
type: string
173172
voice:
174173
type: string
175174
type: object
176175
text:
177176
type: string
178177
type: object
179-
individualname:
178+
individualName:
180179
type: string
181-
positionname:
180+
positionName:
182181
type: string
183182
role:
184183
type: string
185184
type: object
186185
type: object
187186
required:
188-
- serviceprovider
187+
- serviceProvider
189188
type: object
190189
wms:
191190
description: WMS contains Web Map Service related information
192191
properties:
193-
contactinformation:
192+
contactInformation:
194193
description: Information about a contact person for the service
195194
properties:
196-
contactaddress:
195+
contactAddress:
197196
description: The address for the contact supplying the service
198197
properties:
199198
address:
200199
type: string
201-
addresstype:
200+
addressType:
202201
type: string
203202
city:
204203
type: string
205204
country:
206205
type: string
207-
postcode:
206+
postCode:
208207
type: string
209-
stateorprovince:
208+
stateOrProvince:
210209
type: string
211210
type: object
212-
contactelectronicmailAddress:
211+
contactElectronicMailAddress:
213212
type: string
214-
contactfacsimiletelephone:
213+
contactFacsimileTelephone:
215214
type: string
216-
contactpersonprimary:
215+
contactPersonPrimary:
217216
description: The primary contact person
218217
properties:
219-
contactorganization:
218+
contactOrganization:
220219
type: string
221-
contactperson:
220+
contactPerson:
222221
type: string
223222
type: object
224-
contactposition:
223+
contactPosition:
225224
type: string
226-
contactvoicetelephone:
225+
contactVoiceTelephone:
227226
type: string
228227
type: object
229228
required:
230-
- contactinformation
229+
- contactInformation
231230
type: object
232231
type: object
232+
x-kubernetes-validations:
233+
- message: providerSite is required when using wms or wfs
234+
rule: (!has(self.wms) && !has(self.wfs)) || has(self.providerSite)
233235
status:
234236
description: OwnerInfoStatus defines the observed state of OwnerInfo.
235237
type: object

0 commit comments

Comments
 (0)