Skip to content

Commit

Permalink
Skip adding undocumented stuff to the missing title section
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Nov 22, 2024
1 parent ef2479b commit c20992b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function processRoute(route: Route, report: Report, metadata: Metadata): void {
'pathMetadata' in metadata
? PathMetadataSchema.parse(metadata.pathMetadata)
: {}
if (pathMetadata[route.path]?.title == null) {
if (pathMetadata[route.path]?.title == null && !route.isUndocumented) {
report.noTitle.routes.push({ name: route.path })
}

Expand Down Expand Up @@ -269,7 +269,7 @@ function processEndpoint(endpoint: Endpoint, report: Report): void {
report.endpointsWithoutCodeSamples.push(endpoint.path)
}

if (endpoint.title.length === 0) {
if (endpoint.title.length === 0 && !endpoint.isUndocumented) {
report.noTitle.endpoints.push({ name: endpoint.path })
}

Expand Down

0 comments on commit c20992b

Please sign in to comment.