19442jsonSchema.json 8.69 KB
Newer Older
Laurent Velez's avatar
Laurent Velez committed
{
     "$schema": "http://json-schema.org/draft-04/schema#",
     "definitions": {

    "InputDocumentsType": {
	"type": "object",
	"properties": {
		"doc": {
			"type": "array",
			"items": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-DocumentType"
			}
		},
		"transformed": {
			"type": "array",
			"items": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-TransformedDataType"
			}
		},
		"docHash": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/DocumentHashType"
			}
		}
	}
    },

    "DocumentHashType": {
	"type": "object",
	"allOf": [
		{"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-DocumentHashType"}
	],
	"properties": {
		"pAdESSFieldName": {"type": "string"}
	}
    },

	"OptionalInputsVerifyType": {
		"type": "object",
		"allOf": [
			{"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-OptionalOutputsVerifyType"}
		],
		"properties": {
			"processSigs": {
				"$ref": "#/definitions/SigsRefsType"
			},
			"useSigValPol":{
				"$ref":"#/definitions/SigValPolicyType "
			},
			"returnValReport": {
				"$ref": "#/definitions/ReturnValReportType"
			},
			"proofsOfExist": {
				"$ref": "#/definitions/ProofsOfExistenceType"
			},
			"etsiReturnAugmentedSig": {
				"level": "string",
				"format" : "uri"
			},
			"tstkQualityLevel": {
				"type": "string",
				"format": "uri"
			}
		}
	},

	"NsPrefixMayppingType": {
		"type": "object",
		"properties": {
			"NsURI": {
				"type": "string",
				"format": "uri"
			},
			"NsPrefix": {"type": "string"}
		},
		"required": ["NsURI"]
	},
"XAdESSignaturePtrType": {
	"type": "object",
	"properties": {
		"nsPrefixMapping": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/NsPrefixMayppingType"
			}
		},
		"whichDoc": {"type": "string"},
		"xpath": {"type": "string"},
		"schemaRefs": {"type": "string"}
	}},
"SigsRefsType": {
	"type": "object",
	"properties": {
		"digRefs": {
			"type": "object",
			"properties": {
				"digVals": {
					"type": "array",
					"items": {
					"type": "string"
					}
				}, 
				"digAlg": {
					"type": "string"
				},
				"canAlg": {
					"type": "string"
				}
			}
			"required": ["digVals", "digAlg"]
		},
		"padesFieldNames": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"xadesSigPtrs": {
			"type": "array",
			"items": {
				"$ref": "#definitions/XAdESSignaturePtrType"
			}
		}
	}},

		"SigValPolicyType": {
			"type": "object",
			"properties": {
				"sigValPolID": {
					"type": "string"
				},
				"sigValPolLocs": {
					"type": "array",
					"items": {
						"type": "string"
					}
				}
			}
		}, 

	"ReturnValReportType": {
		"type": "object",
		"properties": {
			"asSpecifiedBy":{
				"type": "string",
				"format": "uri"
			},
			"signIt":{"type": "boolean"}
	},

	"ProofsOfExistenceType": {
		"type": "array",
		"items": {
			"type": "object",
			"properties": {
				"time": {
					"type": "string"
				},
				"sigRef": {
					"type": "object",
					"$ref": "#/definitions/SignatureReferenceType"
				}
			}
		}
	},

	"SignatureReferenceType": {
		"type": "object",
		"properties": {
			"digRef": {
				"type": "object",
				"properties": {
					"digVal": {
						"type": "string",
						"contentEncoding": "base64"
					}, 
					"digAlg": {
						"type": "string",
						"format": "uri"
					},
					"canAlg": {
						"type": "string",
						"format": "uri"
					}
				}
				"required": ["digVal", "digAlg"]
			},
			"padesFieldName": {
				"type": "string"
			},
			"xadesSigPtr": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SignaturePtrType"
			}
		}
	},
"OptionalOutputsVerifyType": {
	"type":"object",
	"allOf": [
		{"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-OptionalOutputsVerifyType"}
	],
	{"properties": 
		"validationReport": {
			"$ref": "#/definitions/ValReportContainerType"
		},
		"resForEachSignature": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/ResultsForOneSignatureType"
			}
		},
		"appliedSigValPolicy": {
			"type": "string",
			"format": "uri"
		},
		"availableSigValPols":{
			"type": "array",
			"items": {
				"type": "string",
				"format": "uri"
			}
		}
	}},
