forked from invopop/jsonschema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
101 lines (88 loc) · 3.71 KB
/
const.go
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
package jsonschema
const (
keywordSep = ","
keywordArraySep = ";"
keywordKeyValueSep = "="
kwDefault = "default"
kwFormat = "format"
kwPattern = "pattern"
kwTitle = "title"
kwDescription = "description"
kwExample = "example"
kwAnchor = "anchor"
kwEnum = "enum"
kwDeprecated = "deprecated"
kwMinLength = "minLength"
kwMaxLength = "maxLength"
kwExclusiveMinimum = "exclusiveMinimum"
kwExclusiveMaximum = "exclusiveMaximum"
kwMinimum = "minimum"
kwMaximum = "maximum"
kwMinItems = "minItems"
kwMaxItems = "maxItems"
kwUniqueItems = "uniqueItems"
kwMultipleOf = "multipleOf"
kwType = "type"
kwAnyOfType = "anyof_type"
kwOneOfType = "oneof_type"
kwAnyOfRequired = "anyof_required"
kwOneOfRequired = "oneof_required"
kwOmitEmpty = "omitempty"
kwNullable = "nullable"
kwReadOnly = "readOnly"
kwWriteOnly = "writeOnly"
valueT = "t"
valueTrue = "true"
valueFalse = "false"
tagJSON = "json"
tagJSONSchema = "jsonschema"
tagJSONSchemaDescription = "jsonschema_description"
tagJSONSchemaExtras = "jsonschema_extras"
tagRequired = "required"
)
const (
// TypeString represents the string JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/string.html#string for more information.
TypeString = "string"
// TypeNumber represents the numeric JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/numeric.html#number for more information.
TypeNumber = "number"
// TypeInteger represents the integer JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/numeric.html#integer for more information.
TypeInteger = "integer"
// TypeObject represents the object JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/object.html#object for more information.
TypeObject = "object"
// TypeArray represents the object JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/array.html#array for more information.
TypeArray = "array"
// TypeBoolean represents the boolean JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/boolean.html#boolean for more information.
TypeBoolean = "boolean"
// TypeNull represents the null JSON Schema type.
// See https://json-schema.org/understanding-json-schema/reference/null.html#null for more information.
TypeNull = "null"
)
// A built-in string format.
// See https://json-schema.org/understanding-json-schema/reference/string.html#built-in-formats for more information.
const (
FormatStringDateTime = "date-time"
FormatStringTime = "time"
FormatStringDate = "date"
FormatStringDuration = "duration"
FormatStringEmail = "email"
FormatStringInternationalizedEmail = "idn-email"
FormatStringHostname = "hostname"
FormatStringInternationalizedHostname = "idn-hostname"
FormatStringIPv4 = "ipv4"
FormatStringIPv6 = "ipv6"
FormatStringUUID = "uuid"
FormatStringURI = "uri"
FormatStringURIReference = "uri-reference"
FormatStringURITemplate = "uri-template"
FormatStringIRI = "iri"
FormatStringIRIReference = "iri-reference"
FormatStringRegex = "regex"
FormatStringJSONPointer = "json-pointer"
FormatStringRelativeJSONPointer = "relative-json-pointer"
)