Skip to content

Commit 5611a3e

Browse files
committed
- removed test on extents key, when creating admin patch payload example
1 parent f250a85 commit 5611a3e

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

pygeoapi/openapi.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -727,19 +727,6 @@ def get_post_resource(res):
727727
return newres
728728

729729

730-
def get_patch_resource(res):
731-
"""
732-
Creates the payload for the PATCH resource admin request
733-
:param res: configuration resource
734-
:returns: resource patch
735-
"""
736-
737-
if 'extents' in res.keys():
738-
return {'extents': res['extents']}
739-
else:
740-
return ''
741-
742-
743730
def get_admin(cfg: dict) -> dict:
744731

745732
schema_dict = get_config_schema()
@@ -916,7 +903,7 @@ def get_admin(cfg: dict) -> dict:
916903
'description': 'Updates admin configuration resource',
917904
'content': {
918905
'application/json': {
919-
'example': get_patch_resource(res_eg[res_eg_key]),
906+
'example': {'extents': res_eg[res_eg_key]['extents']},
920907
'schema': schema_dict['properties']['resources']['patternProperties']['^.*$'] # noqa
921908
}
922909
},

0 commit comments

Comments
 (0)