File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -721,6 +721,14 @@ def get_admin(cfg: dict) -> dict:
721721 res_eg = {
722722 res_eg_key : cfg ['resources' ][res_eg_key ]
723723 }
724+ if 'extents' in res_eg [res_eg_key ]:
725+ res_eg_eg_key = 'extents'
726+ elif 'type' in res_eg [res_eg_key ]:
727+ res_eg_eg_key = 'type'
728+
729+ res_eg [res_eg_key ]['patch_example' ] = {
730+ res_eg_eg_key : res_eg [res_eg_key ][res_eg_eg_key ]
731+ }
724732
725733 paths ['/admin/config' ] = {
726734 'get' : {
@@ -887,7 +895,7 @@ def get_admin(cfg: dict) -> dict:
887895 'description' : 'Updates admin configuration resource' ,
888896 'content' : {
889897 'application/json' : {
890- 'example' : { 'extents' : res_eg [res_eg_key ]['extents' ]} ,
898+ 'example' : res_eg [res_eg_key ]['patch_example' ] ,
891899 'schema' : schema_dict ['properties' ]['resources' ]['patternProperties' ]['^.*$' ] # noqa
892900 }
893901 },
You can’t perform that action at this time.
0 commit comments