diff --git a/dev-portal/src/components/ApisMenu.jsx b/dev-portal/src/components/ApisMenu.jsx index 67a09c1d0..b70549477 100644 --- a/dev-portal/src/components/ApisMenu.jsx +++ b/dev-portal/src/components/ApisMenu.jsx @@ -68,14 +68,29 @@ function GenericApiSubsection ({ title, listOfApis, selectedApiId }) { > {title} - {listOfApis.map(api => ( + {_.toPairs(_.groupBy(listOfApis, api => api.apiId || api.id)).map(([id, apis]) => ( isActive(`${api.id}`, `${selectedApiId}`))} > - {api.swagger.info.title} + {apis[0].swagger.info.title} + {apis.length === 1 ? ( + apis[0].stage != null ? ` (${apis[0].stage})` : null + ) : ( + + {apis.map(api => ( + + {api.stage} + + ))} + + )} ))} @@ -93,14 +108,27 @@ function ApiSubsection ({ title, listOfApis, selectedApiId, selectedStage = fals > {title} - {listOfApis.map(api => ( + {_.toPairs(_.groupBy(listOfApis, "id")).map(([id, apis]) => ( - {api.swagger.info.title} + {apis[0].swagger.info.title} + {apis.length === 1 ? ` (${apis[0].stage})` : ( + + {apis.map(api => ( + + {api.stage} + + ))} + + )} ))}