Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 4446e1e

Browse files
authored
Merge pull request #42 from symfony-cmf/xml-schema
Added XSD
2 parents d47ba25 + 77e13a1 commit 4446e1e

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/DependencyInjection/CmfResourceRestExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public function getNamespace()
4848
return 'http://cmf.symfony.com/schema/dic/'.$this->getAlias();
4949
}
5050

51+
public function getXsdValidationBasePath()
52+
{
53+
return __DIR__.'/../Resources/config/schema';
54+
}
55+
5156
/**
5257
* Automatically include native enhancers.
5358
*/
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xsd:schema xmlns="http://cmf.symfony.com/schema/dic/resource-rest"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
targetNamespace="http://cmf.symfony.com/schema/dic/resource-rest"
5+
elementFormDefault="qualified">
6+
7+
<xsd:element name="config" type="config" />
8+
9+
<xsd:complexType name="config">
10+
<xsd:sequence>
11+
<xsd:element name="payload-alias" type="payload_alias" minOccurs="0" />
12+
<xsd:element name="enhance" type="enhance" minOccurs="0" />
13+
</xsd:sequence>
14+
15+
<xsd:attribute name="max-depth" type="xsd:integer" default="2" />
16+
</xsd:complexType>
17+
18+
<xsd:complexType name="payload_alias">
19+
<xsd:attribute name="repository" type="xsd:string" />
20+
<xsd:attribute name="type" type="xsd:string" />
21+
</xsd:complexType>
22+
23+
<xsd:complexType name="enhance">
24+
<xsd:attribute name="repository" type="xsd:string" use="required" />
25+
<xsd:attribute name="enhancer" type="xsd:string" use="required" />
26+
</xsd:complexType>
27+
28+
</xsd:schema>
29+

0 commit comments

Comments
 (0)