Skip to content

Commit

Permalink
Don't generate pages for untitled routes and ednpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Nov 19, 2024
1 parent 6d234a8 commit 53dd97e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export const reference = (
}

for (const route of blueprint.routes ?? []) {
if (route.isUndocumented) continue

if (
!route.path.startsWith('/acs') &&
!route.path.startsWith('/thermostats') &&
Expand All @@ -46,6 +44,9 @@ export const reference = (
continue
}

if (route.isUndocumented) continue
if (pathMetadata[route.path]?.title == null) continue

const k = `api${route.path}/README.md`
files[k] = {
contents: Buffer.from('\n'),
Expand All @@ -56,6 +57,7 @@ export const reference = (

for (const endpoint of route.endpoints) {
if (endpoint.isUndocumented) continue
if (endpoint.title.length === 0) continue

const k = `api${endpoint.path}.md`
files[k] = {
Expand Down

0 comments on commit 53dd97e

Please sign in to comment.