microsoft / microsoft/typespec

Make @example a known doc tag

Open
#1,453 1 comment 4 reactions 0 assignees View on GitHub
compiler:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

# Proposal

Add `@example` as a known tag with the following format

First line is the title (optional - if line is empty then there is no title)
Rest is the tag content

```cadl
/**
* @example First line is example title
* rest is
* example
* content
*
*/
```

woudl result in the following

```json5
{
title: "First line is example title",
content: "rest is\nexample\ncontent",
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.