francescovallone / serinus

Serinus is a minimalistic framework for building efficient and scalable backend applications powered by Dart. 🎯
https://serinus.app
MIT License
41 stars 3 forks source link

feat: generate client for Serinus Applications #61

Open francescovallone opened 2 months ago

francescovallone commented 2 months ago

Allow the CLI to generate a HTTP Client easily usable from a Flutter application.

The following is an allowed way to do a request to a Serinus application using the generated client.

application_name.controller_name.route(path_parameters, query_parameters, body);

The path parameters by default are Strings, but if they are defined as other types in the route then they will be of that specific type.

All the calls are treated, for obvious reasons, as Future

francescovallone commented 3 weeks ago

The verbosity of the method can probably be a flag in the configuration file or in the command tbh: verbose mode: getUsersDetailsByIdAndName non-verbose (default): getUsersDetails

The flag will be --verbose and it can be overridden by the configuration in the pubspec.yaml file