Skip to main content
Version: Latest (0.60.x)

[T] NameDecorator

type NameDecorator: (context, target, name) => void;

Provide the name of the XML element or attribute. This means the same thing as @encodedName("application/xml", value)

Parameters

ParameterTypeDescription
contextDecoratorContext-
targetType-
namestringThe name of the XML element or attribute

Returns

void

Example

@name("XmlBook")
model Book {
@name("XmlId") id: string;
@encodedName("application/xml", "XmlName") name: string;
content: string;
}
<XmlBook>
<XmlId>string</XmlId>
<XmlName>string</XmlName>
<content>string</content>
</XmlBook>