-
Notifications
You must be signed in to change notification settings - Fork 97
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
Rework Data Model section. #455
Conversation
Add different classes of properties, all datatypes, move representation authoring rules to later in document.
Would it be possible to merge this branch into #454 (or merge #454 into this one)? This PR misses the rules on representation specific properties (ie, resolution 5 and resolution 6) while those are the focus of #454. These are the two sides of the same coin, and it is a bit difficult to comment on each of them separately... |
</ol> | ||
<p> | ||
In order to maximize interoperability, representation specification authors | ||
SHOULD register their representation in the [[?DID-SPEC-REGISTRIES]]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to provide an "example" of how to do this. w3c/did-extensions#154
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but think that would be best handled in another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Also note that the "contents" of those specifications have 3 examples in DID Core: JSON, JSON-LD, and CBOR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor editorial suggestions, otherwise LGTM.
different classes of properties. The first class of properties are called | ||
core properties, and are specified in section <a href="#core-properties"></a>. | ||
The second class of properties are called representation properties, and | ||
are specified in section <a href="#representations"></a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the two buckets. I'm not sure if we want to bikeshed the names here, or whether we should worry about that after the primary changes in the spec (i.e., after this PR is merged).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect we'll bike shed the names in another PR. This PR assumes that we'll do that later.
</ol> | ||
<p> | ||
In order to maximize interoperability, representation specification authors | ||
SHOULD register their representation in the [[?DID-SPEC-REGISTRIES]]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but think that would be best handled in another PR.
Co-authored-by: Brent Zundel <[email protected]>
@iherman wrote:
I was trying to keep the PR relatively small and focused, dealing w/ the base set of changes to the data model per the virtual face to face in this PR, and then @dlongley adding on top of it to address other resolutions made (that he was asked to write a PR for). Now that we have multiple approvals for this PR, I'm hesitant to do that @iherman because it could affect the review results. I know it's a pain to review, but I'd rather keep the two separate given that we have multiple positive reviews with changes made based on those reviews. We'll have to deal with #454 as a separate PR. |
It appears all approvals from Orie, Brent, myself, and Dave (author of #454 and approver of this PR) on this PR have also approved the other PR if it makes it easier to get both through with fewer merge conflicts. Hard to say what other reviewers will view as controversial though and so the age old wisdom of keeping PRs small and focused would lean me towards keeping separate as well. |
index.html
Outdated
@@ -2250,6 +2329,36 @@ <h1>Core Representations</h1> | |||
for more information. | |||
</p> | |||
|
|||
<section> | |||
<h2>Creating Representations</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest changing this heading to "Representation Requirements" but it's okay to do that in a subsequent PR as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major improvement. Let's pull in ASAP. Can be tweaked by subsequent PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, I continue to believe that it's a mistake to include representation-specific syntax in the abstract data model and other representations (e.g. to see @context
in a YAML file). But I agree this PR reflects the decisions recently made during the TPAC DID WG F2F.
index.html
Outdated
<ol> | ||
<li> | ||
A representation MUST define an unambiguous encoding and decoding for all | ||
property names and their associated values as defined in this specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be defined in terms of the types associated with the property values and not the values themselves. It's a subtle difference, but it allows us to continue to talk about things in terms of property definitions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I just moved the text in this PR and expect that we'll make the change you suggest in a subsequent PR, when the "Representation Requirements" section is updated with rewording / new rules that we might have missed (like how you register a representation in the DID Spec registries).
are conformant with the fragment processing rules defined in section | ||
<a href="#fragment"></a> of this specification. | ||
</li> | ||
</ol> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The representation must also define default generic type processing rules for consumption of all data types within the representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not understanding how this differs from a representation defining unambiguous encoding and decoding for all property names and the data types of their associated values, could you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand what @jricher is getting at, and that's planned for a future PR. Basically, each representation must list all the abstract data model data types and how you express those concretely in the representation. The representation sections kinda/sorta have this right now, but if this PR goes in, we'll be able to be far more explicit and prescriptive about those serializations in each representation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msporny has the right of it, but it also needs to clearly go both ways, to and from the data model data types and the representation's data types. So you need things like this strawman:
"If you see an Integer in the ADM it goes in a JSON Number"
As well as:
"If you see a JSON Number in the representation, and don't have an additional property definition, it is an ADM Float".
I'm ok with this being in a separate PR but this can't be lost.
index.html
Outdated
A representation MUST define an unambiguous encoding and decoding for all | ||
property names and their associated values as defined in this specification. | ||
This enables anything that can be represented in the <a>DID document</a> data | ||
model to also be represented in a compliant representation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jricher would wording this address your concern?
A representation MUST define an unambiguous encoding and decoding for all | |
property names and their associated values as defined in this specification. | |
This enables anything that can be represented in the <a>DID document</a> data | |
model to also be represented in a compliant representation. | |
A representation MUST define an unambiguous encoding and decoding for all | |
property names and the data types of their associated values, as defined in | |
this specification. This enables anything that can be represented in the | |
<a>DID document</a> data model to also be representable in a compliant | |
representation. |
Co-authored-by: Justin Richer <[email protected]>
Co-authored-by: Justin Richer <[email protected]>
Normative, multiple reviews, changes requested and made, no objections, RESOLUTION to merge, merging. |
The issue was discussed in a meeting on 2020-11-24)
View the transcript3. PR 454 and 455...See github pull request #454, #455. Brent Zundel: status update? dlongely: we are waiting for a response from mike jones regarding the suggestions for adding a note to the PR / regardign @context in the JSON representation section. Brent Zundel: I will ping him again Markus Sabadello: after merging 455 and then 454 we still need to revisit the exact terminology... lots of different properties type to hammer down. See github issue #463. Markus Sabadello: feedback welcome Brent Zundel: other PRs that need to be discussed in this meeting? |
This PR implements a number of resolutions made during the last DID WG virtual face-to-face meeting. Namely, it adds different classes of properties, defines all datatypes, and moves representation authoring rules to later in document.
Reviewers should look at the rewritten Data Model section here:
https://pr-preview.s3.amazonaws.com/w3c/did-core/pull/455.html#data-model
and the representation authoring guidelines that was moved here:
https://pr-preview.s3.amazonaws.com/w3c/did-core/pull/455.html#creating-representations
Preview | Diff