Skip to content

Commit

Permalink
feat: config-cli enumerate scope type
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed May 10, 2022
1 parent 1cf6753 commit 275533b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jans-cli/cli/config_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,15 +965,16 @@ def obtain_parameters(self, endpoint, single=False):
if not param_name in parameters:
text_ = param['name']
help_text = param.get('description') or param.get('summary')
enforce = True if end_point_param and end_point_param['name'] == param['name'] else False
enforce = True if param['schema']['type'] == 'integer' or (end_point_param and end_point_param['name'] == param['name']) else False

parameters[param_name] = self.get_input(
text=text_.strip('.'),
itype=param['schema']['type'],
default=param['schema'].get('default'),
enforce=enforce,
help_text=help_text,
example=param.get('example')
example=param.get('example'),
values=param['schema'].get('enum', [])
)

return parameters
Expand Down
6 changes: 6 additions & 0 deletions jans-config-api/docs/jans-config-api-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2178,6 +2178,12 @@ paths:
parameters:
- schema:
type: string
enum:
- openid
- dynamic
- uma
- spontaneous
- oauth
in: query
name: type
description: Scope type.
Expand Down

0 comments on commit 275533b

Please sign in to comment.