/
pygeoapi-config-0.x.yml
614 lines (613 loc) · 28.5 KB
/
pygeoapi-config-0.x.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
$schema: https://json-schema.org/draft/2020-12/schema
$id: https://raw.githubusercontent.com/geopython/pygeoapi/master/pygeoapi/schemas/config/pygeoapi-config-0.x.yml
title: pygeoapi configuration schema
description: pygeoapi configuration schema
type: object
properties:
server:
type: object
description: server object
properties:
bind:
type: object
description: binding server information
properties:
host:
type: string
description: binding IP
port:
type: integer
description: binding port
required:
- host
- port
url:
type: string
description: URL of server (as used by client)
admin:
type: boolean
description: whether to enable the Admin API (default is false)
default: false
mimetype:
type: string
description: default MIME type
encoding:
type: string
description: default server encoding
gzip:
type: boolean
description: default server config to gzip/compress responses to requests with gzip in the Accept-Encoding header
language:
type: string
description: default server language
languages:
type: array
description: supported languages
items:
type: string
description: supported language
locale_dir:
type: string
description: directory of translations
cors:
type: boolean
description: boolean on whether server should support CORS
default: false
pretty_print:
type: boolean
description: whether JSON responses should be pretty-printed
default: false
limit:
type: integer
description: server limit on number of items to return
default: 10
templates:
type: object
description: optional configuration to specify a different set of templates for HTML pages. Recommend using absolute paths. Omit this to use the default provided templates
properties:
path:
type: string
description: path to templates folder containing the Jinja2 template HTML files
static:
type: string
description: path to static folder containing css, js, images and other static files referenced by the template
map:
type: object
description: leaflet map setup for HTML pages
properties:
url:
type: string
description: URI template of tile server
attribution:
type: string
description: map attribution
required:
- url
- attribution
ogc_schemas_location:
type: string
description: local copy of http://schemas.opengis.net
manager:
type: object
description: optional OGC API - Processes asynchronous job management
properties:
name:
type: string
description: plugin name (see `pygeoapi.plugin` for supported process_managers)
connection:
type: string
description: connection info to store jobs (e.g. filepath)
output_dir:
type: string
description: temporary file area for storing job results (files)
required:
- name
- connection
- output_dir
api_rules:
type: object
description: optional API design rules to which pygeoapi should adhere
properties:
api_version:
type: string
description: optional semantic API version number override
strict_slashes:
type: boolean
description: whether trailing slashes are allowed in URLs (disallow = True)
url_prefix:
type: string
description: |-
Set to include a prefix in the URL path (e.g. https://base.com/my_prefix/endpoint).
Please refer to the configuration section of the documentation for more info.
version_header:
type: string
description: API version response header (leave empty or unset to omit this header)
required:
- bind
- url
- mimetype
- encoding
- map
logging:
type: object
description: logging definitions
properties:
level:
type: string
description: |-
The logging level (see https://docs.python.org/3/library/logging.html#logging-levels).
If level is defined and logfile is undefined, logging messages are output to the server’s stdout
enum:
- CRITICAL
- ERROR
- WARNING
- INFO
- DEBUG
- NOTSET
logfile:
type: string
description: the full file path to the logfile.
logformat:
type: string
description: custom logging format
dateformat:
type: string
description: custom date format to use in logs
rotation:
type: object
description: log rotation settings
properties:
mode:
type: string
description: whether to rotate based on size or time
enum:
- size
- time
when:
type: string
description: type of interval
enum:
- s
- m
- h
- d
- w0-w6
- midnight
interval:
type: integer
description: how often to rotate in time mode
max_bytes:
type: integer
description: when to rotate in size mode
backup_count:
type: integer
description: how many backups to keep
required:
- mode
required:
- level
metadata:
type: object
description: server metadata
properties:
identification:
type: object
description: server identification
properties:
title:
$ref: '#/definitions/i18n_string'
description: the title of the service
description:
$ref: '#/definitions/i18n_string'
description: some descriptive text about the service
keywords:
$ref: '#/definitions/i18n_array'
description: list of keywords about the service
keywords_type:
type: string
description: keyword type as per the ISO 19115 MD_KeywordTypeCode codelist
enum:
- discipline
- temporal
- place
- theme
- stratum
terms_of_service:
$ref: '#/definitions/i18n_string'
description: terms of service
url:
type: string
description: informative URL about the service
required:
- title
- description
- keywords
- url
license:
type: object
description: licensing details
properties:
name:
$ref: '#/definitions/i18n_string'
description: licensing details
url:
$ref: '#/definitions/i18n_string'
description: license URL
required:
- name
provider:
type: object
description: service provider details
properties:
name:
$ref: '#/definitions/i18n_string'
description: organization name
url:
$ref: '#/definitions/i18n_string'
description: URL of provider
required:
- name
contact:
type: object
description: service contact details
properties:
name:
type: string
description: Lastname, Firstname
position:
type: string
description: position
address:
type: string
description: postal address
city:
type: string
description: city
stateorprovince:
type: string
description: administrative area
postalcode:
type: string
description: postal or ZIP code
country:
type: string
description: country
phone:
type: string
description: phone number
fax:
type: string
description: fax number
email:
type: string
description: email address
url:
type: string
description: URL of contact
hours:
type: string
description: hours of service
instructions:
type: string
description: contact instructions
role:
type: string
description: role as per the ISO 19115 CI_RoleCode codelist
required:
- name
required:
- identification
- license
- provider
- contact
resources:
type: object
description: collections or processes published by the server
patternProperties:
"^.*$":
anyOf:
- type: object
description: base resource object
properties:
type:
type: string
description: resource type
enum:
- collection
- stac-collection
visibility:
type: string
description: visibility state of the resource
enum:
- default
- hidden
default: default
title:
$ref: '#/definitions/i18n_string'
description: the title of the service
description:
$ref: '#/definitions/i18n_string'
description: some descriptive text about the service
keywords:
$ref: '#/definitions/i18n_array'
description: list of keywords about the service
linked-data:
type: object
description: linked data configuration
properties:
item_template:
type: string
description: path to JSON-LD Jinja2 template
context:
type: array
description: additional JSON-LD context
items:
type: object
patternProperties:
"^.*$":
anyOf:
- type: string
- type: object
links:
type: array
description: list of related links
minItems: 0
items:
type: object
properties:
type:
type: string
description: MIME type
rel:
type: string
description: link relations per https://www.iana.org/assignments/link-relations/link-relations.xhtml
title:
type: string
description: title
href:
type: string
description: URL
hreflang:
type: string
description: language
length:
type: integer
description: optional content size in bytes (e.g. for download links)
required:
- type
- rel
- href
extents:
type: object
description: spatial and temporal extents
properties:
spatial:
type: object
description: spatial extent and CRS
properties:
bbox:
type: array
description: bounding box of resource
items:
type: number
minItems: 4
maxItems: 6
crs:
type: string
description: coordinate reference system of bbox
default: 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'
required:
- bbox
temporal:
type: object
description: temporal extent of resource
properties:
begin:
type: [string, 'null']
format: date-time
nullable: true
end:
type: [string, 'null']
format: date-time
nullable: true
required:
- spatial
providers:
type: array
description: required connection information
items:
type: object
properties:
type:
type: string
description: underlying data geospatial type
enum:
- feature
- coverage
- record
- map
- tile
- edr
- stac
default:
type: boolean
description: |-
whether the provider is the default. If not specified, the
first provider definition is considered the default
name:
type: string
description: |-
see `pygeoapi.plugin` for supported provider names.
For custom built plugins, use the import path (e.g. `mypackage.provider.MyProvider`)
data:
anyOf:
- type: string
- type: object
description: the data filesystem path or URL, depending on plugin setup
editable:
type: boolean
description: whether the resource is editable
default: false
table:
type: string
description: table name for RDBMS-based providers
id_field:
type: string
description: required for vector data, the field corresponding to the ID
geometry:
type: object
description: the field corresponding to the geometry
properties:
x_field:
type: string
description: the field corresponding to the x geometry
y_field:
type: string
description: the field corresponding to the y geometry
required:
- x_field
- y_field
time_field:
type: string
description: optional field corresponding to the temporal property of the dataset
title_field:
type: string
description: optional field of which property to display as title/label on HTML pages
format:
type: object
description: default format
properties:
name:
type: string
description: format name
mimetype:
type: string
description: format mimetype
required:
- name
- mimetype
options:
type: object
description: optional options key value pairs to pass to provider (i.e. GDAL creation)
oneOf:
- $ref: '#/definitions/provider/properties/PostgreSQL/properties/config/properties/options'
# - type: object
# patternProperties:
# "^[a-z]{2}$":
# allOf:
# - type: string
properties:
type: array
description: only return the following properties, in order
items:
type: string
minItems: 1
uniqueItems: true
crs:
type: array
description: |-
supported coordinate reference systems (CRSs).
pygeoapi will always provide or add the default if not specified.
items:
type: string
format: uri
default:
- http://www.opengis.net/def/crs/OGC/1.3/CRS84
uniqueItems: true
storage_crs:
type: string
format: uri
description: |-
the CRS identifier, from the list of supported CRS identifiers, that may be used to retrieve
features from a collection without the need to apply a CRS transformation.
default:
http://www.opengis.net/def/crs/OGC/1.3/CRS84
storage_crs_coordinate_epoch:
type: number
format: uri
description: |-
point in time at which coordinates in the spatial feature collection are referenced to the dynamic
coordinate reference system in `storageCrs`, that may be used to retrieve features from a
collection without the need to apply a change of coordinate epoch. It is expressed as a decimal
year in the Gregorian calendar.
example:
2017-03-25 in the Gregorian calendar is epoch 2017.23
required:
- type
- name
- data
required:
- type
- title
- description
- keywords
- extents
- providers
- type: object
description: process object
properties:
type:
type: string
description: resource type
enum:
- process
processor:
type: object
description: process binding
properties:
name:
type: string
description: |-
see `pygeoapi.plugin` for supported provider names.
For custom built plugins, use the import path (e.g. `mypackage.provider.MyProvider`)
required:
- name
required:
- type
- processor
definitions:
i18n_string:
oneOf:
- type: string
- type: object
patternProperties:
"^[a-zA-Z]{2,3}([-_][a-zA-Z0-9]{2,3})?$":
allOf:
- type: string
i18n_array:
oneOf:
- type: array
items:
type: string
- type: object
patternProperties:
"^[a-zA-Z]{2,3}([-_][a-zA-Z0-9]{2,3})?$":
allOf:
- type: array
items:
type: string
provider:
properties:
PostgreSQL:
properties:
config:
properties:
options:
properties:
connect_timeout:
type: integer
tcp_user_timeout:
type: integer
keepalives:
type: integer
keepalives_idle:
type: integer
keepalives_count:
type: integer
keepalives_interval:
type: integer
required:
- server
- logging
- metadata
- resources