update service generation

This commit is contained in:
Thomas Fransolet 2023-12-26 15:49:10 +01:00
parent 7635577b26
commit 5ebc782591
8 changed files with 133 additions and 10 deletions

View File

@ -1814,6 +1814,10 @@ components:
weatherCity:
type: string
nullable: true
isDate:
type: boolean
isHour:
type: boolean
TranslationDTO:
type: object
additionalProperties: false
@ -1885,6 +1889,7 @@ components:
order:
type: integer
format: int32
nullable: true
instanceId:
type: string
nullable: true
@ -2163,7 +2168,7 @@ components:
resourceUrl:
type: string
nullable: true
latitude:
resourceName:
type: string
nullable: true
CategorieDTO:
@ -2302,6 +2307,14 @@ components:
$ref: '#/components/schemas/TranslationDTO'
isGood:
type: boolean
resourceId:
type: string
nullable: true
resourceType:
$ref: '#/components/schemas/ResourceType'
resourceUrl:
type: string
nullable: true
order:
type: integer
format: int32

View File

@ -105,7 +105,3 @@ lib/model/user_detail_dto.dart
lib/model/video_dto.dart
lib/model/web_dto.dart
pubspec.yaml
test/categorie_dto_test.dart
test/content_dto_test.dart
test/content_geo_point_test.dart
test/geo_point_dto_categorie_test.dart

View File

@ -25,6 +25,8 @@ Name | Type | Description | Notes
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**weatherCity** | **String** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [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)

View File

@ -25,6 +25,8 @@ Name | Type | Description | Notes
**loaderImageId** | **String** | | [optional]
**loaderImageUrl** | **String** | | [optional]
**weatherCity** | **String** | | [optional]
**isDate** | **bool** | | [optional]
**isHour** | **bool** | | [optional]
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
**resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []]

View File

@ -10,6 +10,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**label** | [**List<TranslationDTO>**](TranslationDTO.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)

View File

@ -30,6 +30,8 @@ class ConfigurationDTO {
this.loaderImageId,
this.loaderImageUrl,
this.weatherCity,
this.isDate,
this.isHour,
});
String? id;
@ -90,6 +92,22 @@ class ConfigurationDTO {
String? weatherCity;
///
/// 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.
///
bool? isDate;
///
/// 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.
///
bool? isHour;
@override
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
other.id == id &&
@ -108,7 +126,9 @@ class ConfigurationDTO {
other.sectionIds == sectionIds &&
other.loaderImageId == loaderImageId &&
other.loaderImageUrl == loaderImageUrl &&
other.weatherCity == weatherCity;
other.weatherCity == weatherCity &&
other.isDate == isDate &&
other.isHour == isHour;
@override
int get hashCode =>
@ -129,10 +149,12 @@ class ConfigurationDTO {
(sectionIds == null ? 0 : sectionIds!.hashCode) +
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
(weatherCity == null ? 0 : weatherCity!.hashCode);
(weatherCity == null ? 0 : weatherCity!.hashCode) +
(isDate == null ? 0 : isDate!.hashCode) +
(isHour == null ? 0 : isHour!.hashCode);
@override
String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity]';
String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, isDate=$isDate, isHour=$isHour]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -221,6 +243,16 @@ class ConfigurationDTO {
} else {
json[r'weatherCity'] = null;
}
if (this.isDate != null) {
json[r'isDate'] = this.isDate;
} else {
json[r'isDate'] = null;
}
if (this.isHour != null) {
json[r'isHour'] = this.isHour;
} else {
json[r'isHour'] = null;
}
return json;
}
@ -264,6 +296,8 @@ class ConfigurationDTO {
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
weatherCity: mapValueOfType<String>(json, r'weatherCity'),
isDate: mapValueOfType<bool>(json, r'isDate'),
isHour: mapValueOfType<bool>(json, r'isHour'),
);
}
return null;

View File

@ -30,6 +30,8 @@ class ExportConfigurationDTO {
this.loaderImageId,
this.loaderImageUrl,
this.weatherCity,
this.isDate,
this.isHour,
this.sections = const [],
this.resources = const [],
});
@ -92,6 +94,22 @@ class ExportConfigurationDTO {
String? weatherCity;
///
/// 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.
///
bool? isDate;
///
/// 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.
///
bool? isHour;
List<SectionDTO>? sections;
List<ResourceDTO>? resources;
@ -115,6 +133,8 @@ class ExportConfigurationDTO {
other.loaderImageId == loaderImageId &&
other.loaderImageUrl == loaderImageUrl &&
other.weatherCity == weatherCity &&
other.isDate == isDate &&
other.isHour == isHour &&
other.sections == sections &&
other.resources == resources;
@ -138,11 +158,13 @@ class ExportConfigurationDTO {
(loaderImageId == null ? 0 : loaderImageId!.hashCode) +
(loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) +
(weatherCity == null ? 0 : weatherCity!.hashCode) +
(isDate == null ? 0 : isDate!.hashCode) +
(isHour == null ? 0 : isHour!.hashCode) +
(sections == null ? 0 : sections!.hashCode) +
(resources == null ? 0 : resources!.hashCode);
@override
String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, sections=$sections, resources=$resources]';
String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, isDate=$isDate, isHour=$isHour, sections=$sections, resources=$resources]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -231,6 +253,16 @@ class ExportConfigurationDTO {
} else {
json[r'weatherCity'] = null;
}
if (this.isDate != null) {
json[r'isDate'] = this.isDate;
} else {
json[r'isDate'] = null;
}
if (this.isHour != null) {
json[r'isHour'] = this.isHour;
} else {
json[r'isHour'] = null;
}
if (this.sections != null) {
json[r'sections'] = this.sections;
} else {
@ -284,6 +316,8 @@ class ExportConfigurationDTO {
loaderImageId: mapValueOfType<String>(json, r'loaderImageId'),
loaderImageUrl: mapValueOfType<String>(json, r'loaderImageUrl'),
weatherCity: mapValueOfType<String>(json, r'weatherCity'),
isDate: mapValueOfType<bool>(json, r'isDate'),
isHour: mapValueOfType<bool>(json, r'isHour'),
sections: SectionDTO.listFromJson(json[r'sections']),
resources: ResourceDTO.listFromJson(json[r'resources']),
);

View File

@ -15,6 +15,9 @@ class ResponseDTO {
ResponseDTO({
this.label = const [],
this.isGood,
this.resourceId,
this.resourceType,
this.resourceUrl,
this.order,
});
@ -28,6 +31,18 @@ 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
@ -40,6 +55,9 @@ 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
@ -47,10 +65,13 @@ 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, order=$order]';
String toString() => 'ResponseDTO[label=$label, isGood=$isGood, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -64,6 +85,21 @@ 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 {
@ -93,6 +129,9 @@ class ResponseDTO {
return ResponseDTO(
label: TranslationDTO.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'),
);
}