Giter VIP home page Giter VIP logo

Comments (5)

f3l1x avatar f3l1x commented on September 13, 2024

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.

northys avatar northys commented on September 13, 2024

Yes

from apitte.

northys avatar northys commented on September 13, 2024

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.

northys avatar northys commented on September 13, 2024

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.

f3l1x avatar f3l1x commented on September 13, 2024

Closing here. Feel free to open it.

from apitte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.