Skip to content

Commit b465b09

Browse files
Renamed endpoint template-attachment
1 parent eda1143 commit b465b09

File tree

3 files changed

+88
-86
lines changed

3 files changed

+88
-86
lines changed

app/src/main/resources/swagger/api-docs.json

Lines changed: 86 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -411,90 +411,6 @@
411411
}
412412
},
413413
"/v2/tokens/{onboardingId}/attachment" : {
414-
"get" : {
415-
"tags" : [ "token-v-2-controller" ],
416-
"summary" : "Service to download a specific onboarding attachment",
417-
"description" : "Service to download a specific onboarding attachment",
418-
"operationId" : "getAttachmentUsingGET",
419-
"parameters" : [ {
420-
"name" : "onboardingId",
421-
"in" : "path",
422-
"required" : true,
423-
"schema" : {
424-
"type" : "string"
425-
}
426-
}, {
427-
"name" : "name",
428-
"in" : "query",
429-
"required" : true,
430-
"schema" : {
431-
"type" : "string"
432-
}
433-
} ],
434-
"responses" : {
435-
"200" : {
436-
"description" : "OK",
437-
"content" : {
438-
"application/octet-stream" : {
439-
"schema" : {
440-
"type" : "array",
441-
"items" : {
442-
"type" : "string",
443-
"format" : "byte"
444-
}
445-
}
446-
}
447-
}
448-
},
449-
"400" : {
450-
"description" : "Bad Request",
451-
"content" : {
452-
"application/problem+json" : {
453-
"schema" : {
454-
"type" : "object",
455-
"description" : "Generic problem response"
456-
}
457-
}
458-
}
459-
},
460-
"401" : {
461-
"description" : "Unauthorized",
462-
"content" : {
463-
"application/problem+json" : {
464-
"schema" : {
465-
"type" : "object",
466-
"description" : "Generic problem response"
467-
}
468-
}
469-
}
470-
},
471-
"404" : {
472-
"description" : "Not Found",
473-
"content" : {
474-
"application/problem+json" : {
475-
"schema" : {
476-
"type" : "object",
477-
"description" : "Generic problem response"
478-
}
479-
}
480-
}
481-
},
482-
"500" : {
483-
"description" : "Internal Server Error",
484-
"content" : {
485-
"application/problem+json" : {
486-
"schema" : {
487-
"type" : "object",
488-
"description" : "Generic problem response"
489-
}
490-
}
491-
}
492-
}
493-
},
494-
"security" : [ {
495-
"bearerAuth" : [ "global" ]
496-
} ]
497-
},
498414
"post" : {
499415
"tags" : [ "token-v-2-controller" ],
500416
"summary" : "Upload a signed attachment",
@@ -2071,6 +1987,92 @@
20711987
} ]
20721988
}
20731989
},
1990+
"/v2/tokens/{onboardingId}/template-attachment" : {
1991+
"get" : {
1992+
"tags" : [ "token-v-2-controller" ],
1993+
"summary" : "Service to download a specific onboarding attachment",
1994+
"description" : "Service to download a specific onboarding attachment",
1995+
"operationId" : "getAttachmentUsingGET",
1996+
"parameters" : [ {
1997+
"name" : "onboardingId",
1998+
"in" : "path",
1999+
"required" : true,
2000+
"schema" : {
2001+
"type" : "string"
2002+
}
2003+
}, {
2004+
"name" : "name",
2005+
"in" : "query",
2006+
"required" : true,
2007+
"schema" : {
2008+
"type" : "string"
2009+
}
2010+
} ],
2011+
"responses" : {
2012+
"200" : {
2013+
"description" : "OK",
2014+
"content" : {
2015+
"application/octet-stream" : {
2016+
"schema" : {
2017+
"type" : "array",
2018+
"items" : {
2019+
"type" : "string",
2020+
"format" : "byte"
2021+
}
2022+
}
2023+
}
2024+
}
2025+
},
2026+
"400" : {
2027+
"description" : "Bad Request",
2028+
"content" : {
2029+
"application/problem+json" : {
2030+
"schema" : {
2031+
"type" : "object",
2032+
"description" : "Generic problem response"
2033+
}
2034+
}
2035+
}
2036+
},
2037+
"401" : {
2038+
"description" : "Unauthorized",
2039+
"content" : {
2040+
"application/problem+json" : {
2041+
"schema" : {
2042+
"type" : "object",
2043+
"description" : "Generic problem response"
2044+
}
2045+
}
2046+
}
2047+
},
2048+
"404" : {
2049+
"description" : "Not Found",
2050+
"content" : {
2051+
"application/problem+json" : {
2052+
"schema" : {
2053+
"type" : "object",
2054+
"description" : "Generic problem response"
2055+
}
2056+
}
2057+
}
2058+
},
2059+
"500" : {
2060+
"description" : "Internal Server Error",
2061+
"content" : {
2062+
"application/problem+json" : {
2063+
"schema" : {
2064+
"type" : "object",
2065+
"description" : "Generic problem response"
2066+
}
2067+
}
2068+
}
2069+
}
2070+
},
2071+
"security" : [ {
2072+
"bearerAuth" : [ "global" ]
2073+
} ]
2074+
}
2075+
},
20742076
"/v2/tokens/{onboardingId}/products/{productId}/aggregates-csv" : {
20752077
"get" : {
20762078
"tags" : [ "token-v-2-controller" ],

web/src/main/java/it/pagopa/selfcare/onboarding/web/controller/TokenV2Controller.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public ResponseEntity<byte[]> getContract(@ApiParam("${swagger.tokens.onboarding
232232
return getResponseEntity(contract);
233233
}
234234

235-
@GetMapping(value = "/{onboardingId}/attachment", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
235+
@GetMapping(value = "/{onboardingId}/template-attachment", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
236236
@ResponseStatus(HttpStatus.OK)
237237
@Operation(summary = "${swagger.tokens.getAttachment}",
238238
description = "${swagger.tokens.getAttachment}", operationId = "getAttachmentUsingGET")

web/src/test/java/it/pagopa/selfcare/onboarding/web/controller/TokenV2ControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void getTemplateAttachment() throws Exception {
268268

269269
//when
270270
mvc.perform(MockMvcRequestBuilders
271-
.get("/v2/tokens/{onboardingId}/attachment?name={name}", onboardingId, filename)
271+
.get("/v2/tokens/{onboardingId}/template-attachment?name={name}", onboardingId, filename)
272272
.accept(MediaType.APPLICATION_OCTET_STREAM_VALUE))
273273
.andExpect(status().isOk())
274274
.andReturn();

0 commit comments

Comments
 (0)