Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions examples/contact-card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Contact Card",
"description": "A personal contact entry that identifies the person by their mailbox as a mailto IRI, their federated account as an acct IRI, and their website, all minted from the standard library",
"examples": [
{
"name": "Grace Hopper",
"email": "grace.hopper@Example.COM",
"account": "grace@social.example.net",
"website": "https://example.com/~grace"
}
],
"x-jsonld-type": "https://schema.org/Person",
"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://schema.org/Person" ],
"type": "object",
"required": [ "name", "email" ],
"properties": {
"name": {
"x-jsonld-id": "https://schema.org/name",
"type": "string"
},
"email": {
"x-jsonld-id": "http://xmlns.com/foaf/0.1/mbox",
"$ref": "../schemas/ietf/email/5321/address/v1.json"
},
"account": {
"x-jsonld-id": "https://schema.org/identifier",
"x-jsonld-self": "acct",

@augmentcode augmentcode Bot Aug 5, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

examples/contact-card.json:29 — account uses x-jsonld-self: "acct" but is otherwise unconstrained (type: "string"), so some values could validate yet still produce an invalid acct: IRI in RDF output. Consider constraining the allowed value space to inputs that are safe to embed as an acct identifier.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

"type": "string"
},
"website": {
"x-jsonld-id": "http://xmlns.com/foaf/0.1/homepage",
"$ref": "../schemas/ietf/uri/3986/uri/v1.json"
}
},
"additionalProperties": false
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@sourcemeta/jsonschema": "^16.5.0"
"@sourcemeta/jsonschema": "^16.6.0"
}
}
1 change: 1 addition & 0 deletions schemas/ietf/email/5321/address/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"\"very.unusual.@.unusual.com\"@example.com",
"user@[IPv6:2001:db8::1]"
],
"x-jsonld-self": "mailto",

@augmentcode augmentcode Bot Aug 5, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

schemas/ietf/email/5321/address/v1.json:11 — Since x-jsonld-self mints a mailto: IRI, consider also linking to RFC 6068 (mailto URI scheme) in x-links so the new identity semantics are documented alongside RFC 5321.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

"x-license": "https://github.com/sourcemeta/std/blob/main/LICENSE",
"x-links": [ "https://www.rfc-editor.org/rfc/rfc5321#section-4.1.2" ],
"type": "string",
Expand Down
87 changes: 87 additions & 0 deletions test/examples/contact-card.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"target": "../../examples/contact-card.json",
"tests": [
{
"description": "Valid - complete card",
"data": {
"name": "Grace Hopper",
"email": "grace.hopper@Example.COM",
"account": "grace@social.example.net",
"website": "https://example.com/~grace"
},
"valid": true,
"rdf": [
{
"@type": [ "https://schema.org/Person" ],
"https://schema.org/identifier": [
{
"@id": "acct:grace@social.example.net"
}
],
"http://xmlns.com/foaf/0.1/mbox": [
{
"@id": "mailto:grace.hopper@example.com"
}
],
"https://schema.org/name": [
{
"@value": "Grace Hopper"
}
],
"http://xmlns.com/foaf/0.1/homepage": [
{
"@id": "https://example.com/~grace"
}
]
}
]
},
{
"description": "Valid - minimal card",
"data": {
"name": "Margaret Hamilton",
"email": "50%off@example.com"
},
"valid": true,
"rdf": [
{
"@type": [ "https://schema.org/Person" ],
"http://xmlns.com/foaf/0.1/mbox": [
{
"@id": "mailto:50%25off@example.com"
}
],
"https://schema.org/name": [
{
"@value": "Margaret Hamilton"
}
]
}
]
},
{
"description": "Invalid - missing email",
"data": {
"name": "Grace Hopper"
},
"valid": false
},
{
"description": "Invalid - email without a domain",
"data": {
"name": "Grace Hopper",
"email": "grace.hopper"
},
"valid": false
},
{
"description": "Invalid - unknown property",
"data": {
"name": "Grace Hopper",
"email": "grace.hopper@example.com",
"phone": "+15551234567"
},
"valid": false
}
]
}
Loading
Loading