Skip to content

parseDocComment

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/openapi/doc-annotations.ts

Parse a @tag-style doc comment — JSDoc, Javadoc, PHPDoc, KDoc, or a swaggo // run.

raw may still carry its comment syntax; pass the style it was written in.

Free text before the first tag is the summary/description. Tags are read for the four things a spec can carry: explicit summary/description overrides, per-parameter prose, and the return/success prose that becomes the 200 description.

Signature

ts
function parseDocComment(raw: string, style: CommentStyle): AuthoredDocs

Parameters

NameType
rawstring
styleCommentStyle

Returns: AuthoredDocs

Was this page helpful?

Download as PDF