Skip to content

Commit

Permalink
[PNPG-244] refactor: renamed api path to perform onboarding of users …
Browse files Browse the repository at this point in the history
…for pg (#560)
  • Loading branch information
empassaro authored Oct 23, 2024
1 parent dd60543 commit 7d12035
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/onboarding-ms/src/main/docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -938,12 +938,12 @@
} ]
}
},
"/v1/onboarding/users/pg-from-ic-and-ade" : {
"/v1/onboarding/users/pg" : {
"post" : {
"tags" : [ "Onboarding Controller" ],
"summary" : "Add Manager of PG institution",
"description" : "Create new onboarding request to add new Manager and replace the old inactive Managers of the institution.",
"operationId" : "onboardingUsersPgFromIcAndAde",
"operationId" : "onboardingUsersPg",
"requestBody" : {
"content" : {
"application/json" : {
Expand Down
4 changes: 2 additions & 2 deletions apps/onboarding-ms/src/main/docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,14 @@ paths:
description: Not Allowed
security:
- SecurityScheme: []
/v1/onboarding/users/pg-from-ic-and-ade:
/v1/onboarding/users/pg:
post:
tags:
- Onboarding Controller
summary: Add Manager of PG institution
description: Create new onboarding request to add new Manager and replace the
old inactive Managers of the institution.
operationId: onboardingUsersPgFromIcAndAde
operationId: onboardingUsersPg
requestBody:
content:
application/json:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ public Uni<OnboardingResponse> onboardingPgCompletion(@Valid OnboardingPgRequest
description = "Create new onboarding request to add new Manager and replace the old inactive Managers of the institution."
)
@POST
@Path("/users/pg-from-ic-and-ade")
public Uni<OnboardingResponse> onboardingUsersPgFromIcAndAde(@Valid OnboardingUserPgRequest onboardingRequest, @Context SecurityContext ctx) {
@Path("/users/pg")
public Uni<OnboardingResponse> onboardingUsersPg(@Valid OnboardingUserPgRequest onboardingRequest, @Context SecurityContext ctx) {
return readUserIdFromToken(ctx)
.onItem().transformToUni(userId -> onboardingService
.onboardingUserPg(fillUserId(onboardingMapper.toEntity(onboardingRequest), userId), onboardingRequest.getUsers()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ void onboardingPgUser() {
.when()
.body(onboardingUserPgValid)
.contentType(ContentType.JSON)
.post("/users/pg-from-ic-and-ade")
.post("/users/pg")
.then()
.statusCode(200);

Expand All @@ -665,7 +665,7 @@ void onboardingPgUserFailsWithWrongBody() {
.when()
.body(new OnboardingUserPgRequest())
.contentType(ContentType.JSON)
.post("/users/pg-from-ic-and-ade")
.post("/users/pg")
.then()
.statusCode(400);
}
Expand Down

0 comments on commit 7d12035

Please sign in to comment.