Default encoding of scalars
As in Json we have some default handling of the common scalars like utcDateTime
Scalar Type | Default Encoding | Encoding name |
---|
utcDateTime | xs:dateTime | TypeSpec.Xml.Encoding.xmlDateTime |
offsetDateTime | xs:dateTime | TypeSpec.Xml.Encoding.xmlDateTime |
plainDate | xs:date | TypeSpec.Xml.Encoding.xmlDate |
plainTime | xs:time | TypeSpec.Xml.Encoding.xmlTime |
duration | xs:duration | TypeSpec.Xml.Encoding.xmlDuration |
bytes | xs:base64Binary | TypeSpec.Xml.Encoding.xmlBase64Binary |
Examples
1. Array of primitive types
TypeSpec |
Xml |
OpenAPI3 |
|
|
|
|
|
|
|
|
|
|
|
|
2. Complex array types
TypeSpec |
Xml |
OpenAPI3 |
|
|
|
|
|
|
|
|
|
|
|
|
3. Nested models
TypeSpec |
Xml |
OpenAPI3 |
|
|
|
|
|
|
|
|
|
4. Attributes
TypeSpec |
Xml |
OpenAPI3 |
|
|
|
TypeSpec |
Xml |
OpenAPI3 |
|
|
|
|
|
|
TypeSpec |
Xml |
OpenAPI3 |
|
|
|
|
|
|
6. Property setting the text of the node
TypeSpec |
Xml |
OpenAPI3 |
|
|
|