File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ server:
5353# connection: /tmp/pygeoapi-process-manager.db
5454# output_dir: /tmp/
5555 # ogc_schemas_location: /opt/schemas.opengis.net
56-
56+ admin : false # enable admin API
57+
5758logging :
5859 level : ERROR
5960 # logfile: /tmp/pygeoapi.log
61+
6062
6163metadata :
6264 identification :
Original file line number Diff line number Diff line change @@ -666,9 +666,24 @@ def get_config_schema():
666666 return yaml_load (fh2 )
667667
668668
669+ def get_put_admin (cfg : dict ) -> dict :
670+ """
671+ Creates the payload for the PUT admin config request
672+
673+ :param cfg: `dict` of configuration
674+
675+ :returns: dict of OpenAPI definition
676+ """
677+
678+ cfg ['metadata' ]['identification' ]['title' ]['en' ] = 'New pygeoapi Title'
679+ cfg ['metadata' ]['identification' ]['title' ]['fr' ] = 'Nouveau pygeoapi Titre'
680+
681+ return cfg
682+
683+
669684def get_admin (cfg : dict ) -> dict :
670685 """
671- Generates an OpenAPI definition for the admin UI
686+ Generates an OpenAPI definition for the admin API
672687
673688 :param cfg: `dict` of configuration
674689 """
@@ -707,7 +722,7 @@ def get_admin(cfg: dict) -> dict:
707722 'description' : 'Updates admin configuration' ,
708723 'content' : {
709724 'application/json' : {
710- 'example' : cfg ,
725+ 'example' : get_put_admin ( cfg ) ,
711726 'schema' : schema_dict
712727 }
713728 },
You can’t perform that action at this time.
0 commit comments