serializer-mapping-1.0.xsd 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" ?>
  2. <xsd:schema xmlns="http://symfony.com/schema/dic/serializer-mapping"
  3. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  4. targetNamespace="http://symfony.com/schema/dic/serializer-mapping"
  5. elementFormDefault="qualified">
  6. <xsd:annotation>
  7. <xsd:documentation><![CDATA[
  8. Symfony Serializer Mapping Schema, version 1.0
  9. Authors: Kévin Dunglas, Samuel Roze
  10. A serializer mapping connects attributes with serialization groups.
  11. ]]></xsd:documentation>
  12. </xsd:annotation>
  13. <xsd:element name="serializer" type="serializer" />
  14. <xsd:complexType name="serializer">
  15. <xsd:annotation>
  16. <xsd:documentation><![CDATA[
  17. The root element of the serializer mapping definition.
  18. ]]></xsd:documentation>
  19. </xsd:annotation>
  20. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  21. <xsd:element name="class" type="class" />
  22. </xsd:choice>
  23. </xsd:complexType>
  24. <xsd:complexType name="class">
  25. <xsd:annotation>
  26. <xsd:documentation><![CDATA[
  27. Contains serialization groups for a single class.
  28. Nested elements may be class property and/or getter definitions.
  29. ]]></xsd:documentation>
  30. </xsd:annotation>
  31. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  32. <xsd:element name="attribute" type="attribute" minOccurs="0" maxOccurs="unbounded" />
  33. <xsd:element name="discriminator-map" type="discriminator-map" />
  34. </xsd:choice>
  35. <xsd:attribute name="name" type="xsd:string" use="required" />
  36. </xsd:complexType>
  37. <xsd:complexType name="discriminator-map">
  38. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  39. <xsd:element name="mapping" type="discriminator-map-mapping" maxOccurs="unbounded" />
  40. </xsd:choice>
  41. <xsd:attribute name="type-property" type="xsd:string" use="required" />
  42. </xsd:complexType>
  43. <xsd:complexType name="discriminator-map-mapping">
  44. <xsd:attribute name="type" type="xsd:string" use="required" />
  45. <xsd:attribute name="class" type="xsd:string" use="required" />
  46. </xsd:complexType>
  47. <xsd:complexType name="attribute">
  48. <xsd:annotation>
  49. <xsd:documentation><![CDATA[
  50. Contains serialization groups and max depth for attributes. The name of the attribute should be given in the "name" option.
  51. ]]></xsd:documentation>
  52. </xsd:annotation>
  53. <xsd:sequence minOccurs="0">
  54. <xsd:element name="group" type="xsd:string" maxOccurs="unbounded" />
  55. </xsd:sequence>
  56. <xsd:attribute name="name" type="xsd:string" use="required" />
  57. <xsd:attribute name="max-depth">
  58. <xsd:simpleType>
  59. <xsd:restriction base="xsd:integer">
  60. <xsd:minInclusive value="0" />
  61. </xsd:restriction>
  62. </xsd:simpleType>
  63. </xsd:attribute>
  64. <xsd:attribute name="serialized-name">
  65. <xsd:simpleType>
  66. <xsd:restriction base="xsd:string">
  67. <xsd:minLength value="1" />
  68. </xsd:restriction>
  69. </xsd:simpleType>
  70. </xsd:attribute>
  71. <xsd:attribute name="ignore" type="xsd:boolean" />
  72. </xsd:complexType>
  73. </xsd:schema>