Skip to content

Commit

Permalink
Add lib-api-bundle as replacement of lib-rest-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelinahristova committed Feb 25, 2021
1 parent a4d3d80 commit 93225db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2198,6 +2198,10 @@ We can use class name as service ID (or alias it) when we are providing open-sou
This allows others to use autowiring features if needed, even if we don't use them.
We should only use this for public services - ones that are to be used outside of our bundle.

Exception: for controllers we use classname as service ID.
> **Why?** Because routing annotations work only when controller's service ID is it's classname
> (otherwise it has no way to know it).

#### Autoconfiguration and autowiring

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

### REST controllers

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

Controller methods return entities or scalar variables.

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

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

Response is automatically normalized using normalizer related to the classname of the returned object.
We could override it with additional annotation, if needed.

### Extending model

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

0 comments on commit 93225db

Please sign in to comment.