-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbase.yaml
154 lines (154 loc) · 3.73 KB
/
base.yaml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
id: base.json
"$schema": "http://json-schema.org/draft-04/schema"
title: Base definitions for Grid content types
definitions:
uuid:
description: Unique identifier
format: uuid
pattern: "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
example: 01234567-89ab-cdef-0123-456789abcdef
type: string
url:
description: Unique Resource Locator
format: uri
example: http://thegrid.io
type: string
email:
description: Email address
format: email
example: '[email protected]'
type: string
hostname:
description: Hostname
format: hostname
example: 'blog.thegrid.io'
type: string
hexcolor:
description: "#RGB color"
format: rgbhexcolor
pattern: "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$"
example: "#aa33cc"
type: string
site:
type: string
example: "the-domains/the-grid"
pattern: "^[a-z0-9-_\\.]+\/[a-z0-9-_\\.]+$"
sites:
type: array
description: Collection of websites associated with the resource
items:
"$ref": "#/definitions/site"
uniqueItems: true
example:
- "the-domains/the-grid"
geo:
type: object
description: Geographical data
properties:
latitude:
name: latitude
type: number
description: Latitude coordinate
example: 45.5
longitude:
name: longitude
type: number
description: Longitude coordinate
example: -122.7
zoom:
name: zoom
type: number
description: Zoom level of map
example: 4.0
bbox:
type: object
properties:
x:
name: x
type: number
description: "Cartesian coordinate along x-axis"
example: 608.1907
y:
name: y
type: number
description: "Cartesian coordinate along y-axis"
example: 189.9090
width:
name: width
type: number
description: "Width"
example: 229.2087
height:
name: height
type: number
description: "Height"
example: 229.2087
tuplecolor:
type: array
description: "Tuple of RGB values representing a color"
items:
-
type: number
description: "Red channel"
example: 255
-
type: number
description: "Green channel"
example: 200
-
type: number
description: "Blue channel"
example: 190
point:
description: "Cartesian coordinate"
type: object
properties:
x:
name: x
type: number
description: "Value on x-axis"
example: 4.2
y:
name: y
type: number
description: "Value on y-axis"
example: 2.4
polygon:
description: "Coordinates of a polygon shape"
type: array
items:
"$ref": "#/definitions/point"
confidence:
description: "How much an extracted feature should be considered as a true
positive"
type: number
example: 5.08
# To be deprecated:
arraypoint:
description: "Coordinate in a 2D plane (warning: to be deprecated by `point`)"
type: array
items:
-
type: number
description: "Value on x-axis"
-
type: number
description: "Value on y-axis"
arraypolygon:
description: "Coordinates of a 2D polygon shape (warning: to be
deprecated by `polygon`)"
type: array
items:
"$ref": "#/definitions/arraypoint"
arrayrectangle:
description: "Coordinates of a 2D rectangle shape (warning: to be
deprecated by `bbox`)"
type: array
items:
-
"$ref": "#/definitions/arraypoint"
description: "Top-left point"
-
"$ref": "#/definitions/arraypoint"
description: "Bottom-right point"