Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

  • Check that value is in allowed active values from device_definition_classification_type dictionary.

    • in case of error - return 422 ('value is not allowed in enum')

...

  • Check that $.properties.type is in allowed values from device_properties dictionary.

    • in case of error - return 422 ('value is not allowed in enum')

  • Check $.properties.value[x] is one of the following: value_integer, value_decimal, value_boolean, value_string

    • in case of value[x] is missing - return 422 ('One and only one key is allowed from the list: [value_integer, value_decimal, value_boolean, value_string], but the following are present: [].')

    • in case of more than one value[x] provided - return 422 ('One and only one key is allowed from the list: [value_integer, value_decimal, value_boolean, value_string], but the following are present: [value[x], value[x], …].')

    • in case of value[x] is provided with incorrect type - return 422 ('type mismatch. Expected <expected_type> but got <actual_type>')

  • Check config DEVICE_PROPERTY_DICTIONARIES - if device property is associated with dictionary in this configuration parameter

    • only value_string is allowed for this property

      • in case of error - return 422 ('Only value_string is allowed for dictionary values')

    • check that value_string is one of the corresponding dictionary for this property

      • in case of error - return 422 ('value is not allowed in enum')

11. Validate inventory number

...