You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/getting-started.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,6 +143,12 @@ class Offer
143
143
It is the minimal configuration required to expose `Product` and `Offer` entities as JSON-LD documents through an hypermedia
144
144
web API.
145
145
146
+
**Tip**: if you create your entities with Symfony's [MakerBundle](https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html), you can also create your API resource entities with the `--api-resource` argument:
147
+
148
+
```sh
149
+
php bin/console make:entity --api-resource
150
+
```
151
+
146
152
If you are familiar with the Symfony ecosystem, you noticed that entity classes are also mapped with Doctrine ORM annotations
147
153
and validation constraints from [the Symfony Validator Component](http://symfony.com/doc/current/book/validation.html).
148
154
This isn't mandatory. You can use [your preferred persistence](data-providers.md) and [validation](validation.md) systems.
0 commit comments