-
-
Notifications
You must be signed in to change notification settings - Fork 2
Give email addresses their mailto identity #133
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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", | ||
| "type": "string" | ||
| }, | ||
| "website": { | ||
| "x-jsonld-id": "http://xmlns.com/foaf/0.1/homepage", | ||
| "$ref": "../schemas/ietf/uri/3986/uri/v1.json" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| "\"very.unusual.@.unusual.com\"@example.com", | ||
| "user@[IPv6:2001:db8::1]" | ||
| ], | ||
| "x-jsonld-self": "mailto", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. schemas/ietf/email/5321/address/v1.json:11 — Since Severity: low 🤖 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", | ||
|
|
||
| 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 | ||
| } | ||
| ] | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
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.
examples/contact-card.json:29 —
accountusesx-jsonld-self: "acct"but is otherwise unconstrained (type: "string"), so some values could validate yet still produce an invalidacct:IRI in RDF output. Consider constraining the allowed value space to inputs that are safe to embed as anacctidentifier.Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.