Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
♻️ slugs should be a bit closer to how it looks in production
Browse files Browse the repository at this point in the history
  • Loading branch information
dok committed Jun 21, 2019
1 parent e26d64e commit 017a590
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/api-explorer/lib/create-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ module.exports = (oas, apiSetting) => {
docs.push({
_id: Math.random().toString(16),
title: operation.summary || path || tag,
slug: tag,
slug: path
.replace(/^\W|\W$/, '')
.replace(/\W+/g, '-')
.replace(/^\W|\W$/, ''),
type: 'endpoint',
category: { apiSetting },
api: {
Expand Down

0 comments on commit 017a590

Please sign in to comment.