Passed logistics objects are validated
As a user, I'd like to make sure that the logistics object I have passed for creation is syntactically correct and valid.
Please note: Since the validation introduces the first business logic here, this story also involves the initialization of an appropriate unit test framework.
Acceptance criteria
- Logistics object passed via POST request is validated against given schema (API ontology and Cargo ontology). Invalid logistic objects are rejected with status "400 Bad Request".
- Request body in PATCH requests are validated against the schema. The update is only performed, if the resulting object (after the update was perfomed) will be valid according to the schema. Otherwise, the request will be rejected with status code 400 (bad request).
- Validation covered by (unit) tests.
- Unit tests are executed by CI/CD pipeline. Pipeline fails upon test failure.
Edited by Volker Wassmuth