[T] UnwrappedDecorator
type UnwrappedDecorator: (context, target) => void;Specify that the target property shouldn’t create a wrapper node. This can be used to flatten list nodes into the model node or to include raw text in the model node.
It cannot be used with @attribute.
Parameters
| Parameter | Type |
|---|---|
context | DecoratorContext |
target | ModelProperty |
Returns
void
Examples
model Pet { tags: Tag[];}<XmlPet> <ItemsTags> <XmlTag> <name>string</name> </XmlTag> </ItemsTags></XmlPet>model Pet { @unwrapped tags: Tag[];}<XmlPet> <XmlTag> <name>string</name> </XmlTag></XmlPet>model BlobName { content: string;}<BlobName> <content> abcdef </content></BlobName>model BlobName { @unwrapped content: string;}<BlobName> abcdef</BlobName>