Skip to content

Commit

Permalink
[SELC-5054] chore: add "support" tags to getUserInfo and getInstituti…
Browse files Browse the repository at this point in the history
…onUsers (#153)
  • Loading branch information
giulia-tremolada authored Jun 11, 2024
1 parent 7d9cb15 commit af01275
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
14 changes: 9 additions & 5 deletions apps/user-ms/src/main/docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@
"description" : "Auto generated value"
} ],
"tags" : [ {
"name" : "Institution"
}, {
"name" : "User"
}, {
"name" : "external-v2"
}, {
"name" : "support"
} ],
"paths" : {
"/authorize" : {
Expand Down Expand Up @@ -66,7 +70,7 @@
},
"/institutions/{institutionId}" : {
"put" : {
"tags" : [ "Institution Controller" ],
"tags" : [ "Institution" ],
"summary" : "The API updates the description in all occurrences of userInstitution, given a certain institutionId.",
"parameters" : [ {
"name" : "institutionId",
Expand Down Expand Up @@ -106,7 +110,7 @@
},
"/institutions/{institutionId}/products/{productId}/createdAt" : {
"put" : {
"tags" : [ "Institution Controller" ],
"tags" : [ "Institution" ],
"summary" : "The API updates user's onboarded product with createdAt passed in input",
"parameters" : [ {
"name" : "institutionId",
Expand Down Expand Up @@ -161,7 +165,7 @@
},
"/institutions/{institutionId}/user-institutions" : {
"get" : {
"tags" : [ "Institution Controller" ],
"tags" : [ "Institution" ],
"summary" : "The API retrieves users with optional filters in input as query params",
"parameters" : [ {
"name" : "institutionId",
Expand Down Expand Up @@ -241,7 +245,7 @@
},
"/institutions/{institutionId}/users" : {
"get" : {
"tags" : [ "Institution Controller" ],
"tags" : [ "support", "Institution" ],
"summary" : "The API retrieves user's info including details of roles on products",
"parameters" : [ {
"name" : "institutionId",
Expand Down Expand Up @@ -586,7 +590,7 @@
},
"/users/{id}" : {
"get" : {
"tags" : [ "User", "external-v2" ],
"tags" : [ "User", "external-v2", "support" ],
"summary" : "Retrieves user given userId and optional ProductId",
"parameters" : [ {
"name" : "id",
Expand Down
12 changes: 8 additions & 4 deletions apps/user-ms/src/main/docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ servers:
- url: http://0.0.0.0:8080
description: Auto generated value
tags:
- name: Institution
- name: User
- name: external-v2
- name: support
paths:
/authorize:
get:
Expand Down Expand Up @@ -47,7 +49,7 @@ paths:
/institutions/{institutionId}:
put:
tags:
- Institution Controller
- Institution
summary: "The API updates the description in all occurrences of userInstitution,\
\ given a certain institutionId."
parameters:
Expand Down Expand Up @@ -75,7 +77,7 @@ paths:
/institutions/{institutionId}/products/{productId}/createdAt:
put:
tags:
- Institution Controller
- Institution
summary: The API updates user's onboarded product with createdAt passed in input
parameters:
- name: institutionId
Expand Down Expand Up @@ -114,7 +116,7 @@ paths:
/institutions/{institutionId}/user-institutions:
get:
tags:
- Institution Controller
- Institution
summary: The API retrieves users with optional filters in input as query params
parameters:
- name: institutionId
Expand Down Expand Up @@ -168,7 +170,8 @@ paths:
/institutions/{institutionId}/users:
get:
tags:
- Institution Controller
- support
- Institution
summary: The API retrieves user's info including details of roles on products
parameters:
- name: institutionId
Expand Down Expand Up @@ -406,6 +409,7 @@ paths:
tags:
- User
- external-v2
- support
summary: Retrieves user given userId and optional ProductId
parameters:
- name: id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
import lombok.AllArgsConstructor;
import org.apache.http.HttpStatus;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Authenticated
@Path("/institutions")
@Tag(name = "Institution")
@AllArgsConstructor
public class InstitutionController {

Expand All @@ -29,6 +31,8 @@ public class InstitutionController {
@Operation(summary = "The API retrieves user's info including details of roles on products")
@GET
@Path(value = "/{institutionId}/users")
@Tag(name = "support")
@Tag(name = "Institution")
@Produces(MediaType.APPLICATION_JSON)
public Multi<UserProductResponse> getInstitutionUsers(@PathParam(value = "institutionId") String institutionId) {
return userService.getUserProductsByInstitution(institutionId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.eclipse.microprofile.openapi.annotations.parameters.RequestBody;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
import org.jboss.resteasy.reactive.ResponseStatus;
import org.openapi.quarkus.user_registry_json.model.MutableUserFieldsDto;

import java.util.List;

Expand Down Expand Up @@ -74,6 +73,7 @@ public Uni<List<String>> getUsersEmailByInstitutionAndProduct(@NotNull @QueryPar
@Produces(MediaType.APPLICATION_JSON)
@Tag(name = "User")
@Tag(name = "external-v2")
@Tag(name = "support")
public Uni<UserResponse> getUserInfo(@PathParam(value = "id") String userId,
@QueryParam(value = "institutionId") String institutionId,
@QueryParam(value = "productId") String productId) {
Expand Down

0 comments on commit af01275

Please sign in to comment.