From 4070379545a9afe3b81e04c45bd72e3e5f7d7a39 Mon Sep 17 00:00:00 2001 From: selfcare-github-bot <146744076+selfcare-github-bot@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:45:16 +0200 Subject: [PATCH] [Update OpenAPI] Merge openapi prod using openapi-merge-cli (#387) Co-authored-by: manuraf <12083207+manuraf@users.noreply.github.com> --- .../api/ms_internal_api/v1/openapi.prod.json | 3 +- .../v1/openapi.prod.json | 6 +- .../v2/openapi.prod.json | 165 ++++++++++++++++++ .../pnpg_support_service/v1/openapi.prod.json | 6 +- 4 files changed, 175 insertions(+), 5 deletions(-) diff --git a/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json b/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json index ac554e14..baad2168 100644 --- a/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json +++ b/infra/apim_v2/api/ms_internal_api/v1/openapi.prod.json @@ -236,7 +236,8 @@ "tags": [ "User" ], - "summary": "Update user status with optional filter for institution, product, role and productRole", + "summary": "Update a user's product status with optional filters", + "description": "Update user status with optional filter for institution, product, role and productRole", "operationId": "updateUserStatusUsingPUT", "parameters": [ { diff --git a/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json b/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json index 6e539ab8..f6ab8d21 100644 --- a/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json +++ b/infra/apim_v2/api/selfcare_support_service/v1/openapi.prod.json @@ -274,7 +274,8 @@ "tags": [ "Institution" ], - "summary": "The API retrieves user's info including details of roles on products", + "summary": "Retrieve user's information including product role details", + "description": "Fetches detailed information about users associated with a specific institution, including their roles on various products. This endpoint is useful for administrators to obtain comprehensive user-role mappings within an institution.", "operationId": "getInstitutionUsersUsingGET", "parameters": [ { @@ -355,7 +356,8 @@ "tags": [ "User" ], - "summary": "Retrieves user given userId and optional ProductId", + "summary": "Retrieve user information by userId and optional ProductId", + "description": "Retrieves user given userId and optional ProductId", "operationId": "getUserInfoUsingGET", "parameters": [ { diff --git a/infra/apim_v2/api_pnpg/external_api_for_pnpg/v2/openapi.prod.json b/infra/apim_v2/api_pnpg/external_api_for_pnpg/v2/openapi.prod.json index fd5f63f0..3cc2637e 100644 --- a/infra/apim_v2/api_pnpg/external_api_for_pnpg/v2/openapi.prod.json +++ b/infra/apim_v2/api_pnpg/external_api_for_pnpg/v2/openapi.prod.json @@ -86,6 +86,99 @@ ] } }, + "/users/{id}": { + "get": { + "tags": [ + "User" + ], + "summary": "Retrieve user information by userId and optional ProductId", + "description": "Retrieves user given userId and optional ProductId", + "operationId": "getUserInfoUsingGET", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "institutionId", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "productId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "401": { + "description": "Not Authorized", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem1" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [ + "global" + ] + } + ] + } + }, "/institutions": { "get": { "tags": [ @@ -1016,6 +1109,78 @@ } } }, + "UserResponse": { + "required": [ + "id", + "name", + "surname" + ], + "type": "object", + "properties": { + "id": { + "minLength": 1, + "type": "string" + }, + "taxCode": { + "type": "string" + }, + "name": { + "pattern": "\\S", + "type": "string" + }, + "surname": { + "pattern": "\\S", + "type": "string" + }, + "email": { + "type": "string" + }, + "workContacts": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Problem1": { + "type": "object", + "properties": { + "detail": { + "type": "string" + }, + "instance": { + "type": "string" + }, + "invalidParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InvalidParam1" + } + }, + "status": { + "format": "int32", + "type": "integer" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "InvalidParam1": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "reason": { + "type": "string" + } + } + }, "InstitutionResource": { "title": "InstitutionResource", "required": [ diff --git a/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json b/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json index c539ea61..5a17be9e 100644 --- a/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json +++ b/infra/apim_v2/api_pnpg/pnpg_support_service/v1/openapi.prod.json @@ -121,7 +121,8 @@ "tags": [ "Institution" ], - "summary": "The API retrieves user's info including details of roles on products", + "summary": "Retrieve user's information including product role details", + "description": "Fetches detailed information about users associated with a specific institution, including their roles on various products. This endpoint is useful for administrators to obtain comprehensive user-role mappings within an institution.", "operationId": "getInstitutionUsersUsingGET", "parameters": [ { @@ -202,7 +203,8 @@ "tags": [ "User" ], - "summary": "Retrieves user given userId and optional ProductId", + "summary": "Retrieve user information by userId and optional ProductId", + "description": "Retrieves user given userId and optional ProductId", "operationId": "getUserInfoUsingGET", "parameters": [ {