Skip to content

Commit a6cb469

Browse files
committed
fix: discover the schemas and the resource types when no schema file is given
1 parent 1e76152 commit a6cb469

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎doc/changelog.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Changed
88
^^^^^^^
99
- Python 3.11 is now the minimum supported version.
1010

11+
Fixed
12+
^^^^^
13+
- Without ``--schemas``, the schemas and the resource types are discovered on the server
14+
again with scim2-client 0.9. Only ``User`` and ``Group`` were known, without their
15+
extensions.
16+
1117
Security
1218
^^^^^^^^
1319
- The control characters of what the server sends are escaped before being displayed, so

‎scim2_cli/__init__.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
import click
55
from httpx2 import Client
66
from scim2_client.engines.httpx2 import SyncSCIMClient
7-
from scim2_models import Group
87
from scim2_models import ListResponse
98
from scim2_models import Resource
109
from scim2_models import ResourceType
1110
from scim2_models import Schema
1211
from scim2_models import ServiceProviderConfig
13-
from scim2_models import User
1412
from sphinx_click.rst_to_ansi_formatter import make_rst_to_ansi_formatter
1513

1614
from scim2_cli.create import create_cli
@@ -30,7 +28,9 @@
3028
def load_config_files(
3129
schemas_fd, resource_types_fd, service_provider_config_fd
3230
) -> tuple[
33-
list[type[Resource]], list[ResourceType] | None, ServiceProviderConfig | None
31+
list[type[Resource]] | None,
32+
list[ResourceType] | None,
33+
ServiceProviderConfig | None,
3434
]:
3535
if schemas_fd:
3636
schemas_payload = json.load(schemas_fd)
@@ -41,7 +41,7 @@ def load_config_files(
4141
resource_models = [Resource.from_schema(schema) for schema in schemas_obj]
4242

4343
else:
44-
resource_models = [User, Group]
44+
resource_models = None
4545

4646
if resource_types_fd:
4747
resource_types_payload = json.load(resource_types_fd)

0 commit comments

Comments
 (0)