Add predefined schema extension attribute accessors to SCIMMY.Types.Schema instances
#78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
SCIMMY.Types.Schemaconstructor 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
schemasproperty, depending on whether the extension has any actual values. Test fixtures for individualSCIMMY.Schemas.*classes have been updated to verify extension schema attribute accessors behave as described. A new test fixture has been added to theSCIMMY.Messages.PatchOpclass suite to verify it correctly handles namespaced attributes, and missing branch coverage has been added to theSCIMMY.Types.Schemaclass suite.