-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: preserve empty
@description
(#1177)
- Loading branch information
Showing
4 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* @comment Top level comment | ||
*/ | ||
export interface MyObject extends Base { | ||
/** | ||
* @description | ||
* @markdownDescription | ||
* Use this **field** for: | ||
* - show markdown | ||
* - show `code` | ||
* - show **bold** | ||
*/ | ||
field: Base["field"]; | ||
} | ||
|
||
interface Base { | ||
/** | ||
* @description Do not show this message. | ||
*/ | ||
field: string; | ||
|
||
/** | ||
* Product name. | ||
*/ | ||
name: string; | ||
} |
26 changes: 26 additions & 0 deletions
26
test/valid-data/annotation-description-override/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"$ref": "#/definitions/MyObject", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"MyObject": { | ||
"$comment": "Top level comment", | ||
"additionalProperties": false, | ||
"properties": { | ||
"field": { | ||
"description": "", | ||
"markdownDescription": "Use this **field** for:\n- show markdown\n- show `code`\n- show **bold**", | ||
"type": "string" | ||
}, | ||
"name": { | ||
"description": "Product name.", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"field", | ||
"name" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} |