forked from YousefED/typescript-json-schema
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.ts
90 lines (72 loc) · 1.37 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// All of these formats are defined in this specification: http://json-schema.org/latest/json-schema-validation.html#rfc.section.8.3
interface MyRef {}
interface MyObject {
/**
* @TJS-format date-time
*/
dateTime: string;
/**
* @TJS-format email
*/
email: string;
/**
* @TJS-format hostname
*/
hostname: string;
/**
* @TJS-format ipv4
*/
ipv4: string;
/**
* @TJS-format ipv6
*/
ipv6: string;
/**
* @TJS-format uri
*/
uri: string;
/**
* @TJS-format uri-reference
*/
uriReference: string;
/**
* @TJS-format uri-template
*/
uriTemplate: string;
/**
* @TJS-format json-pointer
*/
jsonPointer: string;
/**
* @TJS-pattern ^[a-zA-Z0-9]{4}-abc_123$
*/
regexPattern: string;
/**
* @TJS-pattern ^[a-zA-Z0-9]{4}-abc_123$
*/
regexPatternWithWhitespace: string;
/**
* @TJS-minimum 5
*/
oneCharacter: number;
/**
* @TJS-examples ["foo", 1]
*/
examples: string;
/**
* @TJS-hide
*/
booleanAnnotationDefaultValue: string;
/**
* @TJS-hide true
*/
booleanAnnotationWithTrue: string;
/**
* @TJS-hide false
*/
booleanAnnotationWithFalse: string;
/**
* @TJS-ignore
*/
complexWithRefIgnored: MyRef;
}