Skip to main content

Extensions

info

Please note that this content is under development and is not ready for implementation. This status message will be updated as content development progresses.

The United Nations Transparency Protocol (UNTP) allows for extensions to its core data model. The UNTP Semantic Interoperability Test Suite can validate these extensions, ensuring they remain compliant with the core UNTP data model. This enables implementors to prototype and test custom credential types or additional properties while maintaining conformance with the UNTP protocol.

Adding a Custom Schema

  1. Create a new directory for your schema:
packages/
└── untp-test-suite/
└── src/
└── schemas/
└── myCustomCredential/
└── v0.0.1/
└── schema.json
  1. Define your schema in schema.json, extending the core UNTP model as needed.

  2. Update credentials.json to include your new credential type:

{
"credentials": [
// ... existing credentials
{
"type": "myCustomCredential",
"version": "v0.0.1",
"dataPath": "credentials/myCustomCredential-sample.json"
}
]
}
  1. Create a sample credential file matching your schema.

  2. Run the test suite to validate your extended credential:

yarn run untp test

By following these steps, you can prototype extensions to the UNTP data model while ensuring compatibility with the core specification.

Remember to thoroughly test your extensions and consider submitting valuable additions to the UNTP community for potential inclusion in future versions of the protocol or submit your extension to the extensions register.