Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / is-my-json-valid / test / fixtures / cosmic.js
1 exports.valid = {
2   fullName : "John Doe",
3   age : 47,
4   state : "Massachusetts",
5   city : "Boston",
6   zip : 16417,
7   married : false,
8   dozen : 12,
9   dozenOrBakersDozen : 13,
10   favoriteEvenNumber : 14,
11   topThreeFavoriteColors : [ "red", "blue", "green" ],
12   favoriteSingleDigitWholeNumbers : [ 7 ],
13   favoriteFiveLetterWord : "coder",
14   emailAddresses :
15   [
16     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@letters-in-local.org",
17     "01234567890@numbers-in-local.net",
18     "&'*+-./=?^_{}~@other-valid-characters-in-local.net",
19     "mixed-1234-in-{+^}-local@sld.net",
20     "a@single-character-in-local.org",
21     "\"quoted\"@sld.com",
22     "\"\\e\\s\\c\\a\\p\\e\\d\"@sld.com",
23     "\"quoted-at-sign@sld.org\"@sld.com",
24     "\"escaped\\\"quote\"@sld.com",
25     "\"back\\slash\"@sld.com",
26     "one-character-third-level@a.example.com",
27     "single-character-in-sld@x.org",
28     "local@dash-in-sld.com",
29     "letters-in-sld@123.com",
30     "one-letter-sld@x.org",
31     "uncommon-tld@sld.museum",
32     "uncommon-tld@sld.travel",
33     "uncommon-tld@sld.mobi",
34     "country-code-tld@sld.uk",
35     "country-code-tld@sld.rw",
36     "local@sld.newTLD",
37     "the-total-length@of-an-entire-address.cannot-be-longer-than-two-hundred-and-fifty-four-characters.and-this-address-is-254-characters-exactly.so-it-should-be-valid.and-im-going-to-add-some-more-words-here.to-increase-the-lenght-blah-blah-blah-blah-bla.org",
38     "the-character-limit@for-each-part.of-the-domain.is-sixty-three-characters.this-is-exactly-sixty-three-characters-so-it-is-valid-blah-blah.com",
39     "local@sub.domains.com"
40   ],
41   ipAddresses : [ "127.0.0.1", "24.48.64.2", "192.168.1.1", "209.68.44.3", "2.2.2.2" ]
42 }
43
44 exports.invalid = {
45   fullName : null,
46   age : -1,
47   state : 47,
48   city : false,
49   zip : [null],
50   married : "yes",
51   dozen : 50,
52   dozenOrBakersDozen : "over 9000",
53   favoriteEvenNumber : 15,
54   topThreeFavoriteColors : [ "red", 5 ],
55   favoriteSingleDigitWholeNumbers : [ 78, 2, 999 ],
56   favoriteFiveLetterWord : "codernaut",
57   emailAddresses : [],
58   ipAddresses : [ "999.0.099.1", "294.48.64.2346", false, "2221409.64214128.42414.235233", "124124.12412412" ]
59 }
60
61 exports.schema = { // from cosmic thingy
62     name : "test",
63     type : "object",
64     additionalProperties : false,
65     required : ["fullName", "age", "zip", "married", "dozen", "dozenOrBakersDozen", "favoriteEvenNumber", "topThreeFavoriteColors", "favoriteSingleDigitWholeNumbers", "favoriteFiveLetterWord", "emailAddresses", "ipAddresses"],
66     properties :
67     {
68       fullName                        : { type : "string" },
69       age                             : { type : "integer", minimum : 0 },
70       optionalItem                    : { type : "string" },
71       state                           : { type : "string" },
72       city                            : { type : "string" },
73       zip                             : { type : "integer", minimum : 0, maximum : 99999 },
74       married                         : { type : "boolean" },
75       dozen                           : { type : "integer", minimum : 12, maximum : 12 },
76       dozenOrBakersDozen              : { type : "integer", minimum : 12, maximum : 13 },
77       favoriteEvenNumber              : { type : "integer", multipleOf : 2 },
78       topThreeFavoriteColors          : { type : "array", minItems : 3, maxItems : 3, uniqueItems : true, items : { type : "string" }},
79       favoriteSingleDigitWholeNumbers : { type : "array", minItems : 1, maxItems : 10, uniqueItems : true, items : { type : "integer", minimum : 0, maximum : 9 }},
80       favoriteFiveLetterWord          : { type : "string", minLength : 5, maxLength : 5 },
81       emailAddresses                  : { type : "array", minItems : 1, uniqueItems : true, items : { type : "string", format : "email" }},
82       ipAddresses                     : { type : "array", uniqueItems : true, items : { type : "string", format : "ipv4" }},
83     }
84   }