| 1 |
<?xml version="1.0" ?> |
| 2 |
|
| 3 |
<xsd:schema xmlns="http://symfony.com/schema/dic/serializer-mapping" |
| 4 |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| 5 |
targetNamespace="http://symfony.com/schema/dic/serializer-mapping" |
| 6 |
elementFormDefault="qualified"> |
| 7 |
|
| 8 |
<xsd:annotation> |
| 9 |
<xsd:documentation><![CDATA[ |
| 10 |
Symfony Serializer Mapping Schema, version 1.0 |
| 11 |
Authors: Kévin Dunglas, Samuel Roze |
| 12 |
|
| 13 |
A serializer mapping connects attributes with serialization groups. |
| 14 |
]]></xsd:documentation> |
| 15 |
</xsd:annotation> |
| 16 |
|
| 17 |
<xsd:element name="serializer" type="serializer" /> |
| 18 |
|
| 19 |
<xsd:complexType name="serializer"> |
| 20 |
<xsd:annotation> |
| 21 |
<xsd:documentation><![CDATA[ |
| 22 |
The root element of the serializer mapping definition. |
| 23 |
]]></xsd:documentation> |
| 24 |
</xsd:annotation> |
| 25 |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| 26 |
<xsd:element name="class" type="class" /> |
| 27 |
</xsd:choice> |
| 28 |
</xsd:complexType> |
| 29 |
|
| 30 |
<xsd:complexType name="class"> |
| 31 |
<xsd:annotation> |
| 32 |
<xsd:documentation><![CDATA[ |
| 33 |
Contains serialization groups for a single class. |
| 34 |
|
| 35 |
Nested elements may be class property and/or getter definitions. |
| 36 |
]]></xsd:documentation> |
| 37 |
</xsd:annotation> |
| 38 |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| 39 |
<xsd:element name="attribute" type="attribute" minOccurs="0" maxOccurs="unbounded" /> |
| 40 |
<xsd:element name="discriminator-map" type="discriminator-map" /> |
| 41 |
</xsd:choice> |
| 42 |
<xsd:attribute name="name" type="xsd:string" use="required" /> |
| 43 |
</xsd:complexType> |
| 44 |
|
| 45 |
<xsd:complexType name="discriminator-map"> |
| 46 |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| 47 |
<xsd:element name="mapping" type="discriminator-map-mapping" maxOccurs="unbounded" /> |
| 48 |
</xsd:choice> |
| 49 |
<xsd:attribute name="type-property" type="xsd:string" use="required" /> |
| 50 |
<xsd:attribute name="default-type" type="xsd:string" /> |
| 51 |
</xsd:complexType> |
| 52 |
|
| 53 |
<xsd:complexType name="discriminator-map-mapping"> |
| 54 |
<xsd:attribute name="type" type="xsd:string" use="required" /> |
| 55 |
<xsd:attribute name="class" type="xsd:string" use="required" /> |
| 56 |
</xsd:complexType> |
| 57 |
|
| 58 |
<xsd:complexType name="attribute"> |
| 59 |
<xsd:annotation> |
| 60 |
<xsd:documentation><![CDATA[ |
| 61 |
Contains serialization groups and max depth for attributes. The name of the attribute should be given in the "name" option. |
| 62 |
]]></xsd:documentation> |
| 63 |
</xsd:annotation> |
| 64 |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> |
| 65 |
<xsd:element name="group" type="xsd:string" maxOccurs="unbounded" /> |
| 66 |
<xsd:element name="context" type="context" maxOccurs="unbounded" /> |
| 67 |
<xsd:element name="normalization_context" type="context" maxOccurs="unbounded" /> |
| 68 |
<xsd:element name="denormalization_context" type="context" maxOccurs="unbounded" /> |
| 69 |
</xsd:choice> |
| 70 |
<xsd:attribute name="name" type="xsd:string" use="required" /> |
| 71 |
<xsd:attribute name="max-depth"> |
| 72 |
<xsd:simpleType> |
| 73 |
<xsd:restriction base="xsd:integer"> |
| 74 |
<xsd:minInclusive value="0" /> |
| 75 |
</xsd:restriction> |
| 76 |
</xsd:simpleType> |
| 77 |
</xsd:attribute> |
| 78 |
<xsd:attribute name="serialized-name"> |
| 79 |
<xsd:simpleType> |
| 80 |
<xsd:restriction base="xsd:string"> |
| 81 |
<xsd:minLength value="1" /> |
| 82 |
</xsd:restriction> |
| 83 |
</xsd:simpleType> |
| 84 |
</xsd:attribute> |
| 85 |
<xsd:attribute name="serialized-path"> |
| 86 |
<xsd:simpleType> |
| 87 |
<xsd:restriction base="xsd:string"> |
| 88 |
<xsd:minLength value="1" /> |
| 89 |
</xsd:restriction> |
| 90 |
</xsd:simpleType> |
| 91 |
</xsd:attribute> |
| 92 |
<xsd:attribute name="ignore" type="xsd:boolean" /> |
| 93 |
</xsd:complexType> |
| 94 |
|
| 95 |
<xsd:complexType name="context"> |
| 96 |
<xsd:choice maxOccurs="unbounded"> |
| 97 |
<xsd:element name="group" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> |
| 98 |
<xsd:element name="entry" type="context-root-entry" maxOccurs="unbounded" /> |
| 99 |
</xsd:choice> |
| 100 |
</xsd:complexType> |
| 101 |
|
| 102 |
<xsd:complexType name="context-root-entry" mixed="true"> |
| 103 |
<xsd:sequence minOccurs="0"> |
| 104 |
<xsd:element name="entry" type="context-entry" maxOccurs="unbounded" /> |
| 105 |
</xsd:sequence> |
| 106 |
<xsd:attribute type="xsd:string" name="name" use="required" /> |
| 107 |
</xsd:complexType> |
| 108 |
|
| 109 |
<xsd:complexType name="context-entry" mixed="true"> |
| 110 |
<xsd:sequence minOccurs="0"> |
| 111 |
<xsd:element name="entry" type="context-entry" maxOccurs="unbounded" /> |
| 112 |
</xsd:sequence> |
| 113 |
<xsd:attribute type="xsd:string" name="name" /> |
| 114 |
</xsd:complexType> |
| 115 |
|
| 116 |
</xsd:schema> |