ismop/dap

Profile levee_id is not id but something more

Closed this issue · 10 comments

According to DAP documentation Profile#levee_id returned by REST API should be: "identifier of the levee the profile belongs to". It is something more. Take a look at sample result:

"levee_id":{
  "id":1,"name":"Obwałowanie eksperymentalne - Czernichów",
  "emergency_level":"none",
  "threat_level":"none",
  "threat_level_updated_at":"2016-05-30T09:25:20.229Z",
  "base_height":211.0
}

Most probably it was made for same reason - @nowakowski, @dharezlak do you know the story behind it? In eitwid I don't see any mapping between this field and POJO

It propose to:

  • if needed update documentation, otherwise levee_id should return only levee id
  • if these values are required rename levee_id into something more meaningful (e.g. levee)

This can be a cause of #131

You're right; the entire levee object is serialized instead of just the ID. Might have been done on purpose. ;) If I change this to return the ID, will it break the UI?

Most probably no since this field is not serialized by pojo I linked, but I'm not sure if it is not used by "porownywaczka" - @mpawlik, @tbartynski can you check it?

I browsed profile serializer history and this change is made by @bwilk in ddea3b2. @bwilk do you remember why this change was introduced?

Porównywaczka does not use levees so it won't be affected.

Ping @bwilk (again).

Just spotted this again. @bwilk: are you reading these notifications? Looks like this issue could be quickly fixed but we need your input!

bwilk commented

There is nothing more I can say about it - does it satisfy the issuer?