Skip to content

Commit

Permalink
[SELC-5622] refactor: Change endpoint /createdAt in order to follow p…
Browse files Browse the repository at this point in the history
…aram-case standard (#41)
  • Loading branch information
manuraf authored Sep 23, 2024
1 parent 2091759 commit b19a2aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/institution-ms/app/src/main/docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@
} ]
}
},
"/institutions/{institutionId}/createdAt" : {
"/institutions/{institutionId}/created-at" : {
"put" : {
"tags" : [ "Institution", "internal-v1" ],
"summary" : "The service updates the createdAt field for the institution-product pair",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public ResponseEntity<List<InstitutionToOnboard>> getValidInstitutionToOnboard(@
@Tag(name = "internal-v1")
@Tag(name = "Institution")
@ApiOperation(value = "${swagger.mscore.institutions.updateCreatedAt}", notes = "${swagger.mscore.institutions.updateCreatedAt}")
@PutMapping(value = "/{institutionId}/createdAt", produces = MediaType.APPLICATION_JSON_VALUE)
@PutMapping(value = "/{institutionId}/created-at", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Void> updateCreatedAt(@ApiParam("${swagger.mscore.institutions.model.institutionId}")
@PathVariable("institutionId") String institutionId,
@Valid @RequestBody CreatedAtRequest createdAtRequest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ void updateCreatedAt() throws Exception {
createdAtRequest.setCreatedAt(createdAtMock);
createdAtRequest.setProductId(productIdMock);
// When
MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.put(BASE_URL + "/{institutionId}/createdAt", institutionIdMock)
MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.put(BASE_URL + "/{institutionId}/created-at", institutionIdMock)
.content(new ObjectMapper().findAndRegisterModules().writeValueAsString(createdAtRequest))
.contentType(APPLICATION_JSON_VALUE)
.accept(APPLICATION_JSON_VALUE);
Expand Down Expand Up @@ -1333,7 +1333,7 @@ void updateCreatedAt_invalidDate() throws Exception {
createdAtRequest.setCreatedAt(createdAtMock);
// When
MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders
.put(BASE_URL + "/{institutionId}/createdAt", institutionIdMock)
.put(BASE_URL + "/{institutionId}/created-at", institutionIdMock)
.content(objectMapper.writeValueAsString(createdAtRequest))
.contentType(APPLICATION_JSON_VALUE)
.accept(APPLICATION_JSON_VALUE);
Expand Down

0 comments on commit b19a2aa

Please sign in to comment.