Closed timotheeguerin closed 7 months ago
@timotheeguerin please add an estimate
Note: the DPG 1.0 Requirement is just for any breaking changes required for this support to be implemented
Closing in favor of https://github.com/microsoft/typespec/issues/2970
Probably would want a
@cadl-lang/xml
library which would add a few more decorators.Azure Notification Hubs has many APIs that are Atom+XML based which is not easy to describe using CADL directly. Instead, I would prefer to model an object directly such as a
RegistrationDescription
as the desired state, and transform into Atom+XML entry and feed format directly.For example, I could describe a
RegistrationDescription
andAppleRegistrationDescription
as the following:These models, should have the
platform
property removed, and serialized into a Atom+XML entry with Pascal case properties such as the following.And in the case of
list
methods, should be wrapped in an Atom+XML feed such as the following:This should support CDATA, namespaces, attributes and other pieces such as the following possible annotations:
@xmlAttribute("name")
@xmlElement("name")
@xmlCdata("CDataElement")
@xmlNamespace("i", "http://www.w3.org/2001/XMLSchema-instance")
@xmlArrayItem("Results", "Result")