File tree 5 files changed +51
-0
lines changed
5 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -492,6 +492,21 @@ interface MyObject {
492
492
```
493
493
494
494
495
+ ## [ comments-comment] ( ./test/programs/comments-comment )
496
+
497
+ ``` ts
498
+ /**
499
+ * @$comment Object comment
500
+ */
501
+ interface MyObject {
502
+ /**
503
+ * @$comment Property comment
504
+ */
505
+ text: string ;
506
+ }
507
+ ```
508
+
509
+
495
510
## [ comments-from-lib] ( ./test/programs/comments-from-lib )
496
511
497
512
``` ts
@@ -607,6 +622,15 @@ export interface MyObject {
607
622
```
608
623
609
624
625
+ ## [ const-as-enum] ( ./test/programs/const-as-enum )
626
+
627
+ ``` ts
628
+ export interface MyObject {
629
+ reference: true ;
630
+ }
631
+ ```
632
+
633
+
610
634
## [ const-keyword] ( ./test/programs/const-keyword )
611
635
612
636
``` ts
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @$comment Object comment
3
+ */
4
+ interface MyObject {
5
+ /**
6
+ * @$comment Property comment
7
+ */
8
+ text : string ;
9
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " http://json-schema.org/draft-07/schema#" ,
3
+ "additionalProperties" : false ,
4
+ "$comment" : " Object comment" ,
5
+ "properties" : {
6
+ "text" : {
7
+ "$comment" : " Property comment" ,
8
+ "type" : " string"
9
+ }
10
+ },
11
+ "required" : [
12
+ " text"
13
+ ],
14
+ "type" : " object"
15
+ }
16
+
Original file line number Diff line number Diff line change @@ -371,6 +371,7 @@ describe("schema", () => {
371
371
372
372
describe ( "comments" , ( ) => {
373
373
assertSchema ( "comments" , "MyObject" ) ;
374
+ assertSchema ( "comments-comment" , "MyObject" ) ;
374
375
assertSchema ( "comments-override" , "MyObject" ) ;
375
376
assertSchema ( "comments-imports" , "MyObject" , {
376
377
aliasRef : true ,
Original file line number Diff line number Diff line change @@ -426,6 +426,7 @@ const validationKeywords = {
426
426
$ref : true ,
427
427
id : true ,
428
428
$id : true ,
429
+ $comment : true ,
429
430
title : true
430
431
} ;
431
432
You can’t perform that action at this time.
0 commit comments