Function
getDescriptionOrIdentifier
(ast: AST.PropertySignature | AST.AST)
Source from the content-addressed store, hash-verified
| 433 | } |
| 434 | |
| 435 | const getDescriptionOrIdentifier = (ast: AST.PropertySignature | AST.AST): Option.Option<string> => { |
| 436 | const annotations = "to" in ast ? |
| 437 | { |
| 438 | ...ast.to.annotations, |
| 439 | ...ast.annotations |
| 440 | } : |
| 441 | ast.annotations |
| 442 | return Option.fromNullable(annotations[AST.DescriptionAnnotationId] ?? annotations[AST.IdentifierAnnotationId] as any) |
| 443 | } |
| 444 | |
| 445 | /** |
| 446 | * Adds additional schemas to components/schemas. |
Tested by
no test coverage detected