Skip to content

Commit

Permalink
Merge pull request #969 from brentzundel/ag-schemas
Browse files Browse the repository at this point in the history
Food Facility Registration schema
  • Loading branch information
mkhraisha authored Sep 19, 2024
2 parents e83889f + 78c5cda commit 0cb0e7f
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/credentials-with-issuer-dependent-terms.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@
"type": "FSMACreatingCTECredential",
"count": 0
},
{
"type": "FoodFacilityRegistrationCredential",
"count": 2
}
{
"type": "ExampleCredential",
"count": 3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
$linkedData:
term: FoodFacilityRegistrationCredential

'@id': https://w3id.org/traceability#FoodFacilityRegistrationCredential

title: Food Facility Registration Credential
tags:
- Agriculture
description: >-
The FDA Food Facility Registration Number is a unique identifier assigned to
facilities that manufacture, process, pack, or hold food for consumption in
the United States.
type: object
properties:
'@context':
type: array
readOnly: true
const:
- https://www.w3.org/2018/credentials/v1
- https://w3id.org/traceability/v1
default:
- https://www.w3.org/2018/credentials/v1
- https://w3id.org/traceability/v1
items:
type: string
enum:
- https://www.w3.org/2018/credentials/v1
- https://w3id.org/traceability/v1
type:
type: array
readOnly: true
const:
- VerifiableCredential
- FoodFacilityRegistrationCredential
default:
- VerifiableCredential
- FoodFacilityRegistrationCredential

items:
type: string
enum:
- VerifiableCredential
- FoodFacilityRegistrationCredential
id:
type: string
format: uri
name:
type: string
description:
type: string
issuanceDate:
type: string
format: date-time
expirationDate:
type: string
format: date-time
issuer:
title: Qualified Food Facility Registration Issuer

description: Qualified Food Facility Registration Number issuer.
type: object
properties:
id:
title: Issuer's Identifier
description: Identifier of the issuing organization, typically a Decentralized Identifier (DID).
type: string
format: uri
name:
title: Name
description: Name of the issuing organization.
type: string
additionalProperties: false
required:
- id
credentialSchema:
type: object
properties:
id:
title: Id
description: The URL of the schema file to be used to validate the shape of the JSON object

type: string
format: uri
example: https://w3id.org/traceability/openapi/components/schemas/credentials/FoodFacilityRegistrationCredential.yml
default: https://w3id.org/traceability/openapi/components/schemas/credentials/FoodFacilityRegistrationCredential.yml
readOnly: true
type:
title: Type
description: The type of validation to be run against the defined schema.
const: OpenApiSpecificationValidator2022
credentialSubject:
title: Food Facility Registration
description: Food Facility Registration Number
type: object
properties:
id:
title: Identifier
description: Decentralized Identifier (DID)
type: string
number:
title: Food Facility Number
description: 11-digit FDA Food Facility Registration Number.
type: string
exemption:
title: Exemption
type: object
properties:
exempt:
title: Exempt
type: boolean
code:
title: Exemption Code
type: string
enum:
- A, Facility is out of business
- B, Facility is a private residence (21 CFR 1.227(b)(2))
- C, Facility is a restaurant (21 CFR 1.226(d); 1.227(b)(10))
- D, Facility is a retail food establishment (21 CFR 1.226(c); 1.227(b)(11))
- E, Facility is a non-processing fishing vessel (21 CFR 1.226(f)
- F, Facility is a non-bottled drinking water collection and distribution establishment (21 CFR 1.227(b)(2))
- H, Facility is a farm (21 CFR 1.227 and 21 CFR 1.226(b))
- K, Unable to determine the registration number of the manufacturer
- None
additionalProperties: false
additionalProperties: false
required:
- id
- number
- exemption
additionalProperties: false
required:
- '@context'
- type
- id
- issuanceDate
- issuer
- credentialSubject
- credentialSchema
example: |-
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/traceability/v1"
],
"id": "http://example.com/dd0c6f9a-5df6-40a3-bb34-863cd1fda606",
"credentialSchema": {
"type": "OpenApiSpecificationValidator2022",
"id": "https://w3id.org/traceability/openapi/components/schemas/credentials/FoodFacilityRegistrationCredential.yml"
},
"type": [
"VerifiableCredential",
"FoodFacilityRegistrationCredential"
],
"issuer": {
"id": "did:web:qualified-organization.example.com",
"name": "US-FDA"
},
"issuanceDate": "2022-11-01T10:58:45-04:00",
"credentialSubject": {
"id": "did:web:organization.example.com",
"number": "12345678901",
"exemption": {
"exempt": false,
"code": "None"
}
}
}

0 comments on commit 0cb0e7f

Please sign in to comment.