In the example under <Bulk importing stubs> I can ...
# general
d
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
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.
👍 2
o
I guess something for the format definition spec or for the JSON Schema
d
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
From what I see in the code, no
t
No,
uuid
is there for backwards compatibility reasons and will disappear, probably in 3.x
👍 1