https://example.com/schemas/simpletypes
This is an example schema with examples for multiple types and their constraints.
Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
---|---|---|---|---|---|---|---|
Can be instantiated | No | Unknown status | No | Forbidden | Allowed | none | simpletypes.schema.json |
object
(Simple Types)
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
string_unconstrained | string |
Optional | cannot be null | Simple Types |
string_length | string |
Optional | cannot be null | Simple Types |
string_pattern | string |
Optional | cannot be null | Simple Types |
string_pattern_noexample | string |
Optional | cannot be null | Simple Types |
string_pattern_singleexample | string |
Optional | cannot be null | Simple Types |
string_date | string |
Optional | cannot be null | Simple Types |
string_email | string |
Optional | cannot be null | Simple Types |
string_hostname | string |
Optional | cannot be null | Simple Types |
string_ipv4 | string |
Optional | cannot be null | Simple Types |
string_ipv6 | string |
Optional | cannot be null | Simple Types |
string_uri | string |
Optional | cannot be null | Simple Types |
number_unconstrained | number |
Optional | cannot be null | Simple Types |
interger_unconstrained | integer |
Optional | cannot be null | Simple Types |
interger_constrained | integer |
Optional | cannot be null | Simple Types |
number_constrained | number |
Optional | cannot be null | Simple Types |
integer_threes | integer |
Optional | cannot be null | Simple Types |
yesno | boolean |
Required | cannot be null | Simple Types |
A simple string, without any constraints.
string_unconstrained
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
"bar"
A string with minumum and maximum length
string_length
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
maximum length: the maximum number of characters for this string is: 3
minimum length: the minimum number of characters for this string is: 3
"bar"
"baz"
A string following a regular expression
string_pattern
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
pattern: the string must match the following regular expression:
^ba.$
"bar"
"baz"
"bat"
A string following a regular expression
string_pattern_noexample
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
pattern: the string must match the following regular expression:
^ba.$
A string following a regular expression
string_pattern_singleexample
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
pattern: the string must match the following regular expression:
^ba.$
"bar"
A date-like string.
string_date
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
date time: the string must be a date time string, according to RFC 3339, section 5.6
An email-like string.
string_email
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
email: the string must be an email address, according to RFC 5322, section 3.4.1
A hostname-like string.
string_hostname
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
hostname: the string must be a hostname, according to RFC 1123, section 2.1
An IPv4-like string.
string_ipv4
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
IPv4: the string must be an IPv4 address (dotted quad), according to RFC 2673, section 3.2
An IPv6-like string.
string_ipv6
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
IPv6: the string must be an IPv6 address, according to RFC 4291, section 2.2
A URI.
string_uri
-
is optional
-
Type:
string
-
cannot be null
-
defined in: Simple Types
string
URI: the string must be a URI, according to RFC 3986
Just a number
number_unconstrained
-
is optional
-
Type:
number
-
cannot be null
-
defined in: Simple Types
number
Just a whole number. I don't like fractions.
interger_unconstrained
-
is optional
-
Type:
integer
-
cannot be null
-
defined in: Simple Types
integer
Just a whole number. I don't like fractions. Don't get too small
interger_constrained
-
is optional
-
Type:
integer
-
cannot be null
-
defined in: Simple Types
integer
minimum: the value of this number must greater than or equal to: 10
Just a number. Don't get too big.
number_constrained
-
is optional
-
Type:
number
-
cannot be null
-
defined in: Simple Types
number
maximum (exclusive): the value of this number must be smaller than: 10
Guess what number is valid
integer_threes
-
is optional
-
Type:
integer
-
cannot be null
-
defined in: Simple Types
integer
multiple of: the value of this number must be a multiple of: 3
maximum: the value of this number must smaller than or equal to: 4
minimum: the value of this number must greater than or equal to: 2
yesno
-
is required
-
Type:
boolean
-
cannot be null
-
defined in: Simple Types
boolean