Update service generation

This commit is contained in:
Thomas Fransolet 2024-04-10 11:40:42 +02:00
parent 8893c75792
commit 4248da3b0d
7 changed files with 46 additions and 3 deletions

View File

@ -2237,6 +2237,10 @@ components:
nullable: true nullable: true
oneOf: oneOf:
- $ref: '#/components/schemas/CategorieDTO' - $ref: '#/components/schemas/CategorieDTO'
categorieId:
type: integer
format: int32
nullable: true
latitude: latitude:
type: string type: string
nullable: true nullable: true
@ -2287,6 +2291,10 @@ components:
type: object type: object
additionalProperties: false additionalProperties: false
properties: properties:
id:
type: integer
format: int32
nullable: true
label: label:
type: array type: array
nullable: true nullable: true

View File

@ -8,6 +8,7 @@ import 'package:manager_api_new/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []] **label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**icon** | **String** | | [optional] **icon** | **String** | | [optional]
**iconResourceId** | **String** | | [optional] **iconResourceId** | **String** | | [optional]

View File

@ -13,6 +13,7 @@ Name | Type | Description | Notes
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**contents** | [**List<ContentGeoPoint>**](ContentGeoPoint.md) | | [optional] [default to const []] **contents** | [**List<ContentGeoPoint>**](ContentGeoPoint.md) | | [optional] [default to const []]
**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional] **categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional]
**categorieId** | **int** | | [optional]
**latitude** | **String** | | [optional] **latitude** | **String** | | [optional]
**longitude** | **String** | | [optional] **longitude** | **String** | | [optional]
**schedules** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []] **schedules** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]

View File

@ -8,6 +8,7 @@ import 'package:manager_api_new/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []] **label** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**icon** | **String** | | [optional] **icon** | **String** | | [optional]
**iconResourceId** | **String** | | [optional] **iconResourceId** | **String** | | [optional]

View File

