[T] UnwrappedDecorator
type UnwrappedDecorator = (context, target) => DecoratorValidatorCallbacks | 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
Section titled “Parameters”| Parameter | Type |
|---|---|
context | DecoratorContext |
target | ModelProperty |
Returns
Section titled “Returns”DecoratorValidatorCallbacks | void
Examples
Section titled “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>