scim2-models 0.2.11__tar.gz → 0.2.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scim2_models-0.2.11 → scim2_models-0.2.12}/.github/workflows/tests.yaml +1 -1
- {scim2_models-0.2.11 → scim2_models-0.2.12}/PKG-INFO +1 -1
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/changelog.rst +6 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/pyproject.toml +1 -1
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/schema.py +7 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_schema.py +16 -1
- {scim2_models-0.2.11 → scim2_models-0.2.12}/uv.lock +1 -1
- {scim2_models-0.2.11 → scim2_models-0.2.12}/.github/FUNDING.yml +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/.github/workflows/release.yml +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/.gitignore +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/.pre-commit-config.yaml +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/.readthedocs.yml +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/LICENSE +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/README.md +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/conftest.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/__init__.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/conf.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/contributing.rst +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/index.rst +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/reference.rst +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/doc/tutorial.rst +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.1-user-minimal.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.2-user-full.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.3-enterprise_user.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.4-group.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.5-service_provider_configuration.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.6-resource_type-group.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.6-resource_type-user.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.1-schema-enterprise_user.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.1-schema-group.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.1-schema-user.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.2-schema-resource_type.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.2-schema-schema.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.2-schema-service_provider_configuration.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.12-error-bad_request.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.12-error-not_found.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.14-user-post_request.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.14-user-post_response.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.3-user-post_request.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.3-user-post_response.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.4.1-user-known-resource.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.4.2-list_response-partial_attributes.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.4.3-list_response-post_query.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.4.3-search_request.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.1-user-put_request.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.1-user-put_response.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.1-patch_op-add_emails.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.1-patch_op-add_members.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.2-patch_op-remove_all_members.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.2-patch_op-remove_and_add_one_member.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.2-patch_op-remove_multi_complex_value.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.2-patch_op-remove_one_member.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.3-patch_op-replace_all_email_values.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.3-patch_op-replace_all_members.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.3-patch_op-replace_street_address.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.3-patch_op-replace_user_work_address.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.6-error-not_found.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.1-bulk_request-circular_conflict.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.1-list_response-circular_reference.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.2-bulk_request-enterprise_user.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.2-bulk_request-temporary_identifier.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.2-bulk_response-temporary_identifier.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.3-bulk_request-multiple_operations.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.3-bulk_response-error_invalid_syntax.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.3-bulk_response-multiple_errors.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.3-bulk_response-multiple_operations.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.3-error-invalid_syntax.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.4-error-payload_too_large.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.9-user-partial_response.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-4-list_response-resource_types.json +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/__init__.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/base.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/constants.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/py.typed +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/__init__.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/enterprise_user.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/group.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/resource.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/resource_type.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/service_provider_config.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7643/user.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/__init__.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/bulk.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/error.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/list_response.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/message.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/patch_op.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/rfc7644/search_request.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/scim2_models/utils.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/__init__.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/conftest.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_dynamic_resources.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_dynamic_schemas.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_enterprise_user.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_errors.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_group.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_list_response.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_model_attributes.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_model_serialization.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_model_validation.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_models.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_patch_op.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_resource_extension.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_resource_type.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_search_request.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_service_provider_configuration.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_user.py +0 -0
- {scim2_models-0.2.11 → scim2_models-0.2.12}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: scim2-models
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.12
|
|
4
4
|
Summary: SCIM2 models serialization and validation with pydantic
|
|
5
5
|
Project-URL: documentation, https://scim2-models.readthedocs.io
|
|
6
6
|
Project-URL: repository, https://github.com/python-scim/scim2-models
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "scim2-models"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.12"
|
|
8
8
|
description = "SCIM2 models serialization and validation with pydantic"
|
|
9
9
|
authors = [{name="Yaal Coop", email="contact@yaal.coop"}]
|
|
10
10
|
license = {file = "LICENSE"}
|
|
@@ -238,6 +238,13 @@ class Attribute(ComplexAttribute):
|
|
|
238
238
|
|
|
239
239
|
return annotation, field
|
|
240
240
|
|
|
241
|
+
def get_attribute(self, attribute_name: str) -> Optional["Attribute"]:
|
|
242
|
+
"""Find an attribute by its name."""
|
|
243
|
+
for sub_attribute in self.sub_attributes or []:
|
|
244
|
+
if sub_attribute.name == attribute_name:
|
|
245
|
+
return sub_attribute
|
|
246
|
+
return None
|
|
247
|
+
|
|
241
248
|
|
|
242
249
|
class Schema(Resource):
|
|
243
250
|
schemas: Annotated[list[str], Required.true] = [
|
|
@@ -87,7 +87,7 @@ def test_uri_ids():
|
|
|
87
87
|
Schema(id="invalid\nuri")
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
def
|
|
90
|
+
def test_get_schema_attribute(load_sample):
|
|
91
91
|
"""Test the Schema.get_attribute method."""
|
|
92
92
|
payload = load_sample("rfc7643-8.7.1-schema-user.json")
|
|
93
93
|
schema = Schema.model_validate(payload)
|
|
@@ -98,3 +98,18 @@ def test_get_attribute(load_sample):
|
|
|
98
98
|
schema.get_attribute("userName").mutability = Mutability.read_only
|
|
99
99
|
|
|
100
100
|
assert schema.attributes[0].mutability == Mutability.read_only
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def test_get_attribute_attribute(load_sample):
|
|
104
|
+
"""Test the Schema.get_attribute method."""
|
|
105
|
+
payload = load_sample("rfc7643-8.7.1-schema-group.json")
|
|
106
|
+
schema = Schema.model_validate(payload)
|
|
107
|
+
attribute = schema.get_attribute("members")
|
|
108
|
+
|
|
109
|
+
assert attribute.get_attribute("invalid") is None
|
|
110
|
+
|
|
111
|
+
assert attribute.sub_attributes[0].name == "value"
|
|
112
|
+
assert attribute.sub_attributes[0].mutability == Mutability.immutable
|
|
113
|
+
attribute.get_attribute("value").mutability = Mutability.read_only
|
|
114
|
+
|
|
115
|
+
assert attribute.sub_attributes[0].mutability == Mutability.read_only
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.5-service_provider_configuration.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7643-8.7.1-schema-enterprise_user.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.4.3-list_response-post_query.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.1-patch_op-add_emails.json
RENAMED
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.1-patch_op-add_members.json
RENAMED
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.2-patch_op-remove_all_members.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.5.2.2-patch_op-remove_one_member.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.2-bulk_request-enterprise_user.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.3-bulk_response-multiple_errors.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-3.7.4-error-payload_too_large.json
RENAMED
|
File without changes
|
|
File without changes
|
{scim2_models-0.2.11 → scim2_models-0.2.12}/samples/rfc7644-4-list_response-resource_types.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|