Skip to content

WebID profile document missing foaf:PersonalProfileDocument, primaryTopic, maker #299

Description

@melvincarvalho

Problem

JSS-generated WebID profiles describe the WebID subject (#me) but don't describe the profile document itself. Canonical Solid profiles (see timbl's, and pivot's template) declare:

<>  a foaf:PersonalProfileDocument ;
    foaf:maker <#me> ;
    foaf:primaryTopic <#me> .

Without these, apps that discover a user by following a link to /profile/card don't know the document describes a person — they expect to follow foaf:primaryTopic from the document URI to reach the WebID.

Current JSS output

{
  "@id": "https://example.com/alice/profile/card#me",
  "@type": ["foaf:Person", "schema:Person"],
  "foaf:name": "Alice",
  "mainEntityOfPage": "https://example.com/alice/profile/card",
  ...
}

Only describes #me. No statement about the document itself.

Expected output

{
  "@graph": [
    {
      "@id": "https://example.com/alice/profile/card",
      "@type": "foaf:PersonalProfileDocument",
      "foaf:maker": {"@id": "https://example.com/alice/profile/card#me"},
      "foaf:primaryTopic": {"@id": "https://example.com/alice/profile/card#me"}
    },
    {
      "@id": "https://example.com/alice/profile/card#me",
      "@type": ["foaf:Person", "schema:Person"],
      ...
    }
  ]
}

Reference

  • Timbl's profile: prof:card a foaf:PersonalProfileDocument; foaf:maker <#me>; foaf:primaryTopic <#me>.
  • Pivot template: same pattern

Files affected

  • src/webid/profile.jsgenerateProfileJsonLd()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions