Closed njchandu closed 6 years ago
Yes, it's possible just like example.
No, I recommend using different key name. But you can if you create your own beanmother object https://github.com/keepcosmos/beanmother#customization
@keepcosmos My bad. 1) I noticed my example was not correct. I updated it now.
my:
book: &book
id: ${sequence.number}
title: ${faker.book.title}
language: en
publishedAt: ${faker.date.between('2000-01-01', '2010-01-01')}
author:
id: ${sequence.number}
works:
- <<: *book
- <<: *book
- <<: *book
somethingElse: bla
Here the root node is my
, is it possible to map object for book
and author
in this case? Apologies if the query is redundant.
It's not possible. key must be a root :), is there any usecase you want?
@keepcosmos I just realised that doesn't make sense. :) thanks for responding
Is it possible to create a bean object for an object which is not at the root level? Ex:
Is it possible to create a bean for a specific object in a specific file if there are duplicate yaml objects. Ex:
and