Skip to content

Commit

Permalink
Merge branch 'main' into creds-from-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhraisha authored Sep 19, 2024
2 parents d98e6cc + 09dd973 commit b692436
Show file tree
Hide file tree
Showing 4 changed files with 542 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docs/credentials-with-issuer-dependent-terms.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@
{
"type": "USDAPPQ203ForeignSiteInspectionCredential",
"count": 0
}
},
{
"type": "USDAPermitToImportCredential",
"count": 6
},
{
"type": "ThingCredential",
"count": 0
Expand Down Expand Up @@ -215,6 +219,10 @@
"type": "FSMACreatingCTECredential",
"count": 0
},
{
"type": "FoodFacilityRegistrationCredential",
"count": 2
}
{
"type": "ExampleCredential",
"count": 3
Expand Down
4 changes: 2 additions & 2 deletions docs/openapi/components/schemas/common/ConsignmentItem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ properties:
$ref: ./QuantitativeValue.yml
$linkedData:
term: netWeight
'@id': https://schema.org/weight
'@id': https://vocabulary.uncefact.org/netWeightMeasure
grossWeight:
title: Gross Weight
description: Gross weight of the product.
$ref: ./QuantitativeValue.yml
$linkedData:
term: grossWeight
'@id': https://schema.org/weight
'@id': https://vocabulary.uncefact.org/grossWeightMeasure
grossVolume:
title: Gross Volume
description: A measure of the gross volume, normally calculated by multiplying the maximum length, width and height.
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"
}
}
}
Loading

0 comments on commit b692436

Please sign in to comment.