Skip to content

Generate

The generate command is used to generate code for your Serinus project. This command is used to generate the following:

Sub-CommandDescription
modelsGenerate a model provider class for your project.
controllerGenerate a controller class for your project.
providerGenerate a provider class for your project.
moduleGenerate a module class for your project
resourceGenerate a controller, a provider and a module for your project
clientGenerate a client for your project

Models

The models sub-command is used to generate a model provider class for your project. This class is used to convert JSON objects to Dart objects and vice versa.

It also execute build_runner to generate the necessary files. This allows you to use libraries like json_serializable, dart_mappable, freezed to generate your data classes.

This commands can also be tweaked thanks to the configuration in the pubspec.yaml file. Here you can see the available options.

Client

The client sub-command is used to generate a client for your project. The client provide an immediate way to interact with your API from your frontend application.

Right now the client supports the following languages and libraries:

LanguageLibrarySupport
Dartdio

The team is also working on adding support for other languages and libraries.

This commands can also be tweaked thanks to the configuration in the pubspec.yaml file. Here you can see the available options.

Built with 💙 and Dart 🎯 | One of the 🐤 of Avesbox