Comments (5)
If I get your point correctly, do you ask why some parts of apitte-skeleton, such as https://github.com/contributte/apitte-skeleton/blob/master/app/model/Api/Dispatcher/JsonDispatcher.php, is not part of apitte/core?
from apitte.
Yes
from apitte.
Basically what apitte/core allows me out of the box is piece of array *** while in some random sandbox which I didn't know about there is full featured serializer that allows me to return any DTO as response object from controller method. Those response objects can be nested and everything is typed and lovely. This option with serializer should be recommended default available in apitte/core <3
from apitte.
Before I discovered apitte sandbox I did it myself by extending DecoratedDispatcher
's negotiate
method with if (is_object) { return ObjectEntity::from($result); }
and implementing SerializerTransformer
that calls the symfony/serializer.
I don't know why you decided to put everything to dispatcher I don't think it is it's work to serialize responses. Aren't there transformers to do this job? I'm not nitpicking btw even if it may sound like so. It just confused me when I saw your solution for the first time. I thought my solution was bad usage of apitte and that I should do it in different way.
from apitte.
Closing here. Feel free to open it.
from apitte.
Related Issues (20)
- Method signature instead of RequestParameters HOT 1
- Returns 500 when creating an entity HOT 1
- Custom parameter mapping types HOT 5
- RequestParameter datetime validation HOT 2
- FileResponseAdjuster should implement just PSR-7 response
- Feedback on [email protected] HOT 8
- [Deprecated] Mapping AbstractEntity getIterator method return type
- OpenApi schema type issue: integer vs. int (validation problem) HOT 2
- OpenApi (OAS3) datetime -> date-time mapping type HOT 1
- Fatal Error: During inheritance of IteratorAggregate HOT 2
- Unlock `doctrine/annotations`
- OpenApi / responses / links
- New release v0.11.0 HOT 1
- No matched route by given URL HOT 10
- `x-codeSamples` is omitted when present in OpenAPI annotation HOT 1
- Nette DI: suspicious dumping of objects Apitte\OpenApi\SchemaDefinition\BaseDefinition when generating the container HOT 1
- EntityAdapter, private properties, doctrine entity
- Issues with Middleware/CORS HOT 2
- Extension to enhance all apitte controllers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apitte.