Skip to content

Commit

Permalink
[VAS-800] updated openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
giomella committed Mar 14, 2024
1 parent 3873ff3 commit 29f3da7
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 16 deletions.
171 changes: 156 additions & 15 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,128 @@
}
]
},
"/creditorinstitutions": {
"post": {
"tags": [
"Creditor Institutions"
],
"summary": "Get the list of creditor institution business names",
"description": "Return a list of business name and tax code of creditor institutions, given the provided list of creditor institution tax codes",
"operationId": "getCreditorInstitutionNamesFromTaxCodes",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CreditorInstitutionInfo"
}
}
}
}
},
"401": {
"description": "Unauthorized",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"404": {
"description": "Not Found",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
},
"429": {
"description": "Too many requests",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
}
},
"500": {
"description": "Service unavailable",
"headers": {
"X-Request-Id": {
"description": "This header identifies the call",
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemJson"
}
}
}
}
},
"security": [
{
"ApiKey": []
},
{
"Authorization": []
}
]
},
"parameters": [
{
"name": "X-Request-Id",
"in": "header",
"description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.",
"schema": {
"type": "string"
}
}
]
},
"/creditorinstitutions/{creditorInstitutionCode}/applicationcodes": {
"get": {
"tags": [
Expand Down Expand Up @@ -1372,6 +1494,28 @@
},
"components": {
"schemas": {
"ProblemJson": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable"
},
"status": {
"maximum": 600,
"minimum": 100,
"type": "integer",
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
"format": "int32",
"example": 200
},
"detail": {
"type": "string",
"description": "A human readable explanation specific to this occurrence of the problem.",
"example": "There was an error processing the request"
}
}
},
"IbanDetails": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1471,25 +1615,22 @@
}
}
},
"ProblemJson": {
"CreditorInstitutionInfo": {
"required": [
"business_name",
"creditor_institution_code"
],
"type": "object",
"properties": {
"title": {
"business_name": {
"type": "string",
"description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable"
},
"status": {
"maximum": 600,
"minimum": 100,
"type": "integer",
"description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
"format": "int32",
"example": 200
"description": "The business name of the creditor institution",
"example": "Comune di Roma"
},
"detail": {
"creditor_institution_code": {
"type": "string",
"description": "A human readable explanation specific to this occurrence of the problem.",
"example": "There was an error processing the request"
"description": "The tax code of the creditor institution",
"example": "02438750586"
}
}
},
Expand Down Expand Up @@ -2143,4 +2284,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ public ResponseEntity<CIAssociatedCodeList> getSegregationCodesFromCreditorInsti
content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
array = @ArraySchema(schema = @Schema(implementation = CreditorInstitutionInfo.class)))),
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema())),
@ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema())),
@ApiResponse(responseCode = "404", description = "Not Found",
content = @Content(schema = @Schema(implementation = ProblemJson.class))),
@ApiResponse(responseCode = "429", description = "Too many requests", content = @Content(schema = @Schema())),
Expand Down

0 comments on commit 29f3da7

Please sign in to comment.