swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.31k stars 8.91k forks source link

Swagger UI freezes trying to proccess the following swagger.json #2195

Closed jtorres-viavansi closed 8 years ago

jtorres-viavansi commented 8 years ago
{
     "swagger": "2.0",
     "info": {
          "version": "1.0.2"
     },
     "host": "localhost:8080",
     "basePath": "/rest",
     "tags": [{
          "name": "template"
     }, {
          "name": "test"
     }, {
          "name": "client"
     }, {
          "name": "verify"
     }, {
          "name": "server"
     }],
     "schemes": ["http"],
     "paths": {
          "/client/signature/finalize": {
               "post": {
                    "tags": ["client"],
                    "summary": "This method finalizes the client signature operation",
                    "description": "This method finalizes the client signature operation",
                    "operationId": "finalizeSignature",
                    "consumes": ["application/json"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "FinalizeSignatureRequestDTO containing List of RawSignatureDataDTO of all signatures you want to finalize. Each RawSignatureDataDTO contains the needed information for his own signature operation.",
                         "required": true,
                         "schema": {
                              "$ref": "#/definitions/FinalizeSignatureRequestDTO"
                         }
                    }],
                    "responses": {
                         "200": {
                              "description": "Object with a list of all signatures operation requested to end",
                              "schema": {
                                   "type": "array",
                                   "items": {
                                        "$ref": "#/definitions/SignatureResultDTO"
                                   }
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/client/signature/init": {
               "post": {
                    "tags": ["client"],
                    "summary": "Starts process for a client signature",
                    "description": "Starts process for a client signature. ",
                    "operationId": "initSignature",
                    "consumes": ["multipart/form-data"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "Configuration to apply in the signature process",
                         "required": true,
                         "schema": {
                              "$ref": "#/definitions/SignatureConfigurationDTO"
                         }
                    }, {
                         "name": "document",
                         "in": "formData",
                         "description": "Document to Sign. This method does not closes the input stream",
                         "required": true,
                         "type": "file"
                    }],
                    "responses": {
                         "200": {
                              "description": "Object with code for this operation as content",
                              "schema": {
                                   "type": "string"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/client/signature/init/template": {
               "post": {
                    "tags": ["client"],
                    "summary": "Starts process for a client signature",
                    "description": "Starts process for a client signature. ",
                    "operationId": "initSignature",
                    "consumes": ["multipart/form-data"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "Code for the template to use",
                         "required": true,
                         "schema": {
                              "type": "string"
                         }
                    }, {
                         "name": "document",
                         "in": "formData",
                         "description": "Document to Sign. This method does not closes the input stream",
                         "required": true,
                         "type": "file"
                    }],
                    "responses": {
                         "200": {
                              "description": "Object with code for this operation as content",
                              "schema": {
                                   "$ref": "#/definitions/RestResponseDTO"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/client/signature/resume": {
               "post": {
                    "tags": ["client"],
                    "summary": "Method to continue a signature operation with a known signature code.",
                    "description": "Method to continue a signature operation with a known signature code.",
                    "operationId": "resumeSignature",
                    "consumes": ["application/json"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "ResumeSignatureRequestDTO containing signature code obtained from a previous invocation of initSignature(...) method and certificate to use to sign",
                         "required": true,
                         "schema": {
                              "$ref": "#/definitions/ResumeSignatureRequestDTO"
                         }
                    }],
                    "responses": {
                         "200": {
                              "description": "Object with SignatureOperationDTO as content, this object holds information about the signature operation",
                              "schema": {
                                   "$ref": "#/definitions/SignatureOperationDTO"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/server/sign": {
               "post": {
                    "tags": ["server"],
                    "summary": "Method for signing a document in server using an alias and pass",
                    "description": "Method for signing a document in server using an alias and pass",
                    "operationId": "signByServer",
                    "consumes": ["multipart/form-data"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "Configuration to apply in the signature process",
                         "required": true,
                         "schema": {
                              "$ref": "#/definitions/SignatureConfigurationDTO"
                         }
                    }, {
                         "name": "document",
                         "in": "formData",
                         "description": "Document to sign. This method does not close the inputStream.",
                         "required": true,
                         "type": "file"
                    }],
                    "responses": {
                         "200": {
                              "description": "SignatureResultDTO with the bytes of the signed document, a code for the signature and the mimeType",
                              "schema": {
                                   "$ref": "#/definitions/SignatureResultDTO"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/server/sign/template": {
               "post": {
                    "tags": ["server"],
                    "summary": "Method for signing a document in server using an alias and pass",
                    "description": "Method for signing a document in server using an alias and pass",
                    "operationId": "signByServerWithTemplate",
                    "consumes": ["multipart/form-data"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "Code for the signature template existing in the platform",
                         "required": true,
                         "schema": {
                              "type": "string"
                         }
                    }, {
                         "name": "document",
                         "in": "formData",
                         "description": "Document to sign. This method does not close the inputStream.",
                         "required": true,
                         "type": "file"
                    }],
                    "responses": {
                         "200": {
                              "description": "SignatureResultDTO with the bytes of the signed document, a code for the signature and the mimeType",
                              "schema": {
                                   "$ref": "#/definitions/SignatureResultDTO"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/template/create": {
               "post": {
                    "tags": ["template"],
                    "summary": "Creates a new SignatureTemplateDTO",
                    "description": "Creates a new SignatureTemplateDTO",
                    "operationId": "createSignTemplate",
                    "consumes": ["application/json"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "SignatureTemplateDTO to save",
                         "required": true,
                         "schema": {
                              "$ref": "#/definitions/SignatureTemplateDTO"
                         }
                    }],
                    "responses": {
                         "200": {
                              "description": "RestResponseDTO<SignatureTemplateResultDTO> with the response of service",
                              "schema": {
                                   "$ref": "#/definitions/SignatureTemplateResultDTO"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/template/delete/{code}": {
               "delete": {
                    "tags": ["template"],
                    "summary": "Deletes the SignatureTemplateDTO associated to the passed code",
                    "description": "Deletes the SignatureTemplateDTO associated to the passed code",
                    "operationId": "deleteSignTemplate",
                    "consumes": ["application/json"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "name": "code",
                         "in": "path",
                         "description": "Signature template code to delete",
                         "required": true,
                         "type": "string"
                    }],
                    "responses": {
                         "200": {
                              "description": "RestResponseDTO<SignatureTemplateResultDTO> with the response of service",
                              "schema": {
                                   "$ref": "#/definitions/SignatureTemplateResultDTO"
                              }
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          },
          "/test/get": {
               "get": {
                    "tags": ["test"],
                    "summary": "Testing GET service",
                    "description": "Testing REST service",
                    "operationId": "testGet",
                    "produces": ["application/json"],
                    "parameters": [],
                    "responses": {
                         "200": {
                              "description": "Service Ok"
                         }
                    },
                    "security": [{
                         "basic": []
                    }]
               }
          },
          "/test/post": {
               "post": {
                    "tags": ["test"],
                    "summary": "Testing POST service",
                    "description": "Testing REST service",
                    "operationId": "testPost",
                    "consumes": ["application/json"],
                    "produces": ["application/json"],
                    "parameters": [],
                    "responses": {
                         "200": {
                              "description": "Service Ok"
                         }
                    },
                    "security": [{
                         "basic": []
                    }]
               }
          },
          "/verify/code": {
               "post": {
                    "tags": ["verify"],
                    "operationId": "verifySignatureCode",
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "required": false,
                         "schema": {
                              "$ref": "#/definitions/VerificationRequestDTO"
                         }
                    }],
                    "responses": {
                         "200": {
                              "description": "successful operation",
                              "schema": {
                                   "$ref": "#/definitions/RestResponseDTOVerifierDocumentDTO"
                              },
                              "headers": {}
                         }
                    }
               }
          },
          "/verify/document": {
               "post": {
                    "tags": ["verify"],
                    "summary": "Verifies the signature in the passed document",
                    "description": "Verifies the signature in the passed document",
                    "operationId": "verifyDocument",
                    "consumes": ["multipart/form-data"],
                    "produces": ["application/json"],
                    "parameters": [{
                         "in": "body",
                         "name": "body",
                         "description": "param 1",
                         "required": true,
                         "schema": {
                              "$ref": "#/definitions/VerificationRequestDTO"
                         }
                    }, {
                         "name": "originalDocument",
                         "in": "formData",
                         "description": "param 2",
                         "required": true,
                         "type": "file"
                    }, {
                         "name": "signedDocument",
                         "in": "formData",
                         "description": "param 3",
                         "required": true,
                         "type": "file"
                    }],
                    "responses": {
                         "200": {
                              "description": "RestResponseDTO<VerifierDocumentDTO> with verification result"
                         },
                         "401": {
                              "description": "Unauthorized"
                         },
                         "500": {
                              "description": "Internal server error"
                         },
                         "403": {
                              "description": "Forbidden"
                         }
                    }
               }
          }
     },
     "definitions": {
          "ConfigCadesDTO": {
               "type": "object"
          },
          "Serializable": {
               "type": "object"
          },
          "PrivateKey": {
               "type": "object",
               "properties": {
                    "format": {
                         "type": "string"
                    },
                    "algorithm": {
                         "type": "string"
                    },
                    "encoded": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "destroyed": {
                         "type": "boolean",
                         "default": false
                    }
               }
          },
          "VerifierCrlDTO": {
               "type": "object",
               "properties": {
                    "type": {
                         "type": "string"
                    },
                    "version": {
                         "type": "string"
                    },
                    "issuer": {
                         "type": "string"
                    },
                    "signingAlgorithm": {
                         "type": "string"
                    },
                    "signingOID": {
                         "type": "string"
                    },
                    "nextUpdate": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "thisUpdate": {
                         "type": "string",
                         "format": "date-time"
                    }
               }
          },
          "XMLEvidenceDTO": {
               "type": "object",
               "properties": {
                    "locationData": {
                         "type": "string"
                    },
                    "locationInfo": {
                         "type": "string"
                    },
                    "longitude": {
                         "type": "string"
                    },
                    "latitude": {
                         "type": "string"
                    },
                    "pressureMaxValue": {
                         "type": "string"
                    },
                    "pressureMinValue": {
                         "type": "string"
                    },
                    "pressureStylusInfo": {
                         "type": "string"
                    },
                    "deviceInfo": {
                         "$ref": "#/definitions/XMLDeviceDTO"
                    },
                    "hashImage": {
                         "type": "string"
                    },
                    "hashPdf": {
                         "$ref": "#/definitions/XMLPdfPageHashes"
                    },
                    "cipherAlgorithm": {
                         "type": "string"
                    },
                    "encryptedAesSessionKey": {
                         "type": "string"
                    },
                    "trustedThirdParty": {
                         "type": "string"
                    },
                    "cipheredData": {
                         "type": "string"
                    },
                    "evidenceType": {
                         "type": "string"
                    },
                    "evidenceVersion": {
                         "type": "string"
                    },
                    "evidenceTimestamp": {
                         "type": "integer",
                         "format": "int64"
                    }
               }
          },
          "SignatureCodeDTO": {
               "type": "object",
               "properties": {
                    "custodyPathV1": {
                         "type": "string"
                    },
                    "config": {
                         "$ref": "#/definitions/ConfigSignatureDTO"
                    },
                    "valid": {
                         "type": "boolean",
                         "default": false
                    },
                    "custodyPath": {
                         "type": "string"
                    },
                    "type": {
                         "type": "string"
                    },
                    "packaging": {
                         "type": "string",
                         "enum": ["ENVELOPED", "ENVELOPING", "DETACHED"]
                    },
                    "date": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "cades": {
                         "type": "boolean",
                         "default": false
                    },
                    "xades": {
                         "type": "boolean",
                         "default": false
                    },
                    "pades": {
                         "type": "boolean",
                         "default": false
                    }
               }
          },
          "VerifierTimeStampDTO": {
               "type": "object",
               "properties": {
                    "type": {
                         "type": "string"
                    },
                    "indication": {
                         "type": "string"
                    },
                    "subIndication": {
                         "type": "string"
                    },
                    "digestAlgo": {
                         "type": "string"
                    },
                    "productionTime": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "certificate": {
                         "$ref": "#/definitions/VerifierCertificateDTO"
                    }
               }
          },
          "VerifierDTO": {
               "type": "object",
               "properties": {
                    "validRevocationSource": {
                         "type": "boolean",
                         "default": false
                    },
                    "method": {
                         "type": "string"
                    },
                    "ocspResponse": {
                         "$ref": "#/definitions/VerifierOcspDTO"
                    },
                    "crlResponse": {
                         "$ref": "#/definitions/VerifierCrlDTO"
                    },
                    "revocationDate": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "revocationReason": {
                         "type": "string"
                    },
                    "url": {
                         "type": "string"
                    },
                    "info": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    }
               }
          },
          "XMLPdfPageHash": {
               "type": "object",
               "properties": {
                    "pageNum": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "value": {
                         "type": "string"
                    }
               }
          },
          "ConfigPolicyDTO": {
               "type": "object",
               "properties": {
                    "id": {
                         "type": "string"
                    },
                    "description": {
                         "type": "string"
                    },
                    "digestAlgorithm": {
                         "type": "string",
                         "enum": ["SHA1", "SHA224", "SHA256", "SHA384", "SHA512", "RIPEMD160", "MD2", "MD5"]
                    },
                    "digestValue": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "contentHintsDescription": {
                         "type": "string"
                    },
                    "contentHintsType": {
                         "type": "string"
                    }
               }
          },
          "VerificationRequestDTO": {
               "type": "object",
               "properties": {
                    "signatureCode": {
                         "type": "string"
                    },
                    "revocationRequestType": {
                         "type": "string",
                         "enum": ["DEFAULT", "ONLINE", "ONLINE_WITH_CACHE", "CRL", "CRL_CACHE", "OCSP", "OFFLINE"]
                    }
               }
          },
          "SignatureResultDTO": {
               "type": "object",
               "properties": {
                    "bytes": {
                         "type": "array",
                         "description": "Signed document",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "signatureCode": {
                         "type": "string",
                         "description": "Signature code"
                    },
                    "mimeType": {
                         "type": "string",
                         "description": "MimeType of signed document",
                         "enum": ["BINARY", "XML", "PDF", "PKCS7", "ASICS", "ASICE", "TEXT"]
                    }
               },
               "description": "Object with result of signature operation"
          },
          "RawSignatureDataDTO": {
               "type": "object",
               "properties": {
                    "signatureCode": {
                         "type": "string"
                    },
                    "certificateB64": {
                         "type": "string"
                    },
                    "hashDocument": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "signatureValue": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    }
               }
          },
          "VerifierEvidenceDTO": {
               "type": "object",
               "properties": {
                    "validationStatus": {
                         "type": "string",
                         "enum": ["VALID", "UNKNOWN", "INVALID"]
                    },
                    "evidenceInfo": {
                         "$ref": "#/definitions/XMLEvidenceDTO"
                    },
                    "evidenceName": {
                         "type": "string"
                    },
                    "signatureInfo": {
                         "$ref": "#/definitions/VerifierSignatureDTO"
                    },
                    "validationMessages": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    },
                    "validationErrors": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    }
               }
          },
          "VerifierSignatureDTO": {
               "type": "object",
               "properties": {
                    "format": {
                         "type": "string"
                    },
                    "encryptionAlgorithm": {
                         "type": "string"
                    },
                    "digestAlgorithm": {
                         "type": "string"
                    },
                    "level": {
                         "type": "string"
                    },
                    "signingTime": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "validationStatus": {
                         "type": "string",
                         "enum": ["VALID", "UNKNOWN", "INVALID"]
                    },
                    "indication": {
                         "type": "string"
                    },
                    "subIndication": {
                         "type": "string"
                    },
                    "policyId": {
                         "type": "string"
                    },
                    "errorMessage": {
                         "type": "string"
                    },
                    "signedBy": {
                         "type": "string"
                    },
                    "certificate": {
                         "$ref": "#/definitions/VerifierCertificateDTO"
                    },
                    "timeStamps": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/VerifierTimeStampDTO"
                         }
                    }
               }
          },
          "VerifierOidDTO": {
               "type": "object",
               "properties": {
                    "oid": {
                         "type": "string"
                    },
                    "description": {
                         "type": "string"
                    },
                    "values": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    },
                    "childOids": {
                         "type": "array"
                    },
                    "objectIdentifier": {
                         "type": "boolean",
                         "default": false
                    }
               }
          },
          "ConfigPadesDTO": {
               "type": "object",
               "properties": {
                    "stamper": {
                         "$ref": "#/definitions/StamperDTO"
                    }
               }
          },
          "ConfigXadesDTO": {
               "type": "object",
               "properties": {
                    "signedInfoCanonicalizationMethod": {
                         "type": "string"
                    },
                    "signedPropertiesCanonicalizationMethod": {
                         "type": "string"
                    },
                    "toCounterSignSignatureId": {
                         "type": "string"
                    },
                    "toCounterSignSignatureValueId": {
                         "type": "string"
                    },
                    "trustAnchorBPPolicy": {
                         "type": "boolean",
                         "default": false
                    },
                    "claimedSignerRoles": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    },
                    "commitmentTypeIndication": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    },
                    "transformAlgorithms": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    },
                    "xpathLocationString": {
                         "type": "string"
                    }
               }
          },
          "StamperDTO": {
               "type": "object",
               "properties": {
                    "type": {
                         "type": "string",
                         "enum": ["PDF417", "QR_BARCODE128", "QR", "BARCODE128", "IMAGE", "TEXT"]
                    },
                    "rotation": {
                         "type": "string",
                         "enum": ["ROTATE_90", "ROTATE_270"]
                    },
                    "width": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "height": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "getxAxis": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "getyAxis": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "page": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "csvPath": {
                         "type": "string"
                    },
                    "textLine1": {
                         "type": "string"
                    },
                    "textLine2": {
                         "type": "string"
                    },
                    "textLine3": {
                         "type": "string"
                    },
                    "image": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "logo": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "signingDate": {
                         "type": "string",
                         "format": "date-time"
                    }
               }
          },
          "RestResponseDTO": {
               "type": "object",
               "properties": {
                    "content": {
                         "description": "Content (class that extends from Serializable)",
                         "$ref": "#/definitions/Serializable"
                    },
                    "httpStatusCode": {
                         "type": "integer",
                         "format": "int32",
                         "description": "Integer with HttpStatusCode"
                    },
                    "errorCode": {
                         "type": "string",
                         "description": "String with error code"
                    },
                    "message": {
                         "type": "string",
                         "description": "String with operation message"
                    }
               },
               "description": "Response Object"
          },
          "PublicKey": {
               "type": "object",
               "properties": {
                    "format": {
                         "type": "string"
                    },
                    "algorithm": {
                         "type": "string"
                    },
                    "encoded": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    }
               }
          },
          "SignatureTemplateDTO": {
               "type": "object",
               "properties": {
                    "code": {
                         "type": "string"
                    },
                    "signatureConfiguration": {
                         "$ref": "#/definitions/SignatureConfigurationDTO"
                    }
               }
          },
          "XMLDeviceDTO": {
               "type": "object",
               "properties": {
                    "manufacturer": {
                         "type": "string"
                    },
                    "model": {
                         "type": "string"
                    },
                    "osVersion": {
                         "type": "string"
                    }
               }
          },
          "ResumeSignatureRequestDTO": {
               "type": "object",
               "properties": {
                    "operationCode": {
                         "type": "string"
                    },
                    "certificateB64": {
                         "type": "string"
                    }
               }
          },
          "SignatureOperationDTO": {
               "type": "object",
               "properties": {
                    "configSignatureDTO": {
                         "description": "Config signature object",
                         "$ref": "#/definitions/ConfigSignatureDTO"
                    },
                    "hashDataToSign": {
                         "type": "array",
                         "description": "Array of bytes with data to sign",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    }
               },
               "description": "Object with signature operation data"
          },
          "FinalizeSignatureRequestDTO": {
               "type": "object",
               "properties": {
                    "operationCodes": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/RawSignatureDataDTO"
                         }
                    }
               }
          },
          "VerifierOcspDTO": {
               "type": "object",
               "properties": {
                    "responseDate": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "responseOcsp": {
                         "type": "string"
                    }
               }
          },
          "XMLPdfPageHashes": {
               "type": "object",
               "properties": {
                    "pages": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/XMLPdfPageHash"
                         }
                    }
               }
          },
          "X509Certificate": {
               "type": "object",
               "properties": {
                    "type": {
                         "type": "string"
                    },
                    "subjectX500Principal": {
                         "$ref": "#/definitions/X500Principal"
                    },
                    "issuerX500Principal": {
                         "$ref": "#/definitions/X500Principal"
                    },
                    "serialNumber": {
                         "type": "integer",
                         "format": "int64"
                    },
                    "notBefore": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "notAfter": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "tbscertificate": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "sigAlgName": {
                         "type": "string"
                    },
                    "sigAlgOID": {
                         "type": "string"
                    },
                    "sigAlgParams": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "issuerUniqueID": {
                         "type": "array",
                         "items": {
                              "type": "boolean"
                         }
                    },
                    "subjectUniqueID": {
                         "type": "array",
                         "items": {
                              "type": "boolean"
                         }
                    },
                    "keyUsage": {
                         "type": "array",
                         "items": {
                              "type": "boolean"
                         }
                    },
                    "extendedKeyUsage": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    },
                    "subjectAlternativeNames": {
                         "type": "array",
                         "items": {
                              "type": "array",
                              "items": {
                                   "type": "object"
                              }
                         }
                    },
                    "issuerAlternativeNames": {
                         "type": "array",
                         "items": {
                              "type": "array",
                              "items": {
                                   "type": "object"
                              }
                         }
                    },
                    "issuerDN": {
                         "$ref": "#/definitions/Principal"
                    },
                    "subjectDN": {
                         "$ref": "#/definitions/Principal"
                    },
                    "version": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "signature": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "basicConstraints": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "criticalExtensionOIDs": {
                         "type": "array",
                         "uniqueItems": true,
                         "items": {
                              "type": "string"
                         }
                    },
                    "nonCriticalExtensionOIDs": {
                         "type": "array",
                         "uniqueItems": true,
                         "items": {
                              "type": "string"
                         }
                    },
                    "encoded": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "publicKey": {
                         "$ref": "#/definitions/PublicKey"
                    }
               }
          },
          "ConfigTsaDTO": {
               "type": "object",
               "properties": {
                    "type": {
                         "type": "string",
                         "enum": ["URL", "USER", "CERTIFICATE", "LOCAL"]
                    },
                    "url": {
                         "type": "string"
                    },
                    "user": {
                         "type": "string"
                    },
                    "password": {
                         "type": "string"
                    },
                    "privateKey": {
                         "$ref": "#/definitions/PrivateKey"
                    },
                    "localCert": {
                         "$ref": "#/definitions/CertificateDTO"
                    }
               }
          },
          "ConfigSignatureDTO": {
               "type": "object",
               "properties": {
                    "idReference": {
                         "type": "string"
                    },
                    "signingDate": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "deterministicId": {
                         "type": "string"
                    },
                    "detachedReferenceUrl": {
                         "type": "string"
                    },
                    "signatureAlgorithm": {
                         "type": "string",
                         "enum": ["RSA_SHA1", "RSA_SHA224", "RSA_SHA256", "RSA_SHA384", "RSA_SHA512"]
                    },
                    "custodyCode": {
                         "type": "string"
                    },
                    "custodyStorage": {
                         "type": "boolean",
                         "default": false
                    },
                    "custodyEncrypted": {
                         "type": "boolean",
                         "default": false
                    },
                    "auditoryCipherDisable": {
                         "type": "boolean",
                         "default": false
                    },
                    "revocationType": {
                         "type": "string",
                         "enum": ["DEFAULT", "ONLINE", "ONLINE_WITH_CACHE", "CRL", "CRL_CACHE", "OCSP", "OFFLINE"]
                    },
                    "tsa": {
                         "$ref": "#/definitions/ConfigTsaDTO"
                    },
                    "signatureType": {
                         "type": "string",
                         "enum": ["CADES_B", "CADES_T", "CADES_LT", "CADES_LTA", "PADES_B", "PADES_T", "PADES_LT", "PADES_LTA", "XADES_B", "XADES_T", "XADES_LT", "XADES_LTA"]
                    },
                    "packaging": {
                         "type": "string",
                         "enum": ["ENVELOPED", "ENVELOPING", "DETACHED"]
                    },
                    "policy": {
                         "$ref": "#/definitions/ConfigPolicyDTO"
                    },
                    "signatureReason": {
                         "type": "string"
                    },
                    "country": {
                         "type": "string"
                    },
                    "stateOrProvince": {
                         "type": "string"
                    },
                    "postalCode": {
                         "type": "string"
                    },
                    "city": {
                         "type": "string"
                    },
                    "cadesConfig": {
                         "$ref": "#/definitions/ConfigCadesDTO"
                    },
                    "padesConfig": {
                         "$ref": "#/definitions/ConfigPadesDTO"
                    },
                    "xadesConfig": {
                         "$ref": "#/definitions/ConfigXadesDTO"
                    }
               }
          },
          "SignatureTemplateResultDTO": {
               "type": "object",
               "properties": {
                    "creationDate": {
                         "type": "string",
                         "format": "date-time",
                         "description": "Creation date"
                    },
                    "code": {
                         "type": "string",
                         "description": "code"
                    },
                    "deleteDate": {
                         "type": "string",
                         "format": "date-time",
                         "description": "Delete date"
                    }
               },
               "description": "Signature template"
          },
          "CertificateDTO": {
               "type": "object",
               "properties": {
                    "publicKey": {
                         "$ref": "#/definitions/PublicKey"
                    },
                    "privateKey": {
                         "$ref": "#/definitions/PrivateKey"
                    },
                    "chain": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/Certificate"
                         }
                    },
                    "certificate": {
                         "$ref": "#/definitions/X509Certificate"
                    },
                    "provider": {
                         "type": "string"
                    }
               }
          },
          "RestResponseDTOVerifierDocumentDTO": {
               "type": "object",
               "properties": {
                    "content": {
                         "description": "Content (class that extends from Serializable)",
                         "$ref": "#/definitions/VerifierDocumentDTO"
                    },
                    "httpStatusCode": {
                         "type": "integer",
                         "format": "int32",
                         "description": "Integer with HttpStatusCode"
                    },
                    "errorCode": {
                         "type": "string",
                         "description": "String with error code"
                    },
                    "message": {
                         "type": "string",
                         "description": "String with operation message"
                    }
               },
               "description": "Response Object"
          },
          "SignatureConfigurationDTO": {
               "type": "object",
               "properties": {
                    "idReference": {
                         "type": "string"
                    },
                    "signingDate": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "deterministicId": {
                         "type": "string"
                    },
                    "detachedReferenceUrl": {
                         "type": "string"
                    },
                    "signatureAlgorithm": {
                         "type": "string",
                         "enum": ["RSA_SHA1", "RSA_SHA224", "RSA_SHA256", "RSA_SHA384", "RSA_SHA512"]
                    },
                    "custodyCode": {
                         "type": "string"
                    },
                    "custodyStorage": {
                         "type": "boolean",
                         "default": false
                    },
                    "custodyEncrypted": {
                         "type": "boolean",
                         "default": false
                    },
                    "auditoryCipherDisable": {
                         "type": "boolean",
                         "default": false
                    },
                    "revocationType": {
                         "type": "string",
                         "enum": ["DEFAULT", "ONLINE", "ONLINE_WITH_CACHE", "CRL", "CRL_CACHE", "OCSP", "OFFLINE"]
                    },
                    "tsa": {
                         "$ref": "#/definitions/ConfigTsaDTO"
                    },
                    "signatureType": {
                         "type": "string",
                         "enum": ["CADES_B", "CADES_T", "CADES_LT", "CADES_LTA", "PADES_B", "PADES_T", "PADES_LT", "PADES_LTA", "XADES_B", "XADES_T", "XADES_LT", "XADES_LTA"]
                    },
                    "packaging": {
                         "type": "string",
                         "enum": ["ENVELOPED", "ENVELOPING", "DETACHED"]
                    },
                    "policy": {
                         "$ref": "#/definitions/ConfigPolicyDTO"
                    },
                    "signatureReason": {
                         "type": "string"
                    },
                    "country": {
                         "type": "string"
                    },
                    "stateOrProvince": {
                         "type": "string"
                    },
                    "postalCode": {
                         "type": "string"
                    },
                    "city": {
                         "type": "string"
                    },
                    "cadesConfig": {
                         "$ref": "#/definitions/ConfigCadesDTO"
                    },
                    "padesConfig": {
                         "$ref": "#/definitions/ConfigPadesDTO"
                    },
                    "xadesConfig": {
                         "$ref": "#/definitions/ConfigXadesDTO"
                    },
                    "alias": {
                         "type": "string"
                    },
                    "password": {
                         "type": "string"
                    },
                    "callBack": {
                         "type": "string"
                    }
               }
          },
          "X500Principal": {
               "type": "object",
               "properties": {
                    "name": {
                         "type": "string"
                    },
                    "encoded": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    }
               }
          },
          "Principal": {
               "type": "object",
               "properties": {
                    "name": {
                         "type": "string"
                    }
               }
          },
          "VerifierCertificateDTO": {
               "type": "object",
               "properties": {
                    "certX509Base64": {
                         "type": "string"
                    },
                    "subject": {
                         "type": "string"
                    },
                    "issuer": {
                         "type": "string"
                    },
                    "notafter": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "notbefore": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "signAlgName": {
                         "type": "string"
                    },
                    "signAlgOID": {
                         "type": "string"
                    },
                    "type": {
                         "type": "string"
                    },
                    "version": {
                         "type": "string"
                    },
                    "serialNumber": {
                         "type": "string"
                    },
                    "keyUsage": {
                         "$ref": "#/definitions/VerifierKeyUsageDTO"
                    },
                    "oids": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/VerifierOidDTO"
                         }
                    },
                    "validation": {
                         "$ref": "#/definitions/VerifierDTO"
                    },
                    "policyIdentifier": {
                         "type": "string"
                    },
                    "expired": {
                         "type": "boolean",
                         "default": false
                    },
                    "selfSigned": {
                         "type": "boolean",
                         "default": false
                    },
                    "trusted": {
                         "type": "boolean",
                         "default": false
                    },
                    "trustedSource": {
                         "type": "string",
                         "enum": ["TSL", "KS"]
                    }
               }
          },
          "Certificate": {
               "type": "object",
               "properties": {
                    "type": {
                         "type": "string"
                    },
                    "encoded": {
                         "type": "array",
                         "items": {
                              "type": "string",
                              "format": "byte"
                         }
                    },
                    "publicKey": {
                         "$ref": "#/definitions/PublicKey"
                    }
               }
          },
          "VerifierDocumentDTO": {
               "type": "object",
               "properties": {
                    "signatureCode": {
                         "$ref": "#/definitions/SignatureCodeDTO"
                    },
                    "validationTime": {
                         "type": "string",
                         "format": "date-time"
                    },
                    "signaturesCount": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "validSignaturesCount": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "evidencesCount": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "validEvidencesCount": {
                         "type": "integer",
                         "format": "int32"
                    },
                    "signatures": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/VerifierSignatureDTO"
                         }
                    },
                    "evidences": {
                         "type": "array",
                         "items": {
                              "$ref": "#/definitions/VerifierEvidenceDTO"
                         }
                    },
                    "pagesHashes": {
                         "type": "array",
                         "items": {
                              "type": "string"
                         }
                    }
               }
          },
          "VerifierKeyUsageDTO": {
               "type": "object",
               "properties": {
                    "digitalSignature": {
                         "type": "boolean",
                         "default": false
                    },
                    "nonRepudiation": {
                         "type": "boolean",
                         "default": false
                    },
                    "keyEncipherment": {
                         "type": "boolean",
                         "default": false
                    },
                    "dataEncipherment": {
                         "type": "boolean",
                         "default": false
                    },
                    "keyAgreement": {
                         "type": "boolean",
                         "default": false
                    },
                    "keyCertSign": {
                         "type": "boolean",
                         "default": false
                    },
                    "iscRLSign": {
                         "type": "boolean",
                         "default": false
                    },
                    "encipherOnly": {
                         "type": "boolean",
                         "default": false
                    },
                    "decipherOnly": {
                         "type": "boolean",
                         "default": false
                    }
               }
          }
     }
}

The JSON specification is valid, I've checked it. The error occurs when I try to add all /verify operations to JSON, if I delete them the Swagger UI works fine.

Thanks for your help.

jtorres-viavansi commented 8 years ago

Solved, it didn't work since one method wasn't anotated.