Kind: Function
Source: atloria-monorepo/libs/parser-core/src/openapi/doc-annotations.ts
Split authored text into the one-line summary and everything after it.
The split point is the first sentence end or the first line break, whichever comes first — which is how every doc-comment convention in every language here already reads.
The description === undefined case is the important one. @ApiOperation({ summary: 'Get the current user' }) is a single sentence with nothing after it, and echoing it into both
fields makes the reader render the same words twice, which looks like a generator bug rather
than like documentation. So a body with no remainder yields a summary and NOTHING else.
Signature
tsfunction splitSummaryAndBody(text: string): { summary?: string; description?: string }
Parameters
| Name | Type |
|---|---|
text | string |
Returns: { summary?: string; description?: string }
Was this page helpful?