-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add seed credential schema+vocab
- Loading branch information
Showing
8 changed files
with
603 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"@context": { | ||
"w3ccred": "https://www.w3.org/2018/credentials#", | ||
"schema-id": "https://beta.api.schemas.serto.id/v1/public/organization-role/1.0/ld-context.json#", | ||
"OrganizationRole": { | ||
"@id": "schema-id" | ||
}, | ||
"credentialStatus": { | ||
"@id": "schema-id:credentialStatus", | ||
"@context": { | ||
"id": { | ||
"@id": "schema-id:id", | ||
"@type": "http://schema.org/URL" | ||
}, | ||
"type": { | ||
"@id": "schema-id:type", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"revocationListIndex": { | ||
"@id": "schema-id:revocationListIndex", | ||
"@type": "http://schema.org/Number" | ||
}, | ||
"revocationListCredential": { | ||
"@id": "schema-id:revocationListCredential", | ||
"@type": "http://schema.org/URL" | ||
} | ||
} | ||
}, | ||
"credentialSubject": { | ||
"@id": "w3ccred:credentialSubject", | ||
"@context": { | ||
"id": { | ||
"@id": "schema-id:id", | ||
"@type": "@id" | ||
}, | ||
"title": { | ||
"@id": "schema-id:title", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"employmentType": { | ||
"@id": "schema-id:employmentType", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"responsibilities": { | ||
"@id": "schema-id:responsibilities", | ||
"@type": "http://schema.org/Text" | ||
} | ||
} | ||
}, | ||
"@version": 1.1 | ||
} | ||
} |
151 changes: 151 additions & 0 deletions
151
scripts/seeds/credentials/organization-role.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://beta.api.schemas.serto.id/v1/public/organization-role/1.0/json-schema.json", | ||
"$metadata": { | ||
"slug": "organization-role", | ||
"version": "1.0", | ||
"icon": "🅞", | ||
"discoverable": false, | ||
"uris": { | ||
"jsonLdContextPlus": "https://beta.api.schemas.serto.id/v1/public/organization-role/1.0/ld-context-plus.json", | ||
"jsonLdContext": "https://beta.api.schemas.serto.id/v1/public/organization-role/1.0/ld-context.json", | ||
"jsonSchema": "https://beta.api.schemas.serto.id/v1/public/organization-role/1.0/json-schema.json" | ||
} | ||
}, | ||
"title": "OrganizationRole", | ||
"description": "A role of a Person within an Organization", | ||
"type": "object", | ||
"required": [ | ||
"@context", | ||
"type", | ||
"issuer", | ||
"issuanceDate", | ||
"credentialStatus", | ||
"credentialSubject" | ||
], | ||
"properties": { | ||
"@context": { | ||
"type": [ | ||
"string", | ||
"array", | ||
"object" | ||
] | ||
}, | ||
"id": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"type": { | ||
"type": [ | ||
"string", | ||
"array" | ||
], | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"issuer": { | ||
"type": [ | ||
"string", | ||
"object" | ||
], | ||
"format": "uri", | ||
"required": [ | ||
"id" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
} | ||
}, | ||
"issuanceDate": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"expirationDate": { | ||
"type": "string", | ||
"format": "date-time" | ||
}, | ||
"credentialStatus": { | ||
"title": "credentialStatus", | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type", | ||
"revocationListIndex", | ||
"revocationListCredential" | ||
], | ||
"properties": { | ||
"id": { | ||
"title": "id", | ||
"description": "", | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"type": { | ||
"title": "type", | ||
"description": "RevocationList2020Status", | ||
"type": "string" | ||
}, | ||
"revocationListIndex": { | ||
"title": "revocationListIndex", | ||
"description": "", | ||
"type": "number" | ||
}, | ||
"revocationListCredential": { | ||
"title": "revocationListCredential", | ||
"description": "", | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
} | ||
}, | ||
"credentialSubject": { | ||
"type": "object", | ||
"required": [ | ||
"id" | ||
], | ||
"properties": { | ||
"id": { | ||
"title": "Credential Subject ID", | ||
"description": "The DID of the person holding the role", | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"title": { | ||
"title": "Title", | ||
"description": "The name of the role", | ||
"type": "string" | ||
}, | ||
"employmentType": { | ||
"title": "employmentType", | ||
"description": "Type of employment (e.g. full-time, part-time, contract, temporary, seasonal, internship).", | ||
"type": "string" | ||
}, | ||
"responsibilities": { | ||
"title": "responsibilities", | ||
"description": "Responsibilities associated with this role or Occupation.", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"credentialSchema": { | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"type" | ||
], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"@context": { | ||
"w3ccred": "https://www.w3.org/2018/credentials#", | ||
"schema-id": "https://beta.api.schemas.serto.id/v1/public/organization/1.0/ld-context.json#", | ||
"Organization": { | ||
"@id": "schema-id" | ||
}, | ||
"credentialStatus": { | ||
"@id": "schema-id:credentialStatus", | ||
"@context": { | ||
"id": { | ||
"@id": "schema-id:id", | ||
"@type": "http://schema.org/URL" | ||
}, | ||
"type": { | ||
"@id": "schema-id:type", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"revocationListIndex": { | ||
"@id": "schema-id:revocationListIndex", | ||
"@type": "http://schema.org/Number" | ||
}, | ||
"revocationListCredential": { | ||
"@id": "schema-id:revocationListCredential", | ||
"@type": "http://schema.org/URL" | ||
} | ||
} | ||
}, | ||
"credentialSubject": { | ||
"@id": "w3ccred:credentialSubject", | ||
"@context": { | ||
"id": { | ||
"@id": "schema-id:id", | ||
"@type": "@id" | ||
}, | ||
"name": { | ||
"@id": "schema-id:name", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"legalName": { | ||
"@id": "schema-id:legalName", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"iso6523Code": { | ||
"@id": "schema-id:iso6523Code", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"isicV4": { | ||
"@id": "schema-id:isicV4", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"slogan": { | ||
"@id": "schema-id:slogan", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"logo": { | ||
"@id": "schema-id:logo", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"keywords": { | ||
"@id": "schema-id:keywords", | ||
"@type": "http://schema.org/Text" | ||
}, | ||
"areaServed": { | ||
"@id": "schema-id:areaServed", | ||
"@type": "http://schema.org/Text" | ||
} | ||
} | ||
}, | ||
"@version": 1.1 | ||
} | ||
} |
Oops, something went wrong.