I define one yaml file with a key that is built on its own:
name: Things
. . . snip . . .
key:
data:
build: `thing::${faker.random.number({ min: 10000000, max: 50000000, precision: 1})}`
. . . etc . . .
I then define another yaml file with a dependency on the first. I want one of its properties to refer to a random Thing by key. But it doesn't look like I can refer to the key, only the properties:
name: Boxes
data:
dependencies:
- things.yaml
. . . snip . . .
properties:
thingId:
data:
build: faker.random.arrayElement(documents.Things).someProperty
. . . etc . . .
So, I could make an id property in Things, and make that property the key, but I don't want _id to actually be stored as a property. Is there any way around this?
I define one yaml file with a key that is built on its own:
I then define another yaml file with a dependency on the first. I want one of its properties to refer to a random Thing by key. But it doesn't look like I can refer to the key, only the properties:
So, I could make an id property in Things, and make that property the key, but I don't want _id to actually be stored as a property. Is there any way around this?