Skip to content

Commit

Permalink
[SELC-5379] feat: add logo url in getUserInstitutionUsingGet (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
giulia-tremolada authored Aug 5, 2024
1 parent 4fd28fc commit 7cac9f5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@
</backend>
<outbound>
<base />
<choose>
<when condition="@(context.Response.StatusCode == 200)">
<set-body>@{
JArray response = context.Response.Body.As<JArray>();
foreach(JObject item in response.Children()) {
item.Add("logo", new JValue(new Uri("${LOGO_URL}/institutions/" + item.GetValue("id") + "/logo.png")));
}
return response.ToString();
}</set-body>
</when>
</choose>
</outbound>
<on-error>
<base/>
Expand Down
4 changes: 4 additions & 0 deletions infra/apim_v2/api/ms_external_api/v2/openapi.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -3314,6 +3314,10 @@
"items": {
"$ref": "#/components/schemas/OnboardedProductResponse"
}
},
"logo": {
"type": "string",
"description": "URL to institution logo."
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions infra/apim_v2/api/ms_external_api/v2/openapi.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3314,6 +3314,10 @@
"items": {
"$ref": "#/components/schemas/OnboardedProductResponse"
}
},
"logo": {
"type": "string",
"description": "URL to institution logo."
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions infra/apim_v2/api/ms_external_api/v2/openapi.uat.json
Original file line number Diff line number Diff line change
Expand Up @@ -3314,6 +3314,10 @@
"items": {
"$ref": "#/components/schemas/OnboardedProductResponse"
}
},
"logo": {
"type": "string",
"description": "URL to institution logo."
}
}
},
Expand Down
1 change: 1 addition & 0 deletions infra/apim_v2/apim.tf
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ module "apim_external_api_ms_v2" {
xml_content = templatefile("./api/ms_external_api/v2/getUserInstitutionUsingGet_op_policy.xml.tpl", {
BACKEND_BASE_URL = "https://selc-${var.env_short}-user-ms-ca.${var.ca_suffix_dns_private_name}/"
API_DOMAIN = local.api_domain
LOGO_URL = "https://${local.logo_api_domain}"
KID = data.azurerm_key_vault_secret.jwt_kid.value
JWT_CERTIFICATE_THUMBPRINT = azurerm_api_management_certificate.jwt_certificate.thumbprint
TENANT_ID = data.azurerm_client_config.current.tenant_id
Expand Down

0 comments on commit 7cac9f5

Please sign in to comment.