validate_presentation_definition
Validate presentation definitions for compliance with DIF PEX v2.0 specifications. Perform checks for adherence to best practices, identify issues, and provide actionable improvement recommendations.
Instructions
Validate presentation definitions against DIF PEX v2.0 specification. Performs comprehensive compliance checking, best practices validation, and provides improvement recommendations.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
checkSchemas | No | Whether to validate referenced credential schemas | |
presentationDefinition | Yes | DIF PEX Presentation Definition | |
strict | No | Whether to perform strict DIF PEX v2.0 validation |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {},
"properties": {
"checkSchemas": {
"default": false,
"description": "Whether to validate referenced credential schemas",
"type": "boolean"
},
"presentationDefinition": {
"additionalProperties": false,
"description": "DIF PEX Presentation Definition",
"properties": {
"id": {
"minLength": 1,
"type": "string"
},
"input_descriptors": {
"items": {
"additionalProperties": false,
"description": "DIF PEX Input Descriptor",
"properties": {
"constraints": {
"additionalProperties": false,
"description": "DIF PEX Constraints",
"properties": {
"fields": {
"items": {
"additionalProperties": false,
"description": "DIF PEX Field constraint",
"properties": {
"filter": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"name": {
"type": "string"
},
"path": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"predicate": {
"enum": [
"required",
"preferred"
],
"type": "string"
},
"purpose": {
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
},
"type": "array"
},
"limit_disclosure": {
"enum": [
"required",
"preferred"
],
"type": "string"
},
"statuses": {
"additionalProperties": false,
"properties": {
"active": {
"additionalProperties": false,
"properties": {
"directive": {
"enum": [
"required",
"allowed",
"disallowed"
],
"type": "string"
}
},
"required": [
"directive"
],
"type": "object"
},
"revoked": {
"additionalProperties": false,
"properties": {
"directive": {
"enum": [
"required",
"allowed",
"disallowed"
],
"type": "string"
}
},
"required": [
"directive"
],
"type": "object"
},
"suspended": {
"additionalProperties": false,
"properties": {
"directive": {
"enum": [
"required",
"allowed",
"disallowed"
],
"type": "string"
}
},
"required": [
"directive"
],
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"id": {
"minLength": 1,
"type": "string"
},
"name": {
"type": "string"
},
"purpose": {
"type": "string"
},
"schema": {
"items": {
"additionalProperties": false,
"properties": {
"required": {
"type": "boolean"
},
"uri": {
"format": "uri",
"type": "string"
}
},
"required": [
"uri"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"name": {
"type": "string"
},
"purpose": {
"type": "string"
},
"submission_requirements": {
"items": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"type": "array"
}
},
"required": [
"id",
"input_descriptors"
],
"type": "object"
},
"strict": {
"default": true,
"description": "Whether to perform strict DIF PEX v2.0 validation",
"type": "boolean"
}
},
"required": [
"presentationDefinition"
],
"type": "object"
}