Anchors are supported to some degree, but only for cases where Object Id handling is explicitly specified for value type with `@JsonIdentityInfo`, and I don't think this is done for most config values for dropwizard configuration. Problem here is that enabling identity also requires specification of an id property for values; if such a property exists, fine, if not, one would need to be added.
General purpose transparent resolution of anchors/references is not supported by Jackson YAML module. You could probably implement a pre-processing step to do expansion first, then feeding resulting "flattened" input back to dropwizard. -+ Tatu +- On Mon, Jun 19, 2017 at 7:30 AM, Tommy Becker <[email protected]> wrote: > Does anyone have an example of YAML anchors/references actually working in > a Dropwizard app? We have a couple of config values that are duplicated in > a few places in the config, and I would very much like to use anchors/refs > to deduplicate it. From what little I have been able to find it seems like > it should work, but for the life of me I can't get it to. I've annotated > with @JsonIdentityInfo, and Jackson seems to recognize the anchors in that > it strips them out of the config, but the references are not replaced > properly, "*foo" gets replaced by simply "foo" for example. Any ideas? > > -- > You received this message because you are subscribed to the Google Groups > "dropwizard-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
