Git Product home page Git Product logo

Comments (4)

fbourigault avatar fbourigault commented on June 20, 2024 1

In my company, we started a new project which is OpenAPI first. We first wrote the schema which defines the contract and now, we are building the server. We currently use jane-openapi to build models and normalizer for the server.

Sadly, jane-openapi also generate the client and the endpoints.

Then for server generation, I would like to use some ADR generator with actions which use Symfony HttpFoundation Request/Response and would use Symfony messenger to send messages into the application and implement CQRS pattern.

Someone would probably use PSR7 instead of HttpFoundation and juste generate some XML routes which map paths to hand written controllers.

As a first step in the direction of a server generator, I would like to allow generators to be configured.

This would solve the generate only the models and the normalizers from an openapi file but neither the client nor the endpoints.
This would also allow to generate a Symfony HTTP Client instead of the PSR-7 one.
This would allow server generation or just a routing configuration or some test data from samples.

This configuration could also allow the use of custom generators to allow users to generate anything they have in mind.

What do you think?

from janephp.

joelwurtz avatar joelwurtz commented on June 20, 2024

Optionally it may generate an async version using https://github.com/amphp/aerys

from janephp.

MichaelKubovic avatar MichaelKubovic commented on June 20, 2024

Hey, I'd like to contribute to this feature. I could start with the controller interfaces. Although I like the flexibility of separate interface for each endpoint, I would like to be able to optionally group them by resource. Ideally I'd like to have UserControllerInterface, CarControllerInterface, etc. Tags could be used for this purpose, what do you think?

from janephp.

Korbeil avatar Korbeil commented on June 20, 2024

First of all, glad you take jane to power up your project 🚀

In case server feature comes, there will be a client mode with what we have today, and a server mode which won't generate stuff you don't want but only server-side related stuff 😉

I totally agree with Request/Response based on Symfony HttpFoundation they're both powerfull and fit to what we do need.
About Symfony Messenger I'll prefer that we have adapters that does connect to whatever you want: Messenger indeed, events or event Controller. Idea is to let the user choose what he prefer, for example: I never used Messenger and I would prefer a Controller adapter approach.

About Symfony HTTP Client or PSR-7, I'll prefer PSR-7 approach since HTTP Client does support PSR-7 and I prefer to be compatible with most of possible implementations instead of just one.

from janephp.

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.