Skip to content

fix(): Update documentation to reflect changes in XML operations conf… #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 33 additions & 24 deletions core/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Operations can be configured using annotations, XML or YAML. In the following ex
for the `GET` method for both `collectionOperations` and `itemOperations` to create a readonly endpoint.

`itemOperations` and `collectionOperations` are arrays containing a list of operation. Each operation is defined by a key
corresponding to the name of the operation that can be anything you want and an array of properties as value.
corresponding to the name of the operation that can be anything you want and an array of properties as value. If an
empty list of operations is provided, all operations are disabled.

<configurations>

Expand Down Expand Up @@ -87,12 +88,16 @@ AppBundle\Entity\Book:
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<resource class="AppBundle\Entity\Book">
<itemOperation name="get">
<attribute name="method">GET</attribute>
</itemOperation>
<collectionOperation name="get">
<attribute name="method">GET</attribute>
</collectionOperation>
<itemOperations>
<itemOperation name="get">
<attribute name="method">GET</attribute>
</itemOperation>
</itemOperations>
<collectionOperations>
<collectionOperation name="get">
<attribute name="method">GET</attribute>
</collectionOperation>
</collectionOperations>
</resource>
</resources>
```
Expand Down Expand Up @@ -150,17 +155,19 @@ AppBundle\Entity\Book:
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<resource class="AppBundle\Entity\Book">
<itemOperation name="get">
<attribute name="method">GET</attribute>
<attribute name="path">/grimoire/{id}</attribute>
</itemOperation>
<itemOperation name="put">
<attribute name="method">PUT</attribute>
<attribute name="path">/grimoire/{id}/update</attribute>
<attribute name="hydra_context">
<attribute name="foo">bar</attribute>
</attribute>
</itemOperation>
<itemOperations>
<itemOperation name="get">
<attribute name="method">GET</attribute>
<attribute name="path">/grimoire/{id}</attribute>
</itemOperation>
<itemOperation name="put">
<attribute name="method">PUT</attribute>
<attribute name="path">/grimoire/{id}/update</attribute>
<attribute name="hydra_context">
<attribute name="foo">bar</attribute>
</attribute>
</itemOperation>
</itemOperations>
</resource>
</resources>
```
Expand Down Expand Up @@ -230,12 +237,14 @@ AppBundle\Entity\Book:
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<resource class="AppBundle\Entity\Book">
<itemOperation name="get">
<attribute name="method">GET</attribute>
</itemOperation>
<itemOperation name="special">
<attribute name="route_name">book_special</attribute>
</itemOperation>
<itemOperations>
<itemOperation name="get">
<attribute name="method">GET</attribute>
</itemOperation>
<itemOperation name="special">
<attribute name="route_name">book_special</attribute>
</itemOperation>
</itemOperations>
</resource>
</resources>
```
Expand Down