Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERS-18 Add support for subregistrations #19

Closed
wants to merge 6 commits into from
Closed

Conversation

kelvinqian00
Copy link
Collaborator

No description provided.

@kelvinqian00 kelvinqian00 marked this pull request as draft April 21, 2021 14:18
Copy link
Contributor

@FeLungs FeLungs left a comment

Choose a reason for hiding this comment

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

Looks good, one thing to note is that Registration should be a UUID as well as subregistration (within one of the objects found within the array extension) and in your tests they are just strings

Copy link
Contributor

@FeLungs FeLungs left a comment

Choose a reason for hiding this comment

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

Please update parsing and subsequent handling of sub-registration

pat-fsm-map)))))
(get-in stmt ["context" "registration"] :no-registration)
?sub-registration
(get-in stmt ["context" "extensions" subreg-iri "subregistration"])]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this may be incorrect

the subregistration extension is an array-valued context extension. The array MUST NOT be empty. Each value of the array MUST be an object with the properties in the table below.

Name Values
profile The URI of a Profile present in the category context activities that this is a subregistration for.
subregistration A variant 2 UUID as specified in RFC 4122. This is the subregistration identifier in the requirements above.

Copy link
Contributor

Choose a reason for hiding this comment

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

right now, this would result in (get [{"profile" "...", "subregistration" "..."} ...] "subregistration")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I noticed that, so now the subregistration extension has to be an array/vector. The subregistration ID chosen is dependent on the "profile" key of the subregistration object.

Copy link
Collaborator Author

@kelvinqian00 kelvinqian00 Apr 21, 2021

Choose a reason for hiding this comment

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

Taking a broader view, the Profile of the Pattern the Statement is being validated against must reference it in the category context activities:

MUST follow a Pattern from a Profile for every Statement that has the Profile in the category context activities.
so at some point that needs to be added (perhaps in this branch?)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes sense to check for one or more profile reference category activities within all statements passed into pattern validation. If they don't have the profile reference, then statement batch is invalid

@kelvinqian00 kelvinqian00 marked this pull request as ready for review April 21, 2021 15:43
@FeLungs
Copy link
Contributor

FeLungs commented Apr 21, 2021

updates look good, see my response to your comments about expecting statements to contain 1 or more profile reference context activities

@kelvinqian00
Copy link
Collaborator Author

Superseeded by #20

@kelvinqian00 kelvinqian00 deleted the PERS-18 branch April 21, 2021 17:11
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.

2 participants