Generate struct as xml when `mediatTypeHint` decorator applied
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
> Migrated from https://github.com/Azure/autorest.go/issues/1974
---
Model currently not generating as xml even when `mediaTypeHint` decorator applied, generating as json instead
definition models.tsp:
```
/** An encoded string value. */
@mediaTypeHint("application/xml")
model StringEncoded {
/** Whether the value is encoded. */
@Xml.attribute
@Xml.name("Encoded")
encoded?: boolean;
/** The string content. */
@Xml.unwrapped content?: string;
}
```
client.tsp:
```
@@usage(StringEncoded, Usage.output, "go");
```
typespec definition: https://github.com/Azure/azure-rest-api-specs/blob/291f7acea0af046a95187310f01ab2822764b86c/specification/storage/data-plane/FileStorage/models.tsp#L548
Contributor guide
Assessment
This issue has not been assessed yet.