-
Notifications
You must be signed in to change notification settings - Fork 27
/
patterns.schema.json
65 lines (65 loc) · 2.49 KB
/
patterns.schema.json
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
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://opawg.org/patterns",
"title": "OPAWG patterns file, used for matching User-Agent or Referer headers to identity podcast user agents.",
"description": "Top-level file, containing a list of named entries, their associated regular expression patterns, and other properties",
"type": "object",
"properties": {
"comments": {
"type": "array",
"description": "Usage notes about this file.",
"items": {
"type": "string"
}
},
"entries": {
"type": "array",
"description": "Ordered list of named entries, their associated regular expression patterns, and other properties.",
"items": {
"type": "object",
"required": [ "name", "pattern" ],
"properties": {
"name": {
"type": "string",
"description": "Name of this entry, must be unique within the file."
},
"pattern": {
"type": "string",
"description": "Regular expression pattern identifying this entry. For max compatibility: avoid lookaheads or programming-language-specific character classes. Example: \"^MyThing/\""
},
"description": {
"type": "string",
"description": "Optional summary description of this entry."
},
"svg": {
"type": "string",
"description": "Optional associated icon filename as found in the svg directory. Example: \"my-thing.svg\""
},
"comments": {
"description": "Optional notes about this entry.",
"type": "string"
},
"examples": {
"type": "array",
"description": "Optional examples found in the wild that this entry is intended to match against, useful for pattern development and automated testing.",
"items": {
"type": "string"
}
},
"urls": {
"type": "array",
"description": "One or more optional informational urls about this entry. Example: \"https://my-thing.example.com\"",
"items": {
"type": "string",
"format": "uri"
}
},
"category": {
"type": "string",
"description": "Optional category for this entry, depends on the type of the containing entry file (e.g. \"mobile\" in the 'devices' file, or \"app\" in the 'referrers' file)."
}
}
}
}
}
}