Skip to content

Commit f9ffa11

Browse files
Merge pull request #12 from ivelinahristova/master
Add lib-api-bundle as replacement of lib-rest-bundle
2 parents a4d3d80 + 93225db commit f9ffa11

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,10 @@ We can use class name as service ID (or alias it) when we are providing open-sou
21982198
This allows others to use autowiring features if needed, even if we don't use them.
21992199
We should only use this for public services - ones that are to be used outside of our bundle.
22002200

2201+
Exception: for controllers we use classname as service ID.
2202+
> **Why?** Because routing annotations work only when controller's service ID is it's classname
2203+
> (otherwise it has no way to know it).
2204+
22012205
#### Autoconfiguration and autowiring
22022206

22032207
We don't use autowiring and autoconfiguration features of Dependency Injection component.
@@ -3120,7 +3124,7 @@ Keep in mind that there are different skeletons for WEB, REST API and processing
31203124

31213125
### REST controllers
31223126

3123-
For REST controllers, we use [`PayseraRestBundle`](https://github.com/paysera/lib-rest-bundle) and normalizers.
3127+
For REST controllers, we use [`PayseraApiBundle`](https://github.com/paysera/lib-api-bundle) and normalizers.
31243128

31253129
Controller methods return entities or scalar variables.
31263130

@@ -3134,6 +3138,9 @@ We can use plain normalizer or plain item normalizer if needed.
31343138

31353139
We use result provider to give `Result` entities from REST controller.
31363140

3141+
Response is automatically normalized using normalizer related to the classname of the returned object.
3142+
We could override it with additional annotation, if needed.
3143+
31373144
### Extending model
31383145

31393146
In server side we do not use subclasses and class-maps - we use services that give or process needed information.

0 commit comments

Comments
 (0)