Mercurial > pub > Impl
diff _test/Resources/sample.xml @ 224:e6c050db7d98
resources schema update
author | sergey |
---|---|
date | Wed, 29 Aug 2012 17:28:13 +0400 |
parents | edf011437be8 |
children | a1e868b0fba9 |
line wrap: on
line diff
--- a/_test/Resources/sample.xml Tue Aug 28 17:29:42 2012 +0400 +++ b/_test/Resources/sample.xml Wed Aug 29 17:28:13 2012 +0400 @@ -7,53 +7,45 @@ <resource> <name>projects</name> - <model expr="model"/> + <model expr="model" /> <get expr="model.projects" /> <post expr="model.CreateProject(project)"> - <var name="project" expr="BindModel()"/> - <response xsi:type="RedirectResponse"> - <locatorRef ref="projects-locator" /> + <var name="project"> + <transform class="IMPL::Web::Transform::BindModel" /> + </var> + <response> + <redirect> + <location locator="projects-locator" /> + </redirect> </response> </post> <resource> <match>(\w+)</match> - <model expr="model.GetProject(resourceId)"/> - - <get expr="model"/> + <model expr="model.GetProject(resourceId)" /> + + <get expr="model" /> <put expr="model.update(data)"> </put> - + <resource> - <name>library</name> - <model expr="model"/> - <get expr="model"/> + <name>library</name> + <model expr="model" /> + <get expr="model" /> </resource> <resource> - <name>sources</name> - <model expr="model"/> - <get expr="model"/> + <name>sources</name> + <model expr="model" /> + <get expr="model" /> </resource> </resource> </resource> </root> <contracts> - <contract id="project-contract"> - <modelType>Benzin::Model::Project</modelType> - <get/> - </contract> + <contract id="project-contract"> + <modelType>Benzin::Model::Project</modelType> + <get expr="model"/> + </contract> </contracts> - <locators> - <locator name="relative-locator"> - <var name="id" expr="model.id" /> - <var name="parent" expr="parent.location" /> - <template>$parent/$id</template> - </locator> - <locator name="projects-locator"> - <var name="id" expr="model.id" /> - <var name="projects" expr="application.locate('projects')" /> - <template>$projects/$id</template> - </locator> - </locators> </resources> \ No newline at end of file