Skip to content

v0.10.16

Compare
Choose a tag to compare
@robshakir robshakir released this 18 Jun 20:09
· 251 commits to master since this release
dbe2718
  • Add support for a new marshalling option that allows the module prefix applied to JSON output serialised according to RFC7951 to be removed.

This specifically handles a case whereby YANG augmentations are used to handle backwards compatibility. For example, in the schema "openconfig-foo" if leaf bar was removed, and consumers of the generated GoStructs are using this field - a compatibility approach is to create a module which augments openconfig-foo to add leaf bar back in - perhaps in some module acme-corp-compatibility. In this case, the JSON produced by Marshal7951 with AppendModuleName = true would use this prefix acme-corp-compatibility, this change allows the user to specifically force it to be rewritten to openconfig-foo again to maintain compatibility with a particular downstream consumer.