Skip to content

Commit 131bd4e

Browse files
committed
feat: allow queries for configuration resources
1 parent 34519e4 commit 131bd4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scim2_cli/query.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
import click
44
from click import ClickException
55
from scim2_client import SCIMClientError
6+
from scim2_models import ResourceType
7+
from scim2_models import Schema
68
from scim2_models import SearchRequest
9+
from scim2_models import ServiceProviderConfig
710
from sphinx_click.rst_to_ansi_formatter import make_rst_to_ansi_formatter
811

912
from .utils import DOC_URL
@@ -77,6 +80,9 @@ def query_cli(
7780
echo '{"startIndex": 50, "count": 10}' | query user
7881
7982
"""
83+
for model in (Schema, ResourceType, ServiceProviderConfig):
84+
ctx.obj["resource_models"][model.__name__.lower()] = model
85+
8086
if resource_type:
8187
try:
8288
resource_type = ctx.obj["resource_models"][resource_type]

0 commit comments

Comments
 (0)