nuts-foundation/nuts-node

View on GitHub
vcr/pe/schema/v2/input-descriptor.json

Summary

Maintainability
Test Coverage
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Input Descriptor",
  "definitions": {
    "status_directive": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "directive": {
          "type": "string",
          "enum": [
            "required",
            "allowed",
            "disallowed"
          ]
        },
        "type": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      }
    },
    "field": {
      "type": "object",
      "oneOf": [
        {
          "properties": {
            "id": {
              "type": "string"
            },
            "optional": {
              "type": "boolean"
            },
            "path": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "purpose": {
              "type": "string"
            },
            "intent_to_retain": {
              "type": "boolean"
            },
            "name": {
              "type": "string"
            },
            "filter": {
              "$ref": "http://json-schema.org/draft-07/schema#"
            }
          },
          "required": [
            "path"
          ],
          "additionalProperties": false
        },
        {
          "properties": {
            "id": {
              "type": "string"
            },
            "optional": {
              "type": "boolean"
            },
            "path": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "purpose": {
              "type": "string"
            },
            "intent_to_retain": {
              "type": "boolean"
            },
            "filter": {
              "$ref": "http://json-schema.org/draft-07/schema#"
            },
            "name": {
              "type": "string"
            },
            "predicate": {
              "type": "string",
              "enum": [
                "required",
                "preferred"
              ]
            }
          },
          "required": [
            "path",
            "filter",
            "predicate"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    },
    "group": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "constraints": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "limit_disclosure": {
          "type": "string",
          "enum": [
            "required",
            "preferred"
          ]
        },
        "statuses": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "active": {
              "$ref": "#/definitions/status_directive"
            },
            "suspended": {
              "$ref": "#/definitions/status_directive"
            },
            "revoked": {
              "$ref": "#/definitions/status_directive"
            }
          }
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/field"
          }
        },
        "subject_is_issuer": {
          "type": "string",
          "enum": [
            "required",
            "preferred"
          ]
        },
        "is_holder": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "field_id": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "directive": {
                "type": "string",
                "enum": [
                  "required",
                  "preferred"
                ]
              }
            },
            "required": [
              "field_id",
              "directive"
            ]
          }
        },
        "same_subject": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "field_id": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "directive": {
                "type": "string",
                "enum": [
                  "required",
                  "preferred"
                ]
              }
            },
            "required": [
              "field_id",
              "directive"
            ]
          }
        }
      }
    }
  },
  "required": [
    "id"
  ]
}