Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Validate $.status is one of the following (inactive | entered_in_error)

    1. in case of error - return 422 ("value is not allowed in enum")

  2. If $.status = inactive check that equipment.availability_status one of the following (damaged | destroyed | lost)

    1. in case of error - return 409 ("It is prohibited to change status for equipment with availability status = {equipment.availability_status}")

Error_reason

If equipment status changes to entered_in_error attribute error_reason is required

...