https://linen.dev logo
d

Debraj Manna

06/13/2023, 5:38 PM
In the example under Bulk importing stubs I can see one mapping has an
id
and the other one has no
id
? Can someone let me know 1. what is the importance of
id
? 2. What happens if no
id
is specified? Does wiremock generate one for the mapping if no
id
is specified?
t

Tom

06/13/2023, 6:39 PM
Yes,
id
is generated if not present so you don’t need to set one. It can be useful to do so if you later want to use it for an update or delete.
👍 1
d

Debraj Manna

06/14/2023, 9:47 AM
A related question, when i generate the mapping via record and replay I see an
id
as well as
uuid
field both having the same value. Do I need to specify
uuid
also if i am specifying
id
in my mapping?
o

Oleg Nenashev

06/14/2023, 10:33 AM
From what I see in the code, no
t

Tom

06/14/2023, 11:16 AM
No,
uuid
is there for backwards compatibility reasons and will disappear, probably in 3.x
👍 1