diff --git a/src/templates/ApiSwagger.jsx b/src/templates/ApiSwagger.jsx index 13694b67..f6e4ad40 100644 --- a/src/templates/ApiSwagger.jsx +++ b/src/templates/ApiSwagger.jsx @@ -12,12 +12,27 @@ import SEO from '../components/Seo' import stylesDoc from './Doc.module.scss' import styles from './ApiSwagger.module.scss' +const cleanKey = key => { + let keyCleaned = 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 +} + const toc = api => { const items = Object.keys(api.paths).map( - key => - `
${key}
- ${cleanKey(
+ key
+ )}
+ {key}
+ {cleanKey(key)}