From a5eaee6caba941935074e659f30544e3a8b547b3 Mon Sep 17 00:00:00 2001 From: Eugene <50055047+geny200@users.noreply.github.com> Date: Mon, 13 May 2024 17:32:57 +0300 Subject: [PATCH] Updated documentation for useElementNameAsDiscriminator according to issue --- .../main/scala/phobos/configured/ElementCodecConfig.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/scala/phobos/configured/ElementCodecConfig.scala b/modules/core/src/main/scala/phobos/configured/ElementCodecConfig.scala index 0d2d933..8c68f54 100644 --- a/modules/core/src/main/scala/phobos/configured/ElementCodecConfig.scala +++ b/modules/core/src/main/scala/phobos/configured/ElementCodecConfig.scala @@ -43,7 +43,10 @@ import phobos.Namespace * "http://www.w3.org/2001/XMLSchema-instance", as defined in https://www.w3.org/TR/xmlschema-1/#xsi_type * @param useElementNameAsDiscriminator * Forces codecs to use element name as sealed trait discriminator, instead of special attribute. This setting - * overrides [[discriminatorLocalName]] and [[discriminatorNamespace]]. Default value is "false". + * overrides [[discriminatorLocalName]] and [[discriminatorNamespace]]. Default value is "false". Warning: You must + * use the "@default" annotation (see [[phobos.syntax.default]]) to fields with type for which + * [[useElementNameAsDiscriminator]] set as "true". See + * [[https://github.com/valentiay/phobos/blob/master/modules/core/src/main/scala/phobos/configured/ElementCodecConfig.scala#L44 issue]] * @param transformConstructorNames * Function to transform constructor names, that are used as sealed trait discriminator. No transformation is applied * by default.