- {cleanPathKey(key)}
+ {key}
{Object.entries(value).map(([key, value]) => (
diff --git a/src/templates/Swagger/Toc.jsx b/src/templates/Swagger/Toc.jsx
index 7bc2e8b0..31d62322 100644
--- a/src/templates/Swagger/Toc.jsx
+++ b/src/templates/Swagger/Toc.jsx
@@ -9,29 +9,47 @@ import stylesSidebar from '../../components/Sidebar.module.scss'
const Toc = ({ data }) => {
const Ids = []
- const items = Object.keys(data.paths).map((key) => {
- Ids.push(slugify(cleanPathKey(key)))
+ const itemsV1 = Object.keys(data.paths)
+ .filter((key) => key.startsWith('/api/v1/aquarius'))
+ .map((key) => {
+ Ids.push(slugify(key))
- return (
-
-
- {cleanPathKey(key)}
-
-
- )
- })
+ return (
+
+
+ {cleanPathKey(key)}
+
+
+ )
+ })
+ const itemsOther = Object.keys(data.paths)
+ .filter((key) => !key.startsWith('/api/v1/aquarius'))
+ .map((key) => {
+ Ids.push(slugify(key))
+
+ return (
+
+
+ {key}
+
+
+ )
+ })
return (
- {items}
+ /api/v1/aquarius
+
+ {itemsOther.length ? (
+ <>
+ Other REST endpoints
+
+ >
+ ) : null}
)
}
diff --git a/src/templates/Swagger/utils.js b/src/templates/Swagger/utils.js
index 7db3edaf..cee1a678 100644
--- a/src/templates/Swagger/utils.js
+++ b/src/templates/Swagger/utils.js
@@ -4,10 +4,5 @@ export const cleanPathKey = (key) => {
if (key.includes('aquarius')) {
keyCleaned = key.replace(/\/api\/v1\/aquarius/gi, '')
}
-
- if (key.includes('brizo')) {
- keyCleaned = key.replace(/\/api\/v1\/brizo/gi, '')
- }
-
return keyCleaned
}