Skip to content

Commit a42bea3

Browse files
author
doublebyte1
committed
- read config file example from config file itself
1 parent dd96449 commit a42bea3

File tree

2 files changed

+2
-105
lines changed

2 files changed

+2
-105
lines changed

pygeoapi/openapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def get_admin(cfg: dict) -> dict:
707707
'description': 'Updates admin configuration',
708708
'content': {
709709
'application/json': {
710-
'example': schema_dict['properties']['server']['properties']['admin-post-example'], # noqa
710+
'example': cfg,
711711
'schema': schema_dict
712712
}
713713
},

pygeoapi/schemas/config/pygeoapi-config-0.x.yml

Lines changed: 1 addition & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -28,110 +28,6 @@ properties:
2828
admin:
2929
type: boolean
3030
default: false
31-
admin-post-example:
32-
server:
33-
bind:
34-
host: 0.0.0.0
35-
port: 5000
36-
url: http://localhost:5000
37-
mimetype: application/json; charset=UTF-8
38-
encoding: utf-8
39-
gzip: false
40-
languages:
41-
- en-US
42-
- fr-CA
43-
# cors: true
44-
pretty_print: true
45-
limit: 10
46-
map:
47-
url: https://tile.openstreetmap.org/{z}/{x}/{y}.png
48-
attribution: '&copy; <a href="https://openstreetmap.org/copyright">OpenStreetMap contributors</a>'
49-
admin: true
50-
logging:
51-
level: ERROR
52-
53-
metadata:
54-
identification:
55-
title:
56-
en: New pygeoapi Title
57-
fr: instance par défaut de pygeoapi
58-
description:
59-
en: pygeoapi provides an API to geospatial data
60-
fr: pygeoapi fournit une API aux données géospatiales
61-
keywords:
62-
en:
63-
- geospatial
64-
- data
65-
- api
66-
fr:
67-
- géospatiale
68-
- données
69-
- api
70-
keywords_type: theme
71-
terms_of_service: https://creativecommons.org/licenses/by/4.0/
72-
url: https://example.org
73-
license:
74-
name: CC-BY 4.0 license
75-
url: https://creativecommons.org/licenses/by/4.0/
76-
provider:
77-
name: Organization Name
78-
url: https://pygeoapi.io
79-
contact:
80-
name: Lastname, Firstname
81-
position: Position Title
82-
address: Mailing Address
83-
city: City
84-
stateorprovince: Administrative Area
85-
postalcode: Zip or Postal Code
86-
country: Country
87-
phone: +xx-xxx-xxx-xxxx
88-
fax: +xx-xxx-xxx-xxxx
89-
90-
url: Contact URL
91-
hours: Mo-Fr 08:00-17:00
92-
instructions: During hours of service. Off on weekends.
93-
role: pointOfContact
94-
95-
resources:
96-
obs:
97-
type: collection
98-
title: Observations
99-
description: My cool observations
100-
keywords:
101-
- observations
102-
- monitoring
103-
linked-data:
104-
context:
105-
- datetime: https://schema.org/DateTime
106-
- vocab: https://example.com/vocab#
107-
stn_id: "vocab:stn_id"
108-
value: "vocab:value"
109-
links:
110-
- type: text/csv
111-
rel: canonical
112-
title: data
113-
href: https://github.com/mapserver/mapserver/blob/branch-7-0/msautotest/wxs/data/obs.csv
114-
hreflang: en-US
115-
- type: text/csv
116-
rel: alternate
117-
title: data
118-
href: https://raw.githubusercontent.com/mapserver/mapserver/branch-7-0/msautotest/wxs/data/obs.csv
119-
hreflang: en-US
120-
extents:
121-
spatial:
122-
bbox: [-180,-90,180,90]
123-
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
124-
temporal:
125-
begin: 2000-10-30T18:24:39Z
126-
end: 2007-10-30T08:57:29Z
127-
providers:
128-
- type: feature
129-
name: CSV
130-
data: tests/data/obs.csv
131-
id_field: id
132-
geometry:
133-
x_field: long
134-
y_field: lat
13531
mimetype:
13632
type: string
13733
description: default MIME type
@@ -714,6 +610,7 @@ definitions:
714610
type: integer
715611
keepalives_interval:
716612
type: integer
613+
717614
required:
718615
- server
719616
- logging

0 commit comments

Comments
 (0)