From 99f81bd7f9ff65e37c9ebf8be09e31cd1d331af9 Mon Sep 17 00:00:00 2001 From: Kajal Katoke <94599733+Kajal-NEC@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:34:30 +0530 Subject: [PATCH 1/4] Fix: Display of API Documents on publisher and devportal --- .../src/app/components/Apis/Details/Documents/Documents.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx index 71db7851c96..9e398de3c8d 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/Documents.jsx @@ -159,7 +159,7 @@ function Documents(props) { const promisedApi = restApi.getDocumentsByAPIId(apiId); promisedApi .then((response) => { - const overviewDoc = response.body.list.filter((item) => item.otherTypeName !== '_overview'); + const overviewDoc = response.body.list.filter((item) => item.otherTypeName !== 'overview'); if (api.type === 'HTTP') { const swaggerDoc = { documentId: 'default', name: 'Default', type: '' }; overviewDoc.unshift(swaggerDoc); From 435c4409d1cad94d8e962d8cb19797fb96ee635a Mon Sep 17 00:00:00 2001 From: Kajal Katoke <94599733+Kajal-NEC@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:39:05 +0530 Subject: [PATCH 2/4] Update View.jsx --- .../source/src/app/components/Apis/Details/Documents/View.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx index 87928b72215..9fa9ce3cc08 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Documents/View.jsx @@ -191,7 +191,7 @@ function View(props) { }; return ( <> - {(doc.summary && doc.otherTypeName !== '_overview') && ( + {(doc.summary && doc.otherTypeName !== 'overview') && ( {doc.summary} From 4306d9654e29b6e6b99355c68900b9cf43ce5379 Mon Sep 17 00:00:00 2001 From: Kajal Katoke <94599733+Kajal-NEC@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:40:25 +0530 Subject: [PATCH 3/4] Update Overview.jsx --- .../webapp/source/src/app/components/Apis/Details/Overview.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Overview.jsx b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Overview.jsx index 8ad2d4a47cc..83498bcc489 100644 --- a/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Overview.jsx +++ b/portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Overview.jsx @@ -222,7 +222,7 @@ function Overview() { const restApi = new API(); return restApi.getDocumentsByAPIId(api.id) .then((response) => { - const overviewDoc = response.body.list.filter((item) => item.otherTypeName === '_overview'); + const overviewDoc = response.body.list.filter((item) => item.otherTypeName === 'overview'); if (overviewDoc.length > 0) { // We can override the UI with this content setOverviewDocOverride(overviewDoc[0]); // Only one doc we can render From b1a379ba59a2a1c7fb8f2a4f4e12bd4e0b126f96 Mon Sep 17 00:00:00 2001 From: Kajal Katoke <94599733+Kajal-NEC@users.noreply.github.com> Date: Mon, 18 Sep 2023 15:41:55 +0530 Subject: [PATCH 4/4] Update Listing.jsx --- .../src/app/components/Apis/Details/Documents/Listing.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Documents/Listing.jsx b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Documents/Listing.jsx index fbaa8d30f7c..acd0fb34955 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Documents/Listing.jsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Documents/Listing.jsx @@ -167,7 +167,7 @@ class Listing extends React.Component { const apiProduct = new APIProduct(); const docs = apiProduct.getDocuments(api.id); docs.then((response) => { - const documentList = response.body.list.filter((item) => item.otherTypeName !== '_overview'); + const documentList = response.body.list.filter((item) => item.otherTypeName !== 'overview'); documentList.sort(getSortOrder('name')); this.setState({ docs: documentList }); }).catch((errorResponse) => { @@ -184,7 +184,7 @@ class Listing extends React.Component { const newApi = new API(); const docs = newApi.getDocuments(api.id); docs.then((response) => { - const documentList = response.body.list.filter((item) => item.otherTypeName !== '_overview'); + const documentList = response.body.list.filter((item) => item.otherTypeName !== 'overview'); documentList.sort(getSortOrder('name')); this.setState({ docs: documentList }); }).catch((errorResponse) => { @@ -610,4 +610,4 @@ Listing.propTypes = { }).isRequired, }; -export default injectIntl(withAPI(withStyles(styles)(Listing))); \ No newline at end of file +export default injectIntl(withAPI(withStyles(styles)(Listing)));