Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sleelin
Copy link
Collaborator

@sleelin sleelin commented Mar 5, 2025

Currently, the SCIMMY.Types.Schema constructor defines accessors for extension schemas, using the extension schema ID as the property name. The set accessor for these properties writes values directly to the underlying resource object, and then prevents extension of this object. Namespaced accessors are also defined for each attribute of the extension schema, which forward accessor operations to the extension schema property. When namespaced extension attribute accessors are used to add properties to the underlying resource object's extension schema value, they attempt to do so to a non-extensible target object. This raises an unintended extensibility exception, and effectively prevents modifying the extension schema value in any way.

This change updates the behaviour of the extension schema accessors, making the get accessor return a new interceding object with all extension attributes predefined as accessors in the same way direct schema attributes are predefined. The extension schema set accessor has also been updated to add or remove the extension schema ID from the schemas property, depending on whether the extension has any actual values. Test fixtures for individual SCIMMY.Schemas.* classes have been updated to verify extension schema attribute accessors behave as described. A new test fixture has been added to the SCIMMY.Messages.PatchOp class suite to verify it correctly handles namespaced attributes, and missing branch coverage has been added to the SCIMMY.Types.Schema class suite.

@sleelin sleelin added the bug Something isn't working label Mar 5, 2025
@sleelin sleelin added this to the 1.3.5 milestone Mar 5, 2025
@sleelin sleelin self-assigned this Mar 5, 2025
@sleelin sleelin linked an issue Mar 5, 2025 that may be closed by this pull request
@sleelin sleelin merged commit f725c7f into main Mar 5, 2025
3 checks passed
@sleelin sleelin deleted the issue/77-schema-extension-extensibility branch March 5, 2025 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

PatchOp from EntraId for EnterpriseUser Extensions throws exceptions

2 participants