mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 08:31:19 +00:00
update service generation
This commit is contained in:
parent
5ebc782591
commit
e67880bc50
@ -2175,12 +2175,24 @@ components:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
label:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
icon:
|
||||
type: string
|
||||
nullable: true
|
||||
iconResourceId:
|
||||
type: string
|
||||
nullable: true
|
||||
iconUrl:
|
||||
type: string
|
||||
nullable: true
|
||||
order:
|
||||
type: integer
|
||||
format: int32
|
||||
nullable: true
|
||||
SliderDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -2279,12 +2291,33 @@ components:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||
responses:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/ResponseDTO'
|
||||
imageBackgroundResourceId:
|
||||
type: string
|
||||
nullable: true
|
||||
imageBackgroundResourceType:
|
||||
$ref: '#/components/schemas/ResourceType'
|
||||
imageBackgroundResourceUrl:
|
||||
type: string
|
||||
nullable: true
|
||||
order:
|
||||
type: integer
|
||||
format: int32
|
||||
TranslationAndResourceDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
language:
|
||||
type: string
|
||||
nullable: true
|
||||
value:
|
||||
type: string
|
||||
nullable: true
|
||||
resourceId:
|
||||
type: string
|
||||
nullable: true
|
||||
@ -2293,9 +2326,6 @@ components:
|
||||
resourceUrl:
|
||||
type: string
|
||||
nullable: true
|
||||
order:
|
||||
type: integer
|
||||
format: int32
|
||||
ResponseDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -2304,17 +2334,9 @@ components:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||
isGood:
|
||||
type: boolean
|
||||
resourceId:
|
||||
type: string
|
||||
nullable: true
|
||||
resourceType:
|
||||
$ref: '#/components/schemas/ResourceType'
|
||||
resourceUrl:
|
||||
type: string
|
||||
nullable: true
|
||||
order:
|
||||
type: integer
|
||||
format: int32
|
||||
@ -2326,15 +2348,7 @@ components:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
resourceId:
|
||||
type: string
|
||||
nullable: true
|
||||
resourceType:
|
||||
$ref: '#/components/schemas/ResourceType'
|
||||
resourceUrl:
|
||||
type: string
|
||||
nullable: true
|
||||
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||
ArticleDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -2376,12 +2390,12 @@ components:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||
messageFin:
|
||||
type: array
|
||||
nullable: true
|
||||
items:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
$ref: '#/components/schemas/TranslationAndResourceDTO'
|
||||
image:
|
||||
nullable: true
|
||||
oneOf:
|
||||
|
||||
@ -42,6 +42,7 @@ doc/SectionDTO.md
|
||||
doc/SectionType.md
|
||||
doc/SliderDTO.md
|
||||
doc/TokenDTO.md
|
||||
doc/TranslationAndResourceDTO.md
|
||||
doc/TranslationDTO.md
|
||||
doc/User.md
|
||||
doc/UserApi.md
|
||||
@ -99,6 +100,7 @@ lib/model/section_dto.dart
|
||||
lib/model/section_type.dart
|
||||
lib/model/slider_dto.dart
|
||||
lib/model/token_dto.dart
|
||||
lib/model/translation_and_resource_dto.dart
|
||||
lib/model/translation_dto.dart
|
||||
lib/model/user.dart
|
||||
lib/model/user_detail_dto.dart
|
||||
|
||||
@ -157,6 +157,7 @@ Class | Method | HTTP request | Description
|
||||
- [SectionType](doc\/SectionType.md)
|
||||
- [SliderDTO](doc\/SliderDTO.md)
|
||||
- [TokenDTO](doc\/TokenDTO.md)
|
||||
- [TranslationAndResourceDTO](doc\/TranslationAndResourceDTO.md)
|
||||
- [TranslationDTO](doc\/TranslationDTO.md)
|
||||
- [User](doc\/User.md)
|
||||
- [UserDetailDTO](doc\/UserDetailDTO.md)
|
||||
|
||||
@ -8,8 +8,11 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**icon** | **String** | | [optional]
|
||||
**iconResourceId** | **String** | | [optional]
|
||||
**iconUrl** | **String** | | [optional]
|
||||
**order** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -8,8 +8,11 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | | [optional]
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**icon** | **String** | | [optional]
|
||||
**iconResourceId** | **String** | | [optional]
|
||||
**iconUrl** | **String** | | [optional]
|
||||
**order** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -8,10 +8,7 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**resourceUrl** | **String** | | [optional]
|
||||
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**messageDebut** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**messageFin** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**messageDebut** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||
**messageFin** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||
**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@ -8,11 +8,11 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||
**responses** | [**List<ResponseDTO>**](ResponseDTO.md) | | [optional] [default to const []]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**resourceUrl** | **String** | | [optional]
|
||||
**imageBackgroundResourceId** | **String** | | [optional]
|
||||
**imageBackgroundResourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**imageBackgroundResourceUrl** | **String** | | [optional]
|
||||
**order** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@ -8,10 +8,7 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**resourceUrl** | **String** | | [optional]
|
||||
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -8,11 +8,8 @@ import 'package:manager_api/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
|
||||
**label** | [**List<TranslationAndResourceDTO>**](TranslationAndResourceDTO.md) | | [optional] [default to const []]
|
||||
**isGood** | **bool** | | [optional]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**resourceUrl** | **String** | | [optional]
|
||||
**order** | **int** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
19
manager_api/doc/TranslationAndResourceDTO.md
Normal file
19
manager_api/doc/TranslationAndResourceDTO.md
Normal file
@ -0,0 +1,19 @@
|
||||
# manager_api.model.TranslationAndResourceDTO
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:manager_api/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**language** | **String** | | [optional]
|
||||
**value** | **String** | | [optional]
|
||||
**resourceId** | **String** | | [optional]
|
||||
**resourceType** | [**ResourceType**](ResourceType.md) | | [optional]
|
||||
**resourceUrl** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@ -69,6 +69,7 @@ part 'model/section_dto.dart';
|
||||
part 'model/section_type.dart';
|
||||
part 'model/slider_dto.dart';
|
||||
part 'model/token_dto.dart';
|
||||
part 'model/translation_and_resource_dto.dart';
|
||||
part 'model/translation_dto.dart';
|
||||
part 'model/user.dart';
|
||||
part 'model/user_detail_dto.dart';
|
||||
|
||||
@ -249,6 +249,8 @@ class ApiClient {
|
||||
return SliderDTO.fromJson(value);
|
||||
case 'TokenDTO':
|
||||
return TokenDTO.fromJson(value);
|
||||
case 'TranslationAndResourceDTO':
|
||||
return TranslationAndResourceDTO.fromJson(value);
|
||||
case 'TranslationDTO':
|
||||
return TranslationDTO.fromJson(value);
|
||||
case 'User':
|
||||
|
||||
@ -13,40 +13,70 @@ part of openapi.api;
|
||||
class CategorieDTO {
|
||||
/// Returns a new [CategorieDTO] instance.
|
||||
CategorieDTO({
|
||||
this.name,
|
||||
this.label = const [],
|
||||
this.icon,
|
||||
this.iconResourceId,
|
||||
this.iconUrl,
|
||||
this.order,
|
||||
});
|
||||
|
||||
String? name;
|
||||
List<TranslationDTO>? label;
|
||||
|
||||
String? icon;
|
||||
|
||||
String? iconResourceId;
|
||||
|
||||
String? iconUrl;
|
||||
|
||||
int? order;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CategorieDTO &&
|
||||
other.name == name &&
|
||||
other.icon == icon;
|
||||
other.label == label &&
|
||||
other.icon == icon &&
|
||||
other.iconResourceId == iconResourceId &&
|
||||
other.iconUrl == iconUrl &&
|
||||
other.order == order;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(icon == null ? 0 : icon!.hashCode);
|
||||
(label == null ? 0 : label!.hashCode) +
|
||||
(icon == null ? 0 : icon!.hashCode) +
|
||||
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||
(iconUrl == null ? 0 : iconUrl!.hashCode) +
|
||||
(order == null ? 0 : order!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CategorieDTO[name=$name, icon=$icon]';
|
||||
String toString() => 'CategorieDTO[label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
if (this.label != null) {
|
||||
json[r'label'] = this.label;
|
||||
} else {
|
||||
json[r'name'] = null;
|
||||
json[r'label'] = null;
|
||||
}
|
||||
if (this.icon != null) {
|
||||
json[r'icon'] = this.icon;
|
||||
} else {
|
||||
json[r'icon'] = null;
|
||||
}
|
||||
if (this.iconResourceId != null) {
|
||||
json[r'iconResourceId'] = this.iconResourceId;
|
||||
} else {
|
||||
json[r'iconResourceId'] = null;
|
||||
}
|
||||
if (this.iconUrl != null) {
|
||||
json[r'iconUrl'] = this.iconUrl;
|
||||
} else {
|
||||
json[r'iconUrl'] = null;
|
||||
}
|
||||
if (this.order != null) {
|
||||
json[r'order'] = this.order;
|
||||
} else {
|
||||
json[r'order'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -69,8 +99,11 @@ class CategorieDTO {
|
||||
}());
|
||||
|
||||
return CategorieDTO(
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
icon: mapValueOfType<String>(json, r'icon'),
|
||||
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||
iconUrl: mapValueOfType<String>(json, r'iconUrl'),
|
||||
order: mapValueOfType<int>(json, r'order'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -13,40 +13,70 @@ part of openapi.api;
|
||||
class GeoPointDTOCategorie {
|
||||
/// Returns a new [GeoPointDTOCategorie] instance.
|
||||
GeoPointDTOCategorie({
|
||||
this.name,
|
||||
this.label = const [],
|
||||
this.icon,
|
||||
this.iconResourceId,
|
||||
this.iconUrl,
|
||||
this.order,
|
||||
});
|
||||
|
||||
String? name;
|
||||
List<TranslationDTO>? label;
|
||||
|
||||
String? icon;
|
||||
|
||||
String? iconResourceId;
|
||||
|
||||
String? iconUrl;
|
||||
|
||||
int? order;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie &&
|
||||
other.name == name &&
|
||||
other.icon == icon;
|
||||
other.label == label &&
|
||||
other.icon == icon &&
|
||||
other.iconResourceId == iconResourceId &&
|
||||
other.iconUrl == iconUrl &&
|
||||
other.order == order;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(icon == null ? 0 : icon!.hashCode);
|
||||
(label == null ? 0 : label!.hashCode) +
|
||||
(icon == null ? 0 : icon!.hashCode) +
|
||||
(iconResourceId == null ? 0 : iconResourceId!.hashCode) +
|
||||
(iconUrl == null ? 0 : iconUrl!.hashCode) +
|
||||
(order == null ? 0 : order!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'GeoPointDTOCategorie[name=$name, icon=$icon]';
|
||||
String toString() => 'GeoPointDTOCategorie[label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
if (this.label != null) {
|
||||
json[r'label'] = this.label;
|
||||
} else {
|
||||
json[r'name'] = null;
|
||||
json[r'label'] = null;
|
||||
}
|
||||
if (this.icon != null) {
|
||||
json[r'icon'] = this.icon;
|
||||
} else {
|
||||
json[r'icon'] = null;
|
||||
}
|
||||
if (this.iconResourceId != null) {
|
||||
json[r'iconResourceId'] = this.iconResourceId;
|
||||
} else {
|
||||
json[r'iconResourceId'] = null;
|
||||
}
|
||||
if (this.iconUrl != null) {
|
||||
json[r'iconUrl'] = this.iconUrl;
|
||||
} else {
|
||||
json[r'iconUrl'] = null;
|
||||
}
|
||||
if (this.order != null) {
|
||||
json[r'order'] = this.order;
|
||||
} else {
|
||||
json[r'order'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -69,8 +99,11 @@ class GeoPointDTOCategorie {
|
||||
}());
|
||||
|
||||
return GeoPointDTOCategorie(
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
icon: mapValueOfType<String>(json, r'icon'),
|
||||
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),
|
||||
iconUrl: mapValueOfType<String>(json, r'iconUrl'),
|
||||
order: mapValueOfType<int>(json, r'order'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -14,42 +14,21 @@ class LevelDTO {
|
||||
/// Returns a new [LevelDTO] instance.
|
||||
LevelDTO({
|
||||
this.label = const [],
|
||||
this.resourceId,
|
||||
this.resourceType,
|
||||
this.resourceUrl,
|
||||
});
|
||||
|
||||
List<TranslationDTO>? label;
|
||||
|
||||
String? resourceId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ResourceType? resourceType;
|
||||
|
||||
String? resourceUrl;
|
||||
List<TranslationAndResourceDTO>? label;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LevelDTO &&
|
||||
other.label == label &&
|
||||
other.resourceId == resourceId &&
|
||||
other.resourceType == resourceType &&
|
||||
other.resourceUrl == resourceUrl;
|
||||
other.label == label;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(label == null ? 0 : label!.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||
(label == null ? 0 : label!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
||||
String toString() => 'LevelDTO[label=$label]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -58,21 +37,6 @@ class LevelDTO {
|
||||
} else {
|
||||
json[r'label'] = null;
|
||||
}
|
||||
if (this.resourceId != null) {
|
||||
json[r'resourceId'] = this.resourceId;
|
||||
} else {
|
||||
json[r'resourceId'] = null;
|
||||
}
|
||||
if (this.resourceType != null) {
|
||||
json[r'resourceType'] = this.resourceType;
|
||||
} else {
|
||||
json[r'resourceType'] = null;
|
||||
}
|
||||
if (this.resourceUrl != null) {
|
||||
json[r'resourceUrl'] = this.resourceUrl;
|
||||
} else {
|
||||
json[r'resourceUrl'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -95,10 +59,7 @@ class LevelDTO {
|
||||
}());
|
||||
|
||||
return LevelDTO(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -18,9 +18,9 @@ class PuzzleDTO {
|
||||
this.image,
|
||||
});
|
||||
|
||||
List<TranslationDTO>? messageDebut;
|
||||
List<TranslationAndResourceDTO>? messageDebut;
|
||||
|
||||
List<TranslationDTO>? messageFin;
|
||||
List<TranslationAndResourceDTO>? messageFin;
|
||||
|
||||
PuzzleDTOImage? image;
|
||||
|
||||
@ -79,8 +79,8 @@ class PuzzleDTO {
|
||||
}());
|
||||
|
||||
return PuzzleDTO(
|
||||
messageDebut: TranslationDTO.listFromJson(json[r'messageDebut']),
|
||||
messageFin: TranslationDTO.listFromJson(json[r'messageFin']),
|
||||
messageDebut: TranslationAndResourceDTO.listFromJson(json[r'messageDebut']),
|
||||
messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']),
|
||||
image: PuzzleDTOImage.fromJson(json[r'image']),
|
||||
);
|
||||
}
|
||||
|
||||
@ -15,17 +15,17 @@ class QuestionDTO {
|
||||
QuestionDTO({
|
||||
this.label = const [],
|
||||
this.responses = const [],
|
||||
this.resourceId,
|
||||
this.resourceType,
|
||||
this.resourceUrl,
|
||||
this.imageBackgroundResourceId,
|
||||
this.imageBackgroundResourceType,
|
||||
this.imageBackgroundResourceUrl,
|
||||
this.order,
|
||||
});
|
||||
|
||||
List<TranslationDTO>? label;
|
||||
List<TranslationAndResourceDTO>? label;
|
||||
|
||||
List<ResponseDTO>? responses;
|
||||
|
||||
String? resourceId;
|
||||
String? imageBackgroundResourceId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
@ -33,9 +33,9 @@ class QuestionDTO {
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ResourceType? resourceType;
|
||||
ResourceType? imageBackgroundResourceType;
|
||||
|
||||
String? resourceUrl;
|
||||
String? imageBackgroundResourceUrl;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
@ -49,9 +49,9 @@ class QuestionDTO {
|
||||
bool operator ==(Object other) => identical(this, other) || other is QuestionDTO &&
|
||||
other.label == label &&
|
||||
other.responses == responses &&
|
||||
other.resourceId == resourceId &&
|
||||
other.resourceType == resourceType &&
|
||||
other.resourceUrl == resourceUrl &&
|
||||
other.imageBackgroundResourceId == imageBackgroundResourceId &&
|
||||
other.imageBackgroundResourceType == imageBackgroundResourceType &&
|
||||
other.imageBackgroundResourceUrl == imageBackgroundResourceUrl &&
|
||||
other.order == order;
|
||||
|
||||
@override
|
||||
@ -59,13 +59,13 @@ class QuestionDTO {
|
||||
// ignore: unnecessary_parenthesis
|
||||
(label == null ? 0 : label!.hashCode) +
|
||||
(responses == null ? 0 : responses!.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||
(imageBackgroundResourceId == null ? 0 : imageBackgroundResourceId!.hashCode) +
|
||||
(imageBackgroundResourceType == null ? 0 : imageBackgroundResourceType!.hashCode) +
|
||||
(imageBackgroundResourceUrl == null ? 0 : imageBackgroundResourceUrl!.hashCode) +
|
||||
(order == null ? 0 : order!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]';
|
||||
String toString() => 'QuestionDTO[label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -79,20 +79,20 @@ class QuestionDTO {
|
||||
} else {
|
||||
json[r'responses'] = null;
|
||||
}
|
||||
if (this.resourceId != null) {
|
||||
json[r'resourceId'] = this.resourceId;
|
||||
if (this.imageBackgroundResourceId != null) {
|
||||
json[r'imageBackgroundResourceId'] = this.imageBackgroundResourceId;
|
||||
} else {
|
||||
json[r'resourceId'] = null;
|
||||
json[r'imageBackgroundResourceId'] = null;
|
||||
}
|
||||
if (this.resourceType != null) {
|
||||
json[r'resourceType'] = this.resourceType;
|
||||
if (this.imageBackgroundResourceType != null) {
|
||||
json[r'imageBackgroundResourceType'] = this.imageBackgroundResourceType;
|
||||
} else {
|
||||
json[r'resourceType'] = null;
|
||||
json[r'imageBackgroundResourceType'] = null;
|
||||
}
|
||||
if (this.resourceUrl != null) {
|
||||
json[r'resourceUrl'] = this.resourceUrl;
|
||||
if (this.imageBackgroundResourceUrl != null) {
|
||||
json[r'imageBackgroundResourceUrl'] = this.imageBackgroundResourceUrl;
|
||||
} else {
|
||||
json[r'resourceUrl'] = null;
|
||||
json[r'imageBackgroundResourceUrl'] = null;
|
||||
}
|
||||
if (this.order != null) {
|
||||
json[r'order'] = this.order;
|
||||
@ -121,11 +121,11 @@ class QuestionDTO {
|
||||
}());
|
||||
|
||||
return QuestionDTO(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||
responses: ResponseDTO.listFromJson(json[r'responses']),
|
||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||
imageBackgroundResourceId: mapValueOfType<String>(json, r'imageBackgroundResourceId'),
|
||||
imageBackgroundResourceType: ResourceType.fromJson(json[r'imageBackgroundResourceType']),
|
||||
imageBackgroundResourceUrl: mapValueOfType<String>(json, r'imageBackgroundResourceUrl'),
|
||||
order: mapValueOfType<int>(json, r'order'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -14,42 +14,21 @@ class QuizzDTOBadLevel {
|
||||
/// Returns a new [QuizzDTOBadLevel] instance.
|
||||
QuizzDTOBadLevel({
|
||||
this.label = const [],
|
||||
this.resourceId,
|
||||
this.resourceType,
|
||||
this.resourceUrl,
|
||||
});
|
||||
|
||||
List<TranslationDTO>? label;
|
||||
|
||||
String? resourceId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ResourceType? resourceType;
|
||||
|
||||
String? resourceUrl;
|
||||
List<TranslationAndResourceDTO>? label;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel &&
|
||||
other.label == label &&
|
||||
other.resourceId == resourceId &&
|
||||
other.resourceType == resourceType &&
|
||||
other.resourceUrl == resourceUrl;
|
||||
other.label == label;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(label == null ? 0 : label!.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||
(label == null ? 0 : label!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
||||
String toString() => 'QuizzDTOBadLevel[label=$label]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -58,21 +37,6 @@ class QuizzDTOBadLevel {
|
||||
} else {
|
||||
json[r'label'] = null;
|
||||
}
|
||||
if (this.resourceId != null) {
|
||||
json[r'resourceId'] = this.resourceId;
|
||||
} else {
|
||||
json[r'resourceId'] = null;
|
||||
}
|
||||
if (this.resourceType != null) {
|
||||
json[r'resourceType'] = this.resourceType;
|
||||
} else {
|
||||
json[r'resourceType'] = null;
|
||||
}
|
||||
if (this.resourceUrl != null) {
|
||||
json[r'resourceUrl'] = this.resourceUrl;
|
||||
} else {
|
||||
json[r'resourceUrl'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -95,10 +59,7 @@ class QuizzDTOBadLevel {
|
||||
}());
|
||||
|
||||
return QuizzDTOBadLevel(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -15,13 +15,10 @@ class ResponseDTO {
|
||||
ResponseDTO({
|
||||
this.label = const [],
|
||||
this.isGood,
|
||||
this.resourceId,
|
||||
this.resourceType,
|
||||
this.resourceUrl,
|
||||
this.order,
|
||||
});
|
||||
|
||||
List<TranslationDTO>? label;
|
||||
List<TranslationAndResourceDTO>? label;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
@ -31,18 +28,6 @@ class ResponseDTO {
|
||||
///
|
||||
bool? isGood;
|
||||
|
||||
String? resourceId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ResourceType? resourceType;
|
||||
|
||||
String? resourceUrl;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
@ -55,9 +40,6 @@ class ResponseDTO {
|
||||
bool operator ==(Object other) => identical(this, other) || other is ResponseDTO &&
|
||||
other.label == label &&
|
||||
other.isGood == isGood &&
|
||||
other.resourceId == resourceId &&
|
||||
other.resourceType == resourceType &&
|
||||
other.resourceUrl == resourceUrl &&
|
||||
other.order == order;
|
||||
|
||||
@override
|
||||
@ -65,13 +47,10 @@ class ResponseDTO {
|
||||
// ignore: unnecessary_parenthesis
|
||||
(label == null ? 0 : label!.hashCode) +
|
||||
(isGood == null ? 0 : isGood!.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode) +
|
||||
(order == null ? 0 : order!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ResponseDTO[label=$label, isGood=$isGood, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]';
|
||||
String toString() => 'ResponseDTO[label=$label, isGood=$isGood, order=$order]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -85,21 +64,6 @@ class ResponseDTO {
|
||||
} else {
|
||||
json[r'isGood'] = null;
|
||||
}
|
||||
if (this.resourceId != null) {
|
||||
json[r'resourceId'] = this.resourceId;
|
||||
} else {
|
||||
json[r'resourceId'] = null;
|
||||
}
|
||||
if (this.resourceType != null) {
|
||||
json[r'resourceType'] = this.resourceType;
|
||||
} else {
|
||||
json[r'resourceType'] = null;
|
||||
}
|
||||
if (this.resourceUrl != null) {
|
||||
json[r'resourceUrl'] = this.resourceUrl;
|
||||
} else {
|
||||
json[r'resourceUrl'] = null;
|
||||
}
|
||||
if (this.order != null) {
|
||||
json[r'order'] = this.order;
|
||||
} else {
|
||||
@ -127,11 +91,8 @@ class ResponseDTO {
|
||||
}());
|
||||
|
||||
return ResponseDTO(
|
||||
label: TranslationDTO.listFromJson(json[r'label']),
|
||||
label: TranslationAndResourceDTO.listFromJson(json[r'label']),
|
||||
isGood: mapValueOfType<bool>(json, r'isGood'),
|
||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||
order: mapValueOfType<int>(json, r'order'),
|
||||
);
|
||||
}
|
||||
|
||||
162
manager_api/lib/model/translation_and_resource_dto.dart
Normal file
162
manager_api/lib/model/translation_and_resource_dto.dart
Normal file
@ -0,0 +1,162 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class TranslationAndResourceDTO {
|
||||
/// Returns a new [TranslationAndResourceDTO] instance.
|
||||
TranslationAndResourceDTO({
|
||||
this.language,
|
||||
this.value,
|
||||
this.resourceId,
|
||||
this.resourceType,
|
||||
this.resourceUrl,
|
||||
});
|
||||
|
||||
String? language;
|
||||
|
||||
String? value;
|
||||
|
||||
String? resourceId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
ResourceType? resourceType;
|
||||
|
||||
String? resourceUrl;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is TranslationAndResourceDTO &&
|
||||
other.language == language &&
|
||||
other.value == value &&
|
||||
other.resourceId == resourceId &&
|
||||
other.resourceType == resourceType &&
|
||||
other.resourceUrl == resourceUrl;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(language == null ? 0 : language!.hashCode) +
|
||||
(value == null ? 0 : value!.hashCode) +
|
||||
(resourceId == null ? 0 : resourceId!.hashCode) +
|
||||
(resourceType == null ? 0 : resourceType!.hashCode) +
|
||||
(resourceUrl == null ? 0 : resourceUrl!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.language != null) {
|
||||
json[r'language'] = this.language;
|
||||
} else {
|
||||
json[r'language'] = null;
|
||||
}
|
||||
if (this.value != null) {
|
||||
json[r'value'] = this.value;
|
||||
} else {
|
||||
json[r'value'] = null;
|
||||
}
|
||||
if (this.resourceId != null) {
|
||||
json[r'resourceId'] = this.resourceId;
|
||||
} else {
|
||||
json[r'resourceId'] = null;
|
||||
}
|
||||
if (this.resourceType != null) {
|
||||
json[r'resourceType'] = this.resourceType;
|
||||
} else {
|
||||
json[r'resourceType'] = null;
|
||||
}
|
||||
if (this.resourceUrl != null) {
|
||||
json[r'resourceUrl'] = this.resourceUrl;
|
||||
} else {
|
||||
json[r'resourceUrl'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [TranslationAndResourceDTO] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static TranslationAndResourceDTO? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
// Ensure that the map contains the required keys.
|
||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||
// Note 2: this code is stripped in release mode!
|
||||
assert(() {
|
||||
requiredKeys.forEach((key) {
|
||||
assert(json.containsKey(key), 'Required key "TranslationAndResourceDTO[$key]" is missing from JSON.');
|
||||
assert(json[key] != null, 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return TranslationAndResourceDTO(
|
||||
language: mapValueOfType<String>(json, r'language'),
|
||||
value: mapValueOfType<String>(json, r'value'),
|
||||
resourceId: mapValueOfType<String>(json, r'resourceId'),
|
||||
resourceType: ResourceType.fromJson(json[r'resourceType']),
|
||||
resourceUrl: mapValueOfType<String>(json, r'resourceUrl'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<TranslationAndResourceDTO> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TranslationAndResourceDTO>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = TranslationAndResourceDTO.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, TranslationAndResourceDTO> mapFromJson(dynamic json) {
|
||||
final map = <String, TranslationAndResourceDTO>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = TranslationAndResourceDTO.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of TranslationAndResourceDTO-objects as value to a dart map
|
||||
static Map<String, List<TranslationAndResourceDTO>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<TranslationAndResourceDTO>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = TranslationAndResourceDTO.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
47
manager_api/test/translation_and_resource_dto_test.dart
Normal file
47
manager_api/test/translation_and_resource_dto_test.dart
Normal file
@ -0,0 +1,47 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:manager_api/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for TranslationAndResourceDTO
|
||||
void main() {
|
||||
// final instance = TranslationAndResourceDTO();
|
||||
|
||||
group('test TranslationAndResourceDTO', () {
|
||||
// String language
|
||||
test('to test the property `language`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String value
|
||||
test('to test the property `value`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String resourceId
|
||||
test('to test the property `resourceId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// ResourceType resourceType
|
||||
test('to test the property `resourceType`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String resourceUrl
|
||||
test('to test the property `resourceUrl`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user