@ -13,6 +13,7 @@ part of openapi.api;
class CategorieDTO { class CategorieDTO {
/// Returns a new [CategorieDTO] instance. /// Returns a new [CategorieDTO] instance.
CategorieDTO({ CategorieDTO({
this.id,
this.label = const [], this.label = const [],
this.icon, this.icon,
this.iconResourceId, this.iconResourceId,
@ -20,6 +21,8 @@ class CategorieDTO {
this.order, this.order,
}); });
int? id;
List<TranslationDTO>? label; List<TranslationDTO>? label;
String? icon; String? icon;
@ -32,6 +35,7 @@ class CategorieDTO {
@override @override
bool operator ==(Object other) => identical(this, other) || other is CategorieDTO && bool operator ==(Object other) => identical(this, other) || other is CategorieDTO &&
other.id == id &&
other.label == label && other.label == label &&
other.icon == icon && other.icon == icon &&
other.iconResourceId == iconResourceId && other.iconResourceId == iconResourceId &&
@ -41,6 +45,7 @@ class CategorieDTO {
@override @override
int get hashCode => int get hashCode =>
// ignore: unnecessary_parenthesis // ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(label == null ? 0 : label!.hashCode) + (label == null ? 0 : label!.hashCode) +
(icon == null ? 0 : icon!.hashCode) + (icon == null ? 0 : icon!.hashCode) +
(iconResourceId == null ? 0 : iconResourceId!.hashCode) + (iconResourceId == null ? 0 : iconResourceId!.hashCode) +
@ -48,10 +53,15 @@ class CategorieDTO {
(order == null ? 0 : order!.hashCode); (order == null ? 0 : order!.hashCode);
@override @override
String toString() => 'CategorieDTO[label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; String toString() => 'CategorieDTO[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.label != null) { if (this.label != null) {
json[r'label'] = this.label; json[r'label'] = this.label;
} else { } else {
@ -99,6 +109,7 @@ class CategorieDTO {
}()); }());
return CategorieDTO( return CategorieDTO(
id: mapValueOfType<int>(json, r'id'),
label: TranslationDTO.listFromJson(json[r'label']), label: TranslationDTO.listFromJson(json[r'label']),
icon: mapValueOfType<String>(json, r'icon'), icon: mapValueOfType<String>(json, r'icon'),
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'), iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),

View File

@ -18,6 +18,7 @@ class GeoPointDTO {
this.description = const [], this.description = const [],
this.contents = const [], this.contents = const [],
this.categorie, this.categorie,
this.categorieId,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.schedules = const [], this.schedules = const [],
@ -36,6 +37,7 @@ class GeoPointDTO {
List<ContentGeoPoint>? contents; List<ContentGeoPoint>? contents;
CategorieDTO? categorie; CategorieDTO? categorie;
int? categorieId;
String? latitude; String? latitude;
@ -58,6 +60,7 @@ class GeoPointDTO {
other.description == description && other.description == description &&
other.contents == contents && other.contents == contents &&
other.categorie == categorie && other.categorie == categorie &&
other.categorieId == categorieId &&
other.latitude == latitude && other.latitude == latitude &&
other.longitude == longitude && other.longitude == longitude &&
other.schedules == schedules && other.schedules == schedules &&
@ -74,6 +77,7 @@ class GeoPointDTO {
(description == null ? 0 : description!.hashCode) + (description == null ? 0 : description!.hashCode) +
(contents == null ? 0 : contents!.hashCode) + (contents == null ? 0 : contents!.hashCode) +
(categorie == null ? 0 : categorie!.hashCode) + (categorie == null ? 0 : categorie!.hashCode) +
(categorieId == null ? 0 : categorieId!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) + (latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) + (longitude == null ? 0 : longitude!.hashCode) +
(schedules == null ? 0 : schedules!.hashCode) + (schedules == null ? 0 : schedules!.hashCode) +
@ -83,7 +87,7 @@ class GeoPointDTO {
(site == null ? 0 : site!.hashCode); (site == null ? 0 : site!.hashCode);
@override @override
String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, latitude=$latitude, longitude=$longitude, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]'; String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -112,6 +116,11 @@ class GeoPointDTO {
} else { } else {
json[r'categorie'] = null; json[r'categorie'] = null;
} }
if (this.categorieId != null) {
json[r'categorieId'] = this.categorieId;
} else {
json[r'categorieId'] = null;
}
if (this.latitude != null) { if (this.latitude != null) {
json[r'latitude'] = this.latitude; json[r'latitude'] = this.latitude;
} else { } else {
@ -174,6 +183,7 @@ class GeoPointDTO {
description: TranslationDTO.listFromJson(json[r'description']), description: TranslationDTO.listFromJson(json[r'description']),
contents: ContentGeoPoint.listFromJson(json[r'contents']), contents: ContentGeoPoint.listFromJson(json[r'contents']),
categorie: CategorieDTO.fromJson(json[r'categorie']), categorie: CategorieDTO.fromJson(json[r'categorie']),
categorieId: mapValueOfType<int>(json, r'categorieId'),
latitude: mapValueOfType<String>(json, r'latitude'), latitude: mapValueOfType<String>(json, r'latitude'),
longitude: mapValueOfType<String>(json, r'longitude'), longitude: mapValueOfType<String>(json, r'longitude'),
schedules: TranslationDTO.listFromJson(json[r'schedules']), schedules: TranslationDTO.listFromJson(json[r'schedules']),

View File

@ -13,6 +13,7 @@ part of openapi.api;
class GeoPointDTOCategorie { class GeoPointDTOCategorie {
/// Returns a new [GeoPointDTOCategorie] instance. /// Returns a new [GeoPointDTOCategorie] instance.
GeoPointDTOCategorie({ GeoPointDTOCategorie({
this.id,
this.label = const [], this.label = const [],
this.icon, this.icon,
this.iconResourceId, this.iconResourceId,
@ -20,6 +21,8 @@ class GeoPointDTOCategorie {
this.order, this.order,
}); });
int? id;
List<TranslationDTO>? label; List<TranslationDTO>? label;
String? icon; String? icon;
@ -32,6 +35,7 @@ class GeoPointDTOCategorie {
@override @override
bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie && bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie &&
other.id == id &&
other.label == label && other.label == label &&
other.icon == icon && other.icon == icon &&
other.iconResourceId == iconResourceId && other.iconResourceId == iconResourceId &&
@ -41,6 +45,7 @@ class GeoPointDTOCategorie {
@override @override
int get hashCode => int get hashCode =>
// ignore: unnecessary_parenthesis // ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(label == null ? 0 : label!.hashCode) + (label == null ? 0 : label!.hashCode) +
(icon == null ? 0 : icon!.hashCode) + (icon == null ? 0 : icon!.hashCode) +
(iconResourceId == null ? 0 : iconResourceId!.hashCode) + (iconResourceId == null ? 0 : iconResourceId!.hashCode) +
@ -48,10 +53,15 @@ class GeoPointDTOCategorie {
(order == null ? 0 : order!.hashCode); (order == null ? 0 : order!.hashCode);
@override @override
String toString() => 'GeoPointDTOCategorie[label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; String toString() => 'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.label != null) { if (this.label != null) {
json[r'label'] = this.label; json[r'label'] = this.label;
} else { } else {
@ -99,6 +109,7 @@ class GeoPointDTOCategorie {
}()); }());
return GeoPointDTOCategorie( return GeoPointDTOCategorie(
id: mapValueOfType<int>(json, r'id'),
label: TranslationDTO.listFromJson(json[r'label']), label: TranslationDTO.listFromJson(json[r'label']),
icon: mapValueOfType<String>(json, r'icon'), icon: mapValueOfType<String>(json, r'icon'),
iconResourceId: mapValueOfType<String>(json, r'iconResourceId'), iconResourceId: mapValueOfType<String>(json, r'iconResourceId'),