8000 Why do Objects have '.id' but Links don't? · Issue #288 · w3c/activitystreams · GitHub
[go: up one dir, main page]

Skip to content

Why do Objects have '.id' but Links don't? #288

@gobengo

Description

@gobengo

Please Indicate One:

  • Question

Please Describe the Issue:
On another issue someone implied they think that Object#id and Link#href are 'the same' and it's a design flaw. I disagree and wanted to show how an example link could have and href that is different than it's id (IRI, like a UUID URN or something). However, I think that is actually not valid because the spec does not say Links can have id.

{
  "id": "urn:uuid:dc06de98-d5ed-11e5-b6b1-7831c1cf2c8e",
  "href": "https://bengo.is"
}

I think Links should also have id defined with same semantics. But I could be missing a good reason to avoid them.


Separate, but this is editorial: I've looked (cmd+f) for definitions in the spec a few times now for both id and type on Objects. But they are mentioned casually in prose instead of formally defined like other properties ("In addition to having a global identifier (expressed as an absolute IRI using the id property) and an "object type" (expressed using the type property)...") I think it would be clearer to define 'id' and 'type' just like the rest of the Object properties like 'attachment'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0