Skip to content

Commit

Permalink
feat: remove rest v1
Browse files Browse the repository at this point in the history
BREAKING CHANGE: as v1 is removed
  • Loading branch information
dweber019 committed Jan 18, 2024
1 parent 9dfc42e commit 9a6f1e0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 520 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ target/
.idea/
*.iml

node_modules/
node_modules/
.idea
237 changes: 0 additions & 237 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,178 +255,6 @@
}
}
}
},
"/contracts/v1" : {
"post" : {
"tags" : [ "contracts" ],
"summary" : "Upload a contract V1 to the insurer.",
"description" : "Uploads a contract. If validation fails processing is refused, a corresponding error is thrown",
"operationId" : "uploadContractV1",
"parameters" : [ {
"name" : "X-Caller-Name",
"in" : "header",
"description" : "Identifying the sender of this event (request) ",
"required" : true,
"schema" : {
"type" : "string",
"description" : "Defined by the callee"
}
}, {
"name" : "X-Event-ID",
"in" : "header",
"description" : "Unique identifier per event (request)",
"required" : true,
"schema" : {
"type" : "string",
"description" : "Generated UUID",
"format" : "uuid"
}
} ],
"requestBody" : {
"description" : "Contract that needs to be uploaded to the insurer",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ContractV1"
}
}
},
"required" : true
},
"responses" : {
"default" : {
"description" : "A handle to the contract for conversation with the insurer is provided",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ContractReference"
}
}
}
},
"400" : {
"description" : "Invalid contract is provided. See ErrorResponse for more information about validation issues",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
}
},
"503" : {
"description" : "Technical issue on server side, please retry later",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/contracts/v1/documents" : {
"post" : {
"tags" : [ "documents" ],
"summary" : "Upload a document for a contract.",
"description" : "Please note that this operation needs to be called per document for a contract to be uploaded. The response contains a handle to the document. This handle should be provided with the contract to be uploaded via uploadContract",
"operationId" : "uploadDocumentV1",
"parameters" : [ {
"name" : "X-Caller-Name",
"in" : "header",
"description" : "Identifying the sender of this event (request) ",
"required" : true,
"schema" : {
"type" : "string",
"description" : "Defined by the callee"
}
}, {
"name" : "X-Event-ID",
"in" : "header",
"description" : "Unique identifier per event (request)",
"required" : true,
"schema" : {
"type" : "string",
"description" : "Generated UUID",
"format" : "uuid"
}
} ],
"requestBody" : {
"description" : "a documnent that is part of a contract",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/Document"
}
}
},
"required" : true
},
"responses" : {
"default" : {
"description" : "A handle for the uploaded document which can be used in providing a new contract via POST contracts",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/FileHandle"
}
}
}
},
"400" : {
"description" : "Invalid document is provided. See ErrorResponse for more information about validation issues",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
}
},
"503" : {
"description" : "Technical issue on server side, please retry later",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/contracts/v1/version" : {
"get" : {
"tags" : [ "version" ],
"summary" : "Callable way of retrieving current API version (following semver)",
"description" : "Endpoint to retrieve the current API version (following semver). Can be compared to the URI version. Can be used for testing purposes.",
"operationId" : "versionV1",
"responses" : {
"default" : {
"description" : "Version identifier",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/Version"
}
}
}
},
"503" : {
"description" : "Technical issue on server side, please retry later",
"content" : {
"application/json; charset=UTF-8" : {
"schema" : {
"$ref" : "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
},
"components" : {
Expand Down Expand Up @@ -942,71 +770,6 @@
"format" : "int32"
}
}
},
"ContractV1" : {
"required" : [ "conditionMonthYear", "contractId", "creationDate", "endDate", "fileHandles", "paymentCode", "product", "roles", "startDate", "totalNetPrice" ],
"type" : "object",
"properties" : {
"creationDate" : {
"type" : "string",
"description" : "The day the contract was issued",
"format" : "date"
},
"startDate" : {
"type" : "string",
"description" : "Start of contract which means start of insurance coverage",
"format" : "date"
},
"endDate" : {
"type" : "string",
"description" : "End of contract which means end of insurance coverage",
"format" : "date"
},
"contractId" : {
"maxLength" : 20,
"minLength" : 0,
"type" : "string",
"description" : "Id given by SaaS provider"
},
"totalNetPrice" : {
"$ref" : "#/components/schemas/MonetaryAmount"
},
"roles" : {
"maxItems" : 99,
"minItems" : 1,
"type" : "array",
"description" : "All roles in the contract, e.g. insuranceHolder",
"items" : {
"$ref" : "#/components/schemas/Role"
}
},
"product" : {
"$ref" : "#/components/schemas/Product"
},
"agent" : {
"$ref" : "#/components/schemas/Agent"
},
"paymentCode" : {
"type" : "integer",
"description" : "A code uniquely identifying the type of payment e.g. invoice or creditcard, Paypal etc.",
"format" : "int32"
},
"fileHandles" : {
"maxItems" : 2,
"minItems" : 0,
"type" : "array",
"description" : "A contract is only complete with its corresponding documents. This is the contract issued by the SaaS provider and maybe some further documents like e.g. customer provided documents like e.g. receipts. At least one contract document is required",
"items" : {
"$ref" : "#/components/schemas/FileHandle"
}
},
"conditionMonthYear" : {
"maxLength" : 4,
"minLength" : 4,
"type" : "string",
"description" : "When was the condition issued? Format MMYY"
}
}
}
}
}
Expand Down
Loading

0 comments on commit 9a6f1e0

Please sign in to comment.