"ResultsForOneSignatureType":{
	"type": "object",
	"properties": {
 		"result": {
			"$ref": "<DSSXBASESCHEMAFILELOCATION>#/definitions/dsb-ResultType"
		},
		"sigRef" : {
 			"$ref": "#/definitions/SignatureReferenceType"
		},
		"signerIdentity" : {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/saml2rw-NameIDType"
		},
		"signingTimeInfo": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SigningTimeInfoType"
		},
		"validationReport": {
			"$ref": "#/definitions/ValReportContainerType"
		},
		"manifestValResults":{
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-VerifyManifestResultsType"
		},
		"transformed":{
			"type": "array",
			"items": {"$ref:" "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-TransformedDocumentType"}
		},
	"augmentSigResult": {
			"$ref": "#definitions/AugmentSigResultType"
		},
	},
	"required": ["result"]},
"ValReportContainerType":{
	"type": "object",
	"properties": {
		"etsiTS11910202XMLReport":{
			"type": "string",
			"contentEncoding": "base64"
		},
		"other":{
			"type": "object",
			"properties": {
				"content": {
					"type": "string",
					"contentEncoding": "base64"
				},
				"specId": {"type": "string"},
				"encoding": {"type": "string"}
			}
		},
		"isSigned": {"type": "boolean"}
	}},
"AugmentSigResultType": {
	"type": "object",
	"properties": {
		"result": {
 			"$ref": "<DSSXBASESCHEMAFILELOCATION>#/definitions/dsb-ResultType"
		},
		"augmentedSig": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-AugmentedSignatureType"
		},
		"sigRefInReq": {
			"$ref": "#/definitions/SignatureReferenceType"
		}
	},
	"required": ["result", "sigRef"]}


     },
"VerifyRequestType": {
	"type": "object",
	"properties": {
		"profile": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"reqID": {
			"type": "string"
		},
		"inDocs": {
			"$ref": "#/definitions/InputDocumentsType"
		},
		"optInp": {
			"$ref": "#/definitions/OptionalInputsVerifyType"
		},
		"sigObj": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SignatureObjectType"
		}
	}},
"VerifyResponseType": {
	"type": "object",
	"properties": {
		"result": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dsb-ResultType"
		},
		"profile": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"reqID": {
			"type": "string"
		},
		"respID": {
			"type": "string"
		},
		"optOutp": {
			"$ref": "#/definitions/OptionalOutputsVerifyType"
		}
	}},
"AugmentRequest": {
	"type": "object",
	"properties": {
		"inDocs": {"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-InputDocumentsType"},
		"reqID": {
			"type": "string"
		},
		"profile": {
			"type": "array",
			"items": {
				"type": "string",
				"format": "uri"
			}
		},
		"claimedIdentity": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-ClaimedIdentityType"
		},
		"returnAugmentedSig": {
			"type": "string"
			"format": "uri"
		},
		"processSigs": {
			"$ref": "#/definitions/SigsRefsType"
		},
		"sigObj": {
			"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-SignatureObjectType"
		},
		"addKeyInfo": {
			"type": "array",
			"items": {"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-AdditionalKeyInfoType"}
		},
		"tstksQualityLevel": {
			"type": "string"
			"format": "uri"
		}
	},
	"required": ["profile","returnAugmentedSig"]},
"AugmentResponseType": {
	"type": "object",
	"properties": {
		"result": {
			"$ref": "<DSSXBASESCHEMAFILELOCATION>#/definitions/dsb-ResultType"
		},
		"reqID": {
			"type": "string"
		},
		"profile": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"augmentSigsResults": {
			"type": "array",
			"items": {
				"$ref": "#/definitions/AugmentSigResultType"
			}
		}
		"docsWithSignatures": {
			"type": "array",
			"items": {
				"$ref": "http://docs.oasis-open.org/dss-x/dss-core/v2.0/csprd01/schema/schema.json#definitions/dss2-DocumentWithSignatureType"
			}
		}
	},
	"required": ["result", "profile"]}

}