32bit Integer Data Type

An int32 data type tests data for being an instance of python's built-in class int and has a value within -2147483648 and 2147483647.

If using int32 data type with allowed values and no conversion defined, check enum data type as a better option.

Features/Limitations

  • Validate minimal and maximal data value
  • Validate against allowed and not allowed value ranges
  • Validate against allowed and not allowed integer values
  • Supports Referencing Feature

32bit Integer Definition Syntax

Table

Key/Option Type Default Value Restrictions Description
type str 'int32'
description str Data type description
default_value Must match data type's type(s) Value used to set as default value
convert_to str Allowed values:
- float
- str
minimum int Value must be greater or equal
maximum int >= 'minimum' Value must be lower or equal
allowed_ranges list[dict] min length: 1 Value must be within defined ranges
  - start int required
    end int required
not_allowed_ranges list[dict] Value mustn't be within defined ranges
  - start int required
    end int required
allowed_values list Data must match one of these values
  - < value > int Must match data type's type(s)
not_allowed_values list Data mustn't match all of these values
  - < value > int Must match data type's type(s)
template str must be definded in schema Merge options from this template
template_merge_options dict Define schema-global template merge instructions
    recursive bool True Merge data type definition options in template options recursively.
If false, data type defintion options overwrites template options.
    list_merge str append_rp Allowed values:
- append
- append_rp
- prepend
- prepend_rp
- replace
How lists within options data should be merged.
reference dict|str
  option 1 str Reference keys (implies unique global mode)
  option 2 dict
  key str required
  mode str Allowed values:
- unique
- producer
- consumer
  unique_scope str Allowed values:
- global
- namespace
  producer_scope str Allowed values:
- global
- namespace
  consumer_scope str Allowed values:
- global
- namespace
  allow_orphan_producer bool True
  credit int 1 (if mode consumer) min: 0
references list[dict|str]
  - dict|str
    option 1 str Reference keys (implies unique global mode)
    option 2 dict
    key str required
    mode str Allowed values:
- unique
- producer
- consumer
    unique_scope str Allowed values:
- global
- namespace
    producer_scope str Allowed values:
- global
- namespace
    consumer_scope str Allowed values:
- global
- namespace
    allow_orphan_producer bool True
    credit int 1 (if mode consumer) min: 0
doc_value_name str Set value name for documentation

YAML

type: int32
description: <str>
default_value: <default_value>

convert_to: <float|str>
maximum: <int>
minimum: <int>
allowed_ranges:
 - start: <int>
   end: <int>
not_allowed_ranges:
 - start: <int>
   end: <int>
allowed_values:
  - <int>
not_allowed_values:
  - <int>

template: <str>
template_merge_options:
  recursive: <true|false>
  list_merge: <append|append_rp|prepend|prepend_rp|replace>

reference: <reference_definition>
  # Multitype!!!
  <str>
  # or:
  key: <str>
  mode: <unique|producer|consumer>
  unique_scope: <global|namespace>
  producer_scope: <global|namespace>
  consumer_scope: <global|namespace>
  allow_orphan_producer: <true|false>
  credits: <int>
references:
  - <reference_definition>
    # Multitype!!!
    <str>
    # or
    key: <str>
    mode: <unique|producer|consumer>
    unique_scope: <global|namespace>
    producer_scope: <global|namespace>
    consumer_scope: <global|namespace>
    allow_orphan_producer: <true|false>
    credits: <int>

doc_value_name: <str>

Example

type: int32
description: "Example int32 definition"

minimum: -3
maximum: 100000

not_allowed_values:
  - 101
  - 102

reference:
  key: ref_key
  mode: consumer