{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/france-identite/json-schema/france-identite-request-template-input-schema.json",
  "title": "RequestTemplateInput",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/france-identite-intermediaries-openapi.yml#/components/schemas/RequestTemplateInput",
  "type": "object",
  "required": [
    "name",
    "purpose",
    "credentials"
  ],
  "properties": {
    "templateId": {
      "type": "string",
      "description": "Present to publish a new version of this request."
    },
    "name": {
      "type": "string",
      "maxLength": 120,
      "description": "As clients see it."
    },
    "purpose": {
      "$ref": "#/$defs/MultiLangText"
    },
    "credentials": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/CredentialQuery"
      }
    }
  },
  "$defs": {
    "CredentialQuery": {
      "type": "object",
      "required": [
        "format",
        "meta",
        "claims"
      ],
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "mso_mdoc",
            "dc+sd-jwt"
          ]
        },
        "meta": {
          "type": "object",
          "description": "`doctype_value` for an mdoc, `vct` for an SD-JWT.",
          "properties": {
            "doctype_value": {
              "type": "string"
            },
            "vct": {
              "type": "string"
            }
          }
        },
        "claims": {
          "type": "array",
          "minItems": 1,
          "maxItems": 100,
          "items": {
            "type": "object",
            "required": [
              "path"
            ],
            "properties": {
              "path": {
                "type": "array",
                "minItems": 1,
                "maxItems": 10,
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "MultiLangText": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "lang",
          "content"
        ],
        "properties": {
          "lang": {
            "type": "string"
          },
          "content": {
            "type": "string",
            "maxLength": 1000
          }
        }
      }
    }
  }
}