Comments (4)
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.
Optionally it may generate an async version using https://github.com/amphp/aerys
from janephp.
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.
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)
- Denormalizing invalid date or datetime results in TypeError HOT 1
- Allow openapi-file to be an URL
- BadRequestException is not marked abstract
- OAS 3.1: Declaring type as array results in TypeError (for nullable types) HOT 1
- Classes referenced as strings instead of via ::class
- Missing "default" response models when using "whitelisted-paths"
- Empty String for Date
- Warning: Undefined array key "" produces an Uncaught TypeError
- Content-Type `application/json;charset=UTF-8` is not serialized/deserialized as JSON
- Error in BodyParameterGenerator::convertParameterType when generating HOT 1
- PHP Warning: Undefined array key "object" in /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Parameter/NonBodyParameterGenerator.php on line 197
- Bump symfony/serializer to 7.0 in jane-php/open-api-runtime HOT 1
- Consider allowing int for `number` type
- Direct dependency php-http/message-factory is abandoned HOT 2
- Bump nikic/php-parser to latest version HOT 1
- Jane 7.6.0 relies on Symfony 7.0? HOT 1
- Wrong type for array
- Endpoints uri's are not relative to the server>url
- OpenAPI 3.0 binary string format not supported properly HOT 2
- Nullable required properties during denormalization
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 janephp.