Skip to content

Conversation

@smithtim
Copy link
Collaborator

@smithtim smithtim commented Nov 6, 2020

Currently, an extension of the form a:b:c cannot be patched directly, because the path will be interpreted as an attribute c in extension a:b. Attributes within the extension can be patched, but not the extension itself.

This PR adds support for patching extensions, by looking for them in the :schemas field of the object being patched. E.g. if a:b:c is in :schemas, it will be treated as an extension, otherwise it will be treated as an attribute c in extension a:b.

Copy link
Collaborator

@Quezion Quezion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the current parsing implementation, this seems conformant to the RFC. It seems to match style & includes tests.

I approve. I'd normally merge this -- but since this process is young... @rkaippully is this a satisfactory PR for you?

If so, I will merge PRs of this quality in the future & only ask you for release.

Speaking of, can you please perform a release after this PR?

@rkaippully
Copy link
Owner

rkaippully commented Nov 17, 2020

In fact, this is wrong according to RFC. The syntax at https://tools.ietf.org/html/rfc7644#page-21 says that the attrPath must have an ATTRNAME and an optional subAttr. Operations on an entire extension are not valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants