@devlearning/swagger-generator 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +6 -0
- package/README.md +4 -2
- package/autogen/identity/api/identity_api.dart +82 -0
- package/autogen/identity/models/auth_activate_command.dart +14 -0
- package/autogen/identity/models/auth_app_authenticate_command.dart +16 -0
- package/autogen/identity/models/auth_generate_reset_password_code_command.dart +15 -0
- package/autogen/identity/models/auth_refresh_token_command.dart +15 -0
- package/autogen/identity/models/auth_reset_password_command.dart +16 -0
- package/autogen/identity/models/auth_user_authenticate_command.dart +15 -0
- package/autogen/identity/models/auth_user_dto.dart +18 -0
- package/autogen/identity/models/auth_verify_reset_password_code_command.dart +14 -0
- package/autogen/identity/models/authentication_token.dart +17 -0
- package/autogen/mvc/models/problem_details.dart +17 -0
- package/autogen/service_defaults/models/application_exception.dart +14 -0
- package/autogen/service_defaults/models/result.dart +17 -0
- package/autogen/user_profile/api/user_profile_api.dart +46 -0
- package/autogen/user_profile/models/test_list_query.dart +13 -0
- package/autogen/user_profile/models/test_read_query.dart +13 -0
- package/autogen/user_profile/models/test_save_command.dart +13 -0
- package/autogen/user_profile/models/user_general_info_save_command.dart +13 -0
- package/dist/generator.js +63 -31
- package/dist/generators-writers/angular/api-angular-writer.js +1 -1
- package/dist/generators-writers/dart/api-dart-writer.js +110 -0
- package/dist/generators-writers/dart/model-dart-writer.js +124 -0
- package/dist/generators-writers/dart/models/import-definition-dart.js +1 -0
- package/dist/generators-writers/dart/normalizator.js +35 -0
- package/dist/generators-writers/nextjs/api-nextjs-writer.js +1 -1
- package/dist/generators-writers/utils.js +39 -1
- package/dist/index.js +72 -16
- package/dist/models/swagger/swagger-component-property.js +10 -0
- package/dist/models/swagger/swagger-component.js +1 -0
- package/dist/models/swagger/swagger-schema.js +1 -0
- package/package.json +11 -5
- package/src/generator.ts +67 -38
- package/src/generators-writers/angular/api-angular-writer.ts +1 -1
- package/src/generators-writers/dart/api-dart-writer.ts +164 -0
- package/src/generators-writers/dart/model-dart-writer.ts +176 -0
- package/src/generators-writers/dart/models/import-definition-dart.ts +6 -0
- package/src/generators-writers/dart/normalizator.ts +44 -0
- package/src/generators-writers/dart/templates/api.mustache +29 -0
- package/src/generators-writers/dart/templates/model.mustache +18 -0
- package/src/generators-writers/nextjs/api-nextjs-writer.ts +1 -1
- package/src/generators-writers/utils.ts +46 -1
- package/src/index.ts +80 -16
- package/src/models/api-dto.ts +1 -0
- package/src/models/model-dto.ts +1 -0
- package/src/models/swagger/swagger-component-property.ts +10 -9
- package/src/models/swagger/swagger-component.ts +11 -2
- package/src/models/swagger/swagger-schema.ts +18 -6
- package/src/models/swagger/swagger.ts +1 -0
- package/autogeneration/output/api.autogenerated.ts +0 -95
- package/autogeneration/output/model.autogenerated.ts +0 -69
package/.vscode/launch.json
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Swagger Generator for Angular
|
|
1
|
+
# Swagger Generator for Angular, Next.js and Flutter
|
|
2
2
|
|
|
3
|
-
This tool automates the generation of API clients for Angular
|
|
3
|
+
This tool automates the generation of API clients for Angular, Next.js and Flutter using a Swagger (OpenAPI) specification. It creates TypeScript models and service classes, making API integration seamless and type-safe.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -9,6 +9,7 @@ This tool automates the generation of API clients for Angular and Next.js using
|
|
|
9
9
|
- 🎯 **Framework-Specific Output**:
|
|
10
10
|
- **Angular** – Generates injectable services using `HttpClient`.
|
|
11
11
|
- **Next.js** – Provides fetch-based or Axios-based API functions, optimized for both server-side and client-side usage.
|
|
12
|
+
- **Flutter** – Provides Flutter with Dio API functions, optimized for both server-side and client-side usage.
|
|
12
13
|
- ✅ **Strong Typing** – Ensures type safety for API requests and responses.
|
|
13
14
|
- ⚡ **Customization** – Configurable options for method naming, error handling, and request structure.
|
|
14
15
|
- 🔄 **Auto-Sync with Backend** – Keeps API clients up-to-date with backend changes.
|
|
@@ -31,6 +32,7 @@ params:
|
|
|
31
32
|
- type of date management:
|
|
32
33
|
- angular only support momentjs, sorry :(
|
|
33
34
|
- nextjs only support date-fns
|
|
35
|
+
- dart native date management
|
|
34
36
|
|
|
35
37
|
create output path like this: src/app/core/autogenerated
|
|
36
38
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import 'package:coqudo_app/core/di/injector.dart';
|
|
2
|
+
import 'package:dio/dio.dart';
|
|
3
|
+
import 'package:coqudo_app/autogen/identity/models/auth_app_authenticate_command.dart';
|
|
4
|
+
import 'package:coqudo_app/autogen/identity/models/authentication_token.dart';
|
|
5
|
+
import 'package:coqudo_app/autogen/identity/models/auth_user_authenticate_command.dart';
|
|
6
|
+
import 'package:coqudo_app/autogen/identity/models/auth_refresh_token_command.dart';
|
|
7
|
+
import 'package:coqudo_app/autogen/identity/models/auth_generate_reset_password_code_command.dart';
|
|
8
|
+
import 'package:coqudo_app/autogen/service_defaults/models/result.dart';
|
|
9
|
+
import 'package:coqudo_app/autogen/identity/models/auth_reset_password_command.dart';
|
|
10
|
+
import 'package:coqudo_app/autogen/identity/models/auth_verify_reset_password_code_command.dart';
|
|
11
|
+
import 'package:coqudo_app/autogen/identity/models/auth_activate_command.dart';
|
|
12
|
+
import 'package:coqudo_app/autogen/identity/models/auth_user_dto.dart';
|
|
13
|
+
|
|
14
|
+
class IdentityApi {
|
|
15
|
+
final Dio _dio;
|
|
16
|
+
|
|
17
|
+
IdentityApi() : _dio = getIt<Dio>();
|
|
18
|
+
|
|
19
|
+
Future<AuthenticationToken> authAppToken(AuthAppAuthenticateCommand request) async {
|
|
20
|
+
final response = await _dio.post(
|
|
21
|
+
'/identity/auth/app/token',
|
|
22
|
+
data: request.toJson(),
|
|
23
|
+
);
|
|
24
|
+
return AuthenticationToken.fromJson(response.data);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Future<AuthenticationToken> authUserToken(AuthUserAuthenticateCommand request) async {
|
|
28
|
+
final response = await _dio.post(
|
|
29
|
+
'/identity/auth/user/token',
|
|
30
|
+
data: request.toJson(),
|
|
31
|
+
);
|
|
32
|
+
return AuthenticationToken.fromJson(response.data);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
Future<AuthenticationToken> authRefreshToken(AuthRefreshTokenCommand request) async {
|
|
36
|
+
final response = await _dio.post(
|
|
37
|
+
'/identity/auth/refresh-token',
|
|
38
|
+
data: request.toJson(),
|
|
39
|
+
);
|
|
40
|
+
return AuthenticationToken.fromJson(response.data);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
Future<Result> authGenerateResetPasswordCode(AuthGenerateResetPasswordCodeCommand request) async {
|
|
44
|
+
final response = await _dio.post(
|
|
45
|
+
'/identity/auth/generate-reset-password-code',
|
|
46
|
+
data: request.toJson(),
|
|
47
|
+
);
|
|
48
|
+
return Result.fromJson(response.data);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Future<Result> authResetPassword(AuthResetPasswordCommand request) async {
|
|
52
|
+
final response = await _dio.post(
|
|
53
|
+
'/identity/auth/reset-password',
|
|
54
|
+
data: request.toJson(),
|
|
55
|
+
);
|
|
56
|
+
return Result.fromJson(response.data);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
Future<Result> authVerifyResetPasswordCode(AuthVerifyResetPasswordCodeCommand request) async {
|
|
60
|
+
final response = await _dio.post(
|
|
61
|
+
'/identity/auth/verify-reset-password-code',
|
|
62
|
+
data: request.toJson(),
|
|
63
|
+
);
|
|
64
|
+
return Result.fromJson(response.data);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Future<Result> authActivate(AuthActivateCommand request) async {
|
|
68
|
+
final response = await _dio.post(
|
|
69
|
+
'/identity/auth/activate',
|
|
70
|
+
data: request.toJson(),
|
|
71
|
+
);
|
|
72
|
+
return Result.fromJson(response.data);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Future<AuthUserDto> authUserRead() async {
|
|
76
|
+
final response = await _dio.get(
|
|
77
|
+
'/identity/auth-user/read',
|
|
78
|
+
);
|
|
79
|
+
return AuthUserDto.fromJson(response.data);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_activate_command.freezed.dart';
|
|
4
|
+
part 'auth_activate_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthActivateCommand with _$AuthActivateCommand {
|
|
8
|
+
const factory AuthActivateCommand({
|
|
9
|
+
required String username,
|
|
10
|
+
required String activationCode,
|
|
11
|
+
}) = _AuthActivateCommand;
|
|
12
|
+
|
|
13
|
+
factory AuthActivateCommand.fromJson(Map<String, dynamic> json) => _$AuthActivateCommandFromJson(json);
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_app_authenticate_command.freezed.dart';
|
|
4
|
+
part 'auth_app_authenticate_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthAppAuthenticateCommand with _$AuthAppAuthenticateCommand {
|
|
8
|
+
const factory AuthAppAuthenticateCommand({
|
|
9
|
+
required String appId,
|
|
10
|
+
required String secret,
|
|
11
|
+
required String audience,
|
|
12
|
+
String? ipAddress,
|
|
13
|
+
}) = _AuthAppAuthenticateCommand;
|
|
14
|
+
|
|
15
|
+
factory AuthAppAuthenticateCommand.fromJson(Map<String, dynamic> json) => _$AuthAppAuthenticateCommandFromJson(json);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_generate_reset_password_code_command.freezed.dart';
|
|
4
|
+
part 'auth_generate_reset_password_code_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthGenerateResetPasswordCodeCommand with _$AuthGenerateResetPasswordCodeCommand {
|
|
8
|
+
const factory AuthGenerateResetPasswordCodeCommand({
|
|
9
|
+
required String usernameOrEmail,
|
|
10
|
+
required String host,
|
|
11
|
+
required String urlResetPassword,
|
|
12
|
+
}) = _AuthGenerateResetPasswordCodeCommand;
|
|
13
|
+
|
|
14
|
+
factory AuthGenerateResetPasswordCodeCommand.fromJson(Map<String, dynamic> json) => _$AuthGenerateResetPasswordCodeCommandFromJson(json);
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_refresh_token_command.freezed.dart';
|
|
4
|
+
part 'auth_refresh_token_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthRefreshTokenCommand with _$AuthRefreshTokenCommand {
|
|
8
|
+
const factory AuthRefreshTokenCommand({
|
|
9
|
+
required String uniqueName,
|
|
10
|
+
required String refreshToken,
|
|
11
|
+
String? ipAddress,
|
|
12
|
+
}) = _AuthRefreshTokenCommand;
|
|
13
|
+
|
|
14
|
+
factory AuthRefreshTokenCommand.fromJson(Map<String, dynamic> json) => _$AuthRefreshTokenCommandFromJson(json);
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_reset_password_command.freezed.dart';
|
|
4
|
+
part 'auth_reset_password_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthResetPasswordCommand with _$AuthResetPasswordCommand {
|
|
8
|
+
const factory AuthResetPasswordCommand({
|
|
9
|
+
required String usernameOrEmail,
|
|
10
|
+
required String verificationCode,
|
|
11
|
+
required String password,
|
|
12
|
+
required String confirmPassword,
|
|
13
|
+
}) = _AuthResetPasswordCommand;
|
|
14
|
+
|
|
15
|
+
factory AuthResetPasswordCommand.fromJson(Map<String, dynamic> json) => _$AuthResetPasswordCommandFromJson(json);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_user_authenticate_command.freezed.dart';
|
|
4
|
+
part 'auth_user_authenticate_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthUserAuthenticateCommand with _$AuthUserAuthenticateCommand {
|
|
8
|
+
const factory AuthUserAuthenticateCommand({
|
|
9
|
+
required String username,
|
|
10
|
+
required String password,
|
|
11
|
+
String? ipAddress,
|
|
12
|
+
}) = _AuthUserAuthenticateCommand;
|
|
13
|
+
|
|
14
|
+
factory AuthUserAuthenticateCommand.fromJson(Map<String, dynamic> json) => _$AuthUserAuthenticateCommandFromJson(json);
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_user_dto.freezed.dart';
|
|
4
|
+
part 'auth_user_dto.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthUserDto with _$AuthUserDto {
|
|
8
|
+
const factory AuthUserDto({
|
|
9
|
+
required String idAuthUser,
|
|
10
|
+
required String uniqueId,
|
|
11
|
+
String? username,
|
|
12
|
+
String? email,
|
|
13
|
+
String? activationDate,
|
|
14
|
+
String? lockedDate,
|
|
15
|
+
}) = _AuthUserDto;
|
|
16
|
+
|
|
17
|
+
factory AuthUserDto.fromJson(Map<String, dynamic> json) => _$AuthUserDtoFromJson(json);
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'auth_verify_reset_password_code_command.freezed.dart';
|
|
4
|
+
part 'auth_verify_reset_password_code_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthVerifyResetPasswordCodeCommand with _$AuthVerifyResetPasswordCodeCommand {
|
|
8
|
+
const factory AuthVerifyResetPasswordCodeCommand({
|
|
9
|
+
String? usernameOrEmail,
|
|
10
|
+
String? verificationCode,
|
|
11
|
+
}) = _AuthVerifyResetPasswordCodeCommand;
|
|
12
|
+
|
|
13
|
+
factory AuthVerifyResetPasswordCodeCommand.fromJson(Map<String, dynamic> json) => _$AuthVerifyResetPasswordCodeCommandFromJson(json);
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'authentication_token.freezed.dart';
|
|
4
|
+
part 'authentication_token.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class AuthenticationToken with _$AuthenticationToken {
|
|
8
|
+
const factory AuthenticationToken({
|
|
9
|
+
required String uniqueName,
|
|
10
|
+
required String accessToken,
|
|
11
|
+
required double expiresIn,
|
|
12
|
+
required String refreshToken,
|
|
13
|
+
required double refreshTokenExpiresIn,
|
|
14
|
+
}) = _AuthenticationToken;
|
|
15
|
+
|
|
16
|
+
factory AuthenticationToken.fromJson(Map<String, dynamic> json) => _$AuthenticationTokenFromJson(json);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'problem_details.freezed.dart';
|
|
4
|
+
part 'problem_details.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class ProblemDetails with _$ProblemDetails {
|
|
8
|
+
const factory ProblemDetails({
|
|
9
|
+
String? type,
|
|
10
|
+
String? title,
|
|
11
|
+
double? status,
|
|
12
|
+
String? detail,
|
|
13
|
+
String? instance,
|
|
14
|
+
}) = _ProblemDetails;
|
|
15
|
+
|
|
16
|
+
factory ProblemDetails.fromJson(Map<String, dynamic> json) => _$ProblemDetailsFromJson(json);
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'application_exception.freezed.dart';
|
|
4
|
+
part 'application_exception.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class ApplicationException with _$ApplicationException {
|
|
8
|
+
const factory ApplicationException({
|
|
9
|
+
String? message,
|
|
10
|
+
String? stackTrace,
|
|
11
|
+
}) = _ApplicationException;
|
|
12
|
+
|
|
13
|
+
factory ApplicationException.fromJson(Map<String, dynamic> json) => _$ApplicationExceptionFromJson(json);
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
import 'package:coqudo_app/autogen/service_defaults/models/application_exception.dart';
|
|
3
|
+
|
|
4
|
+
part 'result.freezed.dart';
|
|
5
|
+
part 'result.g.dart';
|
|
6
|
+
|
|
7
|
+
@freezed
|
|
8
|
+
abstract class Result with _$Result {
|
|
9
|
+
const factory Result({
|
|
10
|
+
required bool isSuccess,
|
|
11
|
+
String? message,
|
|
12
|
+
String? stackTrace,
|
|
13
|
+
ApplicationException? exception,
|
|
14
|
+
}) = _Result;
|
|
15
|
+
|
|
16
|
+
factory Result.fromJson(Map<String, dynamic> json) => _$ResultFromJson(json);
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import 'package:coqudo_app/core/di/injector.dart';
|
|
2
|
+
import 'package:dio/dio.dart';
|
|
3
|
+
import 'package:coqudo_app/autogen/user_profile/models/test_read_query.dart';
|
|
4
|
+
import 'package:coqudo_app/autogen/service_defaults/models/result.dart';
|
|
5
|
+
import 'package:coqudo_app/autogen/user_profile/models/test_list_query.dart';
|
|
6
|
+
import 'package:coqudo_app/autogen/user_profile/models/test_save_command.dart';
|
|
7
|
+
import 'package:coqudo_app/autogen/user_profile/models/user_general_info_save_command.dart';
|
|
8
|
+
|
|
9
|
+
class UserProfileApi {
|
|
10
|
+
final Dio _dio;
|
|
11
|
+
|
|
12
|
+
UserProfileApi() : _dio = getIt<Dio>();
|
|
13
|
+
|
|
14
|
+
Future<Result> userGeneralInfoTestRead(TestReadQuery request) async {
|
|
15
|
+
final response = await _dio.get(
|
|
16
|
+
'/user-profile/UserGeneralInfo/test/read',
|
|
17
|
+
queryParameters: request.toJson(),
|
|
18
|
+
);
|
|
19
|
+
return Result.fromJson(response.data);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Future<Result> userGeneralInfoTestList(TestListQuery request) async {
|
|
23
|
+
final response = await _dio.get(
|
|
24
|
+
'/user-profile/UserGeneralInfo/test/list',
|
|
25
|
+
queryParameters: request.toJson(),
|
|
26
|
+
);
|
|
27
|
+
return Result.fromJson(response.data);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Future<Result> userGeneralInfoTestSave(TestSaveCommand request) async {
|
|
31
|
+
final response = await _dio.post(
|
|
32
|
+
'/user-profile/UserGeneralInfo/test/save',
|
|
33
|
+
data: request.toJson(),
|
|
34
|
+
);
|
|
35
|
+
return Result.fromJson(response.data);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Future<Result> userGeneralInfoSave(UserGeneralInfoSaveCommand request) async {
|
|
39
|
+
final response = await _dio.post(
|
|
40
|
+
'/user-profile/UserGeneralInfo/save',
|
|
41
|
+
data: request.toJson(),
|
|
42
|
+
);
|
|
43
|
+
return Result.fromJson(response.data);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'test_list_query.freezed.dart';
|
|
4
|
+
part 'test_list_query.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class TestListQuery with _$TestListQuery {
|
|
8
|
+
const factory TestListQuery({
|
|
9
|
+
String? name,
|
|
10
|
+
}) = _TestListQuery;
|
|
11
|
+
|
|
12
|
+
factory TestListQuery.fromJson(Map<String, dynamic> json) => _$TestListQueryFromJson(json);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'test_read_query.freezed.dart';
|
|
4
|
+
part 'test_read_query.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class TestReadQuery with _$TestReadQuery {
|
|
8
|
+
const factory TestReadQuery({
|
|
9
|
+
String? name,
|
|
10
|
+
}) = _TestReadQuery;
|
|
11
|
+
|
|
12
|
+
factory TestReadQuery.fromJson(Map<String, dynamic> json) => _$TestReadQueryFromJson(json);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'test_save_command.freezed.dart';
|
|
4
|
+
part 'test_save_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class TestSaveCommand with _$TestSaveCommand {
|
|
8
|
+
const factory TestSaveCommand({
|
|
9
|
+
required String name,
|
|
10
|
+
}) = _TestSaveCommand;
|
|
11
|
+
|
|
12
|
+
factory TestSaveCommand.fromJson(Map<String, dynamic> json) => _$TestSaveCommandFromJson(json);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
2
|
+
|
|
3
|
+
part 'user_general_info_save_command.freezed.dart';
|
|
4
|
+
part 'user_general_info_save_command.g.dart';
|
|
5
|
+
|
|
6
|
+
@freezed
|
|
7
|
+
abstract class UserGeneralInfoSaveCommand with _$UserGeneralInfoSaveCommand {
|
|
8
|
+
const factory UserGeneralInfoSaveCommand({
|
|
9
|
+
String? name,
|
|
10
|
+
}) = _UserGeneralInfoSaveCommand;
|
|
11
|
+
|
|
12
|
+
factory UserGeneralInfoSaveCommand.fromJson(Map<String, dynamic> json) => _$UserGeneralInfoSaveCommandFromJson(json);
|
|
13
|
+
}
|