-
Notifications
You must be signed in to change notification settings - Fork 1
/
trellis.schema.cts
66 lines (63 loc) · 1.73 KB
/
trellis.schema.cts
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
/**
* @license
* Copyright 2022 Open Ag Data Alliance
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
import type { JSONSchema8 as Schema } from 'jsonschema8';
const schema = {
$id: 'https://formats.openag.io/trellis.schema.json',
$schema: 'http://json-schema.org/draft-07/schema#',
definitions: {
location: {
description:
'location describes the postal address used to identify where something is.',
properties: {
street_address: {
$ref: '#/definitions/street_address',
},
postal_code: {
$ref: '#/definitions/postal_code',
},
city: {
$ref: '#/definitions/city',
},
state: {
$ref: '#/definitions/state',
},
country: {
$ref: '#/definitions/country',
},
},
},
street_address: {
description: 'The street name and mailbox number of a postal address.',
type: 'string',
},
postal_code: {
description: 'postal_code is the postal code used in a postal address',
type: 'string',
},
city: {
description: 'The name of the city, usually in a postal address.',
type: 'string',
},
state: {
description:
'The name of the state or major region, usually in a postal address.',
type: 'string',
},
country: {
description: 'The name of the country, usually in a postal address.',
type: 'string',
},
phone: {
description:
'phone describes the phone number with country code and area code.',
type: 'string',
},
},
} as const satisfies Schema;
export = schema;