Skip to content

Commit

Permalink
Use global key in admin oas patch
Browse files Browse the repository at this point in the history
  • Loading branch information
webb-ben committed Jan 24, 2025
1 parent f93246e commit 9a39f67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygeoapi/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def get_admin(cfg: dict) -> dict:

res_eg_key = next(iter(cfg['resources']))
res_eg = {
res_eg_key: cfg['resources'][res_eg_key]
res_eg_key: deepcopy(cfg['resources'][res_eg_key])
}

paths['/admin/config'] = {
Expand Down Expand Up @@ -887,7 +887,7 @@ def get_admin(cfg: dict) -> dict:
'description': 'Updates admin configuration resource',
'content': {
'application/json': {
'example': {'extents': res_eg[res_eg_key]['extents']},
'example': {'type': res_eg[res_eg_key]['type']},
'schema': schema_dict['properties']['resources']['patternProperties']['^.*$'] # noqa
}
},
Expand Down

0 comments on commit 9a39f67

Please sign in to comment.