vaimee / zion

A scalable Thing Description Directory
Apache License 2.0
17 stars 4 forks source link

13 missing check on put thingsid create to prevent a different id in the body #17

Closed ivanzy closed 2 years ago

ivanzy commented 2 years ago

When a new TD is created via the PUT /things/{id} endpoint, it checks if the id in the body matches the one in the URL. Otherwise, it throws the following exception:

{
  "type": "/errors/types/mismatch-id-expection",
  "title": "Mismatch ID",
  "status": 400,
  "detail": "The id specified in the URL does not match the id in the Thing Description body"
}