diff --git a/lib/api/swagger.yaml b/lib/api/swagger.yaml index d02d0b9..86fbead 100644 --- a/lib/api/swagger.yaml +++ b/lib/api/swagger.yaml @@ -5,7 +5,7 @@ info: description: API Manager Service version: Version Alpha servers: - - url: https://api.mymuseum.be + - url: http://localhost:5000 paths: /api/Configuration: get: @@ -1805,9 +1805,15 @@ components: nullable: true items: type: string - pinCode: - type: integer - format: int32 + loaderImageId: + type: string + nullable: true + loaderImageUrl: + type: string + nullable: true + weatherCity: + type: string + nullable: true TranslationDTO: type: object additionalProperties: false @@ -1945,7 +1951,7 @@ components: label: type: string nullable: true - data: + url: type: string nullable: true dateCreation: @@ -2088,6 +2094,11 @@ components: iconSource: type: string nullable: true + categories: + type: array + nullable: true + items: + $ref: '#/components/schemas/CategorieDTO' MapTypeApp: type: integer description: |- @@ -2125,37 +2136,56 @@ components: nullable: true items: $ref: '#/components/schemas/TranslationDTO' - images: + contents: type: array nullable: true items: - $ref: '#/components/schemas/ImageGeoPoint' + $ref: '#/components/schemas/ContentGeoPoint' + categorie: + nullable: true + oneOf: + - $ref: '#/components/schemas/CategorieDTO' latitude: type: string nullable: true longitude: type: string nullable: true - ImageGeoPoint: + ContentGeoPoint: type: object additionalProperties: false properties: - imageResourceId: + resourceId: type: string nullable: true - imageSource: + resourceType: + $ref: '#/components/schemas/ResourceType' + resourceUrl: + type: string + nullable: true + latitude: + type: string + nullable: true + CategorieDTO: + type: object + additionalProperties: false + properties: + name: + type: string + nullable: true + icon: type: string nullable: true SliderDTO: type: object additionalProperties: false properties: - images: + contents: type: array nullable: true items: - $ref: '#/components/schemas/ImageDTO' - ImageDTO: + $ref: '#/components/schemas/ContentDTO' + ContentDTO: type: object additionalProperties: false properties: @@ -2172,12 +2202,14 @@ components: resourceId: type: string nullable: true - source: + resourceUrl: type: string nullable: true order: type: integer format: int32 + resourceType: + $ref: '#/components/schemas/ResourceType' VideoDTO: type: object additionalProperties: false @@ -2251,7 +2283,9 @@ components: resourceId: type: string nullable: true - source: + resourceType: + $ref: '#/components/schemas/ResourceType' + resourceUrl: type: string nullable: true order: @@ -2283,7 +2317,9 @@ components: resourceId: type: string nullable: true - source: + resourceType: + $ref: '#/components/schemas/ResourceType' + resourceUrl: type: string nullable: true ArticleDTO: @@ -2304,16 +2340,19 @@ components: $ref: '#/components/schemas/TranslationDTO' isReadAudioAuto: type: boolean - images: + contents: type: array nullable: true items: - $ref: '#/components/schemas/ImageDTO' + $ref: '#/components/schemas/ContentDTO' PdfDTO: type: object additionalProperties: false properties: - source: + resourceId: + type: string + nullable: true + resourceUrl: type: string nullable: true PuzzleDTO: @@ -2333,12 +2372,15 @@ components: image: nullable: true oneOf: - - $ref: '#/components/schemas/ImageDTO' + - $ref: '#/components/schemas/ContentDTO' AgendaDTO: type: object additionalProperties: false properties: - source: + resourceId: + type: string + nullable: true + resourceUrl: type: string nullable: true User: diff --git a/manager_api/.openapi-generator/FILES b/manager_api/.openapi-generator/FILES index df15d92..4dbee0b 100644 --- a/manager_api/.openapi-generator/FILES +++ b/manager_api/.openapi-generator/FILES @@ -5,8 +5,11 @@ analysis_options.yaml doc/AgendaDTO.md doc/ArticleDTO.md doc/AuthenticationApi.md +doc/CategorieDTO.md doc/ConfigurationApi.md doc/ConfigurationDTO.md +doc/ContentDTO.md +doc/ContentGeoPoint.md doc/DeviceApi.md doc/DeviceDTO.md doc/DeviceDetailDTO.md @@ -14,8 +17,7 @@ doc/DeviceDetailDTOAllOf.md doc/ExportConfigurationDTO.md doc/ExportConfigurationDTOAllOf.md doc/GeoPointDTO.md -doc/ImageDTO.md -doc/ImageGeoPoint.md +doc/GeoPointDTOCategorie.md doc/Instance.md doc/InstanceApi.md doc/InstanceDTO.md @@ -65,15 +67,17 @@ lib/auth/http_bearer_auth.dart lib/auth/oauth.dart lib/model/agenda_dto.dart lib/model/article_dto.dart +lib/model/categorie_dto.dart lib/model/configuration_dto.dart +lib/model/content_dto.dart +lib/model/content_geo_point.dart lib/model/device_detail_dto.dart lib/model/device_detail_dto_all_of.dart lib/model/device_dto.dart lib/model/export_configuration_dto.dart lib/model/export_configuration_dto_all_of.dart lib/model/geo_point_dto.dart -lib/model/image_dto.dart -lib/model/image_geo_point.dart +lib/model/geo_point_dto_categorie.dart lib/model/instance.dart lib/model/instance_dto.dart lib/model/level_dto.dart @@ -101,7 +105,7 @@ lib/model/user_detail_dto.dart lib/model/video_dto.dart lib/model/web_dto.dart pubspec.yaml -test/agenda_dto_test.dart -test/pdf_dto_test.dart -test/puzzle_dto_image_test.dart -test/puzzle_dto_test.dart +test/categorie_dto_test.dart +test/content_dto_test.dart +test/content_geo_point_test.dart +test/geo_point_dto_categorie_test.dart diff --git a/manager_api/README.md b/manager_api/README.md index a50ecac..51c0bba 100644 --- a/manager_api/README.md +++ b/manager_api/README.md @@ -60,7 +60,7 @@ try { ## Documentation for API Endpoints -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -125,15 +125,17 @@ Class | Method | HTTP request | Description - [AgendaDTO](doc\/AgendaDTO.md) - [ArticleDTO](doc\/ArticleDTO.md) + - [CategorieDTO](doc\/CategorieDTO.md) - [ConfigurationDTO](doc\/ConfigurationDTO.md) + - [ContentDTO](doc\/ContentDTO.md) + - [ContentGeoPoint](doc\/ContentGeoPoint.md) - [DeviceDTO](doc\/DeviceDTO.md) - [DeviceDetailDTO](doc\/DeviceDetailDTO.md) - [DeviceDetailDTOAllOf](doc\/DeviceDetailDTOAllOf.md) - [ExportConfigurationDTO](doc\/ExportConfigurationDTO.md) - [ExportConfigurationDTOAllOf](doc\/ExportConfigurationDTOAllOf.md) - [GeoPointDTO](doc\/GeoPointDTO.md) - - [ImageDTO](doc\/ImageDTO.md) - - [ImageGeoPoint](doc\/ImageGeoPoint.md) + - [GeoPointDTOCategorie](doc\/GeoPointDTOCategorie.md) - [Instance](doc\/Instance.md) - [InstanceDTO](doc\/InstanceDTO.md) - [LevelDTO](doc\/LevelDTO.md) diff --git a/manager_api/doc/AgendaDTO.md b/manager_api/doc/AgendaDTO.md index 2992d03..33dd1e3 100644 --- a/manager_api/doc/AgendaDTO.md +++ b/manager_api/doc/AgendaDTO.md @@ -8,7 +8,8 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_** | **String** | | [optional] +**resourceId** | **String** | | [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) diff --git a/manager_api/doc/ArticleDTO.md b/manager_api/doc/ArticleDTO.md index 66b99a4..b8e31fb 100644 --- a/manager_api/doc/ArticleDTO.md +++ b/manager_api/doc/ArticleDTO.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **isContentTop** | **bool** | | [optional] **audioIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **isReadAudioAuto** | **bool** | | [optional] -**images** | [**List**](ImageDTO.md) | | [optional] [default to const []] +**contents** | [**List**](ContentDTO.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) diff --git a/manager_api/doc/AuthenticationApi.md b/manager_api/doc/AuthenticationApi.md index be64641..8fdf05d 100644 --- a/manager_api/doc/AuthenticationApi.md +++ b/manager_api/doc/AuthenticationApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/CategorieDTO.md b/manager_api/doc/CategorieDTO.md new file mode 100644 index 0000000..58c3a49 --- /dev/null +++ b/manager_api/doc/CategorieDTO.md @@ -0,0 +1,16 @@ +# manager_api.model.CategorieDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**icon** | **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) + + diff --git a/manager_api/doc/ConfigurationApi.md b/manager_api/doc/ConfigurationApi.md index a30aafb..99d625e 100644 --- a/manager_api/doc/ConfigurationApi.md +++ b/manager_api/doc/ConfigurationApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ConfigurationDTO.md b/manager_api/doc/ConfigurationDTO.md index f74d55c..ecf00ad 100644 --- a/manager_api/doc/ConfigurationDTO.md +++ b/manager_api/doc/ConfigurationDTO.md @@ -23,6 +23,9 @@ Name | Type | Description | Notes **instanceId** | **String** | | [optional] **sectionIds** | **List** | | [optional] [default to const []] **pinCode** | **int** | | [optional] +**loaderImageId** | **String** | | [optional] +**loaderImageUrl** | **String** | | [optional] +**weatherCity** | **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) diff --git a/manager_api/doc/ContentDTO.md b/manager_api/doc/ContentDTO.md new file mode 100644 index 0000000..47fe015 --- /dev/null +++ b/manager_api/doc/ContentDTO.md @@ -0,0 +1,20 @@ +# manager_api.model.ContentDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**resourceId** | **String** | | [optional] +**resourceUrl** | **String** | | [optional] +**order** | **int** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.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) + + diff --git a/manager_api/doc/ContentGeoPoint.md b/manager_api/doc/ContentGeoPoint.md new file mode 100644 index 0000000..95ac850 --- /dev/null +++ b/manager_api/doc/ContentGeoPoint.md @@ -0,0 +1,18 @@ +# manager_api.model.ContentGeoPoint + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resourceId** | **String** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**resourceUrl** | **String** | | [optional] +**latitude** | **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) + + diff --git a/manager_api/doc/DeviceApi.md b/manager_api/doc/DeviceApi.md index 30e9574..020ce00 100644 --- a/manager_api/doc/DeviceApi.md +++ b/manager_api/doc/DeviceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ExportConfigurationDTO.md b/manager_api/doc/ExportConfigurationDTO.md index d7e8a01..5821e63 100644 --- a/manager_api/doc/ExportConfigurationDTO.md +++ b/manager_api/doc/ExportConfigurationDTO.md @@ -23,6 +23,9 @@ Name | Type | Description | Notes **instanceId** | **String** | | [optional] **sectionIds** | **List** | | [optional] [default to const []] **pinCode** | **int** | | [optional] +**loaderImageId** | **String** | | [optional] +**loaderImageUrl** | **String** | | [optional] +**weatherCity** | **String** | | [optional] **sections** | [**List**](SectionDTO.md) | | [optional] [default to const []] **resources** | [**List**](ResourceDTO.md) | | [optional] [default to const []] diff --git a/manager_api/doc/GeoPointDTO.md b/manager_api/doc/GeoPointDTO.md index 7423c02..c22d4b3 100644 --- a/manager_api/doc/GeoPointDTO.md +++ b/manager_api/doc/GeoPointDTO.md @@ -11,7 +11,8 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**images** | [**List**](ImageGeoPoint.md) | | [optional] [default to const []] +**contents** | [**List**](ContentGeoPoint.md) | | [optional] [default to const []] +**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional] **latitude** | **String** | | [optional] **longitude** | **String** | | [optional] diff --git a/manager_api/doc/GeoPointDTOCategorie.md b/manager_api/doc/GeoPointDTOCategorie.md new file mode 100644 index 0000000..cc339e2 --- /dev/null +++ b/manager_api/doc/GeoPointDTOCategorie.md @@ -0,0 +1,16 @@ +# manager_api.model.GeoPointDTOCategorie + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**icon** | **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) + + diff --git a/manager_api/doc/InstanceApi.md b/manager_api/doc/InstanceApi.md index 7810fc6..4176d2e 100644 --- a/manager_api/doc/InstanceApi.md +++ b/manager_api/doc/InstanceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/LevelDTO.md b/manager_api/doc/LevelDTO.md index e936fdb..d50dfe4 100644 --- a/manager_api/doc/LevelDTO.md +++ b/manager_api/doc/LevelDTO.md @@ -10,7 +10,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **resourceId** | **String** | | [optional] -**source_** | **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) diff --git a/manager_api/doc/MapDTO.md b/manager_api/doc/MapDTO.md index 8701cf7..b066539 100644 --- a/manager_api/doc/MapDTO.md +++ b/manager_api/doc/MapDTO.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **points** | [**List**](GeoPointDTO.md) | | [optional] [default to const []] **iconResourceId** | **String** | | [optional] **iconSource** | **String** | | [optional] +**categories** | [**List**](CategorieDTO.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) diff --git a/manager_api/doc/PdfDTO.md b/manager_api/doc/PdfDTO.md index 4d4f8e0..11d011a 100644 --- a/manager_api/doc/PdfDTO.md +++ b/manager_api/doc/PdfDTO.md @@ -8,7 +8,8 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**source_** | **String** | | [optional] +**resourceId** | **String** | | [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) diff --git a/manager_api/doc/PuzzleDTOImage.md b/manager_api/doc/PuzzleDTOImage.md index 6df0900..cc2e07a 100644 --- a/manager_api/doc/PuzzleDTOImage.md +++ b/manager_api/doc/PuzzleDTOImage.md @@ -11,8 +11,9 @@ Name | Type | Description | Notes **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **resourceId** | **String** | | [optional] -**source_** | **String** | | [optional] +**resourceUrl** | **String** | | [optional] **order** | **int** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.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) diff --git a/manager_api/doc/QuestionDTO.md b/manager_api/doc/QuestionDTO.md index f119fb3..e4bbbb3 100644 --- a/manager_api/doc/QuestionDTO.md +++ b/manager_api/doc/QuestionDTO.md @@ -11,7 +11,8 @@ Name | Type | Description | Notes **label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **responses** | [**List**](ResponseDTO.md) | | [optional] [default to const []] **resourceId** | **String** | | [optional] -**source_** | **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) diff --git a/manager_api/doc/QuizzDTOBadLevel.md b/manager_api/doc/QuizzDTOBadLevel.md index 94aa6b1..48b8beb 100644 --- a/manager_api/doc/QuizzDTOBadLevel.md +++ b/manager_api/doc/QuizzDTOBadLevel.md @@ -10,7 +10,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **resourceId** | **String** | | [optional] -**source_** | **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) diff --git a/manager_api/doc/ResourceApi.md b/manager_api/doc/ResourceApi.md index 83d00db..fb6bad9 100644 --- a/manager_api/doc/ResourceApi.md +++ b/manager_api/doc/ResourceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ResourceDTO.md b/manager_api/doc/ResourceDTO.md index 6289a37..8f3ef86 100644 --- a/manager_api/doc/ResourceDTO.md +++ b/manager_api/doc/ResourceDTO.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **type** | [**ResourceType**](ResourceType.md) | | [optional] **label** | **String** | | [optional] -**data** | **String** | | [optional] +**url** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] diff --git a/manager_api/doc/SectionApi.md b/manager_api/doc/SectionApi.md index ffdf049..6afa0b2 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api/doc/SectionApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/SliderDTO.md b/manager_api/doc/SliderDTO.md index 36c8207..31d6839 100644 --- a/manager_api/doc/SliderDTO.md +++ b/manager_api/doc/SliderDTO.md @@ -8,7 +8,7 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | [**List**](ImageDTO.md) | | [optional] [default to const []] +**contents** | [**List**](ContentDTO.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) diff --git a/manager_api/doc/UserApi.md b/manager_api/doc/UserApi.md index 5963708..6a55295 100644 --- a/manager_api/doc/UserApi.md +++ b/manager_api/doc/UserApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *http://localhost:5000* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/lib/api.dart b/manager_api/lib/api.dart index 8d1a702..d05a44a 100644 --- a/manager_api/lib/api.dart +++ b/manager_api/lib/api.dart @@ -37,15 +37,17 @@ part 'api/user_api.dart'; part 'model/agenda_dto.dart'; part 'model/article_dto.dart'; +part 'model/categorie_dto.dart'; part 'model/configuration_dto.dart'; +part 'model/content_dto.dart'; +part 'model/content_geo_point.dart'; part 'model/device_dto.dart'; part 'model/device_detail_dto.dart'; part 'model/device_detail_dto_all_of.dart'; part 'model/export_configuration_dto.dart'; part 'model/export_configuration_dto_all_of.dart'; part 'model/geo_point_dto.dart'; -part 'model/image_dto.dart'; -part 'model/image_geo_point.dart'; +part 'model/geo_point_dto_categorie.dart'; part 'model/instance.dart'; part 'model/instance_dto.dart'; part 'model/level_dto.dart'; diff --git a/manager_api/lib/api_client.dart b/manager_api/lib/api_client.dart index 7274129..d12228b 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api/lib/api_client.dart @@ -11,7 +11,7 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'https://api.mymuseum.be', this.authentication,}); + ApiClient({this.basePath = 'http://localhost:5000', this.authentication,}); final String basePath; final Authentication? authentication; @@ -185,8 +185,14 @@ class ApiClient { return AgendaDTO.fromJson(value); case 'ArticleDTO': return ArticleDTO.fromJson(value); + case 'CategorieDTO': + return CategorieDTO.fromJson(value); case 'ConfigurationDTO': return ConfigurationDTO.fromJson(value); + case 'ContentDTO': + return ContentDTO.fromJson(value); + case 'ContentGeoPoint': + return ContentGeoPoint.fromJson(value); case 'DeviceDTO': return DeviceDTO.fromJson(value); case 'DeviceDetailDTO': @@ -199,10 +205,8 @@ class ApiClient { return ExportConfigurationDTOAllOf.fromJson(value); case 'GeoPointDTO': return GeoPointDTO.fromJson(value); - case 'ImageDTO': - return ImageDTO.fromJson(value); - case 'ImageGeoPoint': - return ImageGeoPoint.fromJson(value); + case 'GeoPointDTOCategorie': + return GeoPointDTOCategorie.fromJson(value); case 'Instance': return Instance.fromJson(value); case 'InstanceDTO': diff --git a/manager_api/lib/model/agenda_dto.dart b/manager_api/lib/model/agenda_dto.dart index a5de819..1e46c8d 100644 --- a/manager_api/lib/model/agenda_dto.dart +++ b/manager_api/lib/model/agenda_dto.dart @@ -13,29 +13,39 @@ part of openapi.api; class AgendaDTO { /// Returns a new [AgendaDTO] instance. AgendaDTO({ - this.source_, + this.resourceId, + this.resourceUrl, }); - String? source_; + String? resourceId; + + String? resourceUrl; @override bool operator ==(Object other) => identical(this, other) || other is AgendaDTO && - other.source_ == source_; + other.resourceId == resourceId && + other.resourceUrl == resourceUrl; @override int get hashCode => // ignore: unnecessary_parenthesis - (source_ == null ? 0 : source_!.hashCode); + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode); @override - String toString() => 'AgendaDTO[source_=$source_]'; + String toString() => 'AgendaDTO[resourceId=$resourceId, resourceUrl=$resourceUrl]'; Map toJson() { final json = {}; - if (this.source_ != null) { - json[r'source'] = this.source_; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; } else { - json[r'source'] = null; + json[r'resourceId'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; } return json; } @@ -59,7 +69,8 @@ class AgendaDTO { }()); return AgendaDTO( - source_: mapValueOfType(json, r'source'), + resourceId: mapValueOfType(json, r'resourceId'), + resourceUrl: mapValueOfType(json, r'resourceUrl'), ); } return null; diff --git a/manager_api/lib/model/article_dto.dart b/manager_api/lib/model/article_dto.dart index 3b72137..2221429 100644 --- a/manager_api/lib/model/article_dto.dart +++ b/manager_api/lib/model/article_dto.dart @@ -17,7 +17,7 @@ class ArticleDTO { this.isContentTop, this.audioIds = const [], this.isReadAudioAuto, - this.images = const [], + this.contents = const [], }); List? content; @@ -40,7 +40,7 @@ class ArticleDTO { /// bool? isReadAudioAuto; - List? images; + List? contents; @override bool operator ==(Object other) => identical(this, other) || other is ArticleDTO && @@ -48,7 +48,7 @@ class ArticleDTO { other.isContentTop == isContentTop && other.audioIds == audioIds && other.isReadAudioAuto == isReadAudioAuto && - other.images == images; + other.contents == contents; @override int get hashCode => @@ -57,10 +57,10 @@ class ArticleDTO { (isContentTop == null ? 0 : isContentTop!.hashCode) + (audioIds == null ? 0 : audioIds!.hashCode) + (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + - (images == null ? 0 : images!.hashCode); + (contents == null ? 0 : contents!.hashCode); @override - String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]'; + String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; Map toJson() { final json = {}; @@ -84,10 +84,10 @@ class ArticleDTO { } else { json[r'isReadAudioAuto'] = null; } - if (this.images != null) { - json[r'images'] = this.images; + if (this.contents != null) { + json[r'contents'] = this.contents; } else { - json[r'images'] = null; + json[r'contents'] = null; } return json; } @@ -115,7 +115,7 @@ class ArticleDTO { isContentTop: mapValueOfType(json, r'isContentTop'), audioIds: TranslationDTO.listFromJson(json[r'audioIds']), isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), - images: ImageDTO.listFromJson(json[r'images']), + contents: ContentDTO.listFromJson(json[r'contents']), ); } return null; diff --git a/manager_api/lib/model/categorie_dto.dart b/manager_api/lib/model/categorie_dto.dart new file mode 100644 index 0000000..ce4fcbe --- /dev/null +++ b/manager_api/lib/model/categorie_dto.dart @@ -0,0 +1,123 @@ +// +// 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 CategorieDTO { + /// Returns a new [CategorieDTO] instance. + CategorieDTO({ + this.name, + this.icon, + }); + + String? name; + + String? icon; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategorieDTO && + other.name == name && + other.icon == icon; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (icon == null ? 0 : icon!.hashCode); + + @override + String toString() => 'CategorieDTO[name=$name, icon=$icon]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.icon != null) { + json[r'icon'] = this.icon; + } else { + json[r'icon'] = null; + } + return json; + } + + /// Returns a new [CategorieDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategorieDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // 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 "CategorieDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategorieDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategorieDTO( + name: mapValueOfType(json, r'name'), + icon: mapValueOfType(json, r'icon'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategorieDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategorieDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategorieDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategorieDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/configuration_dto.dart b/manager_api/lib/model/configuration_dto.dart index 7f523e0..f99c484 100644 --- a/manager_api/lib/model/configuration_dto.dart +++ b/manager_api/lib/model/configuration_dto.dart @@ -28,6 +28,9 @@ class ConfigurationDTO { this.instanceId, this.sectionIds = const [], this.pinCode, + this.loaderImageId, + this.loaderImageUrl, + this.weatherCity, }); String? id; @@ -90,6 +93,12 @@ class ConfigurationDTO { /// int? pinCode; + String? loaderImageId; + + String? loaderImageUrl; + + String? weatherCity; + @override bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO && other.id == id && @@ -106,7 +115,10 @@ class ConfigurationDTO { other.isOffline == isOffline && other.instanceId == instanceId && other.sectionIds == sectionIds && - other.pinCode == pinCode; + other.pinCode == pinCode && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.weatherCity == weatherCity; @override int get hashCode => @@ -125,10 +137,13 @@ class ConfigurationDTO { (isOffline == null ? 0 : isOffline!.hashCode) + (instanceId == null ? 0 : instanceId!.hashCode) + (sectionIds == null ? 0 : sectionIds!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); + (pinCode == null ? 0 : pinCode!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (weatherCity == null ? 0 : weatherCity!.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, pinCode=$pinCode]'; + 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, pinCode=$pinCode, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity]'; Map toJson() { final json = {}; @@ -207,6 +222,21 @@ class ConfigurationDTO { } else { json[r'pinCode'] = null; } + if (this.loaderImageId != null) { + json[r'loaderImageId'] = this.loaderImageId; + } else { + json[r'loaderImageId'] = null; + } + if (this.loaderImageUrl != null) { + json[r'loaderImageUrl'] = this.loaderImageUrl; + } else { + json[r'loaderImageUrl'] = null; + } + if (this.weatherCity != null) { + json[r'weatherCity'] = this.weatherCity; + } else { + json[r'weatherCity'] = null; + } return json; } @@ -248,6 +278,9 @@ class ConfigurationDTO { ? (json[r'sectionIds'] as List).cast() : const [], pinCode: mapValueOfType(json, r'pinCode'), + loaderImageId: mapValueOfType(json, r'loaderImageId'), + loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), + weatherCity: mapValueOfType(json, r'weatherCity'), ); } return null; diff --git a/manager_api/lib/model/content_dto.dart b/manager_api/lib/model/content_dto.dart new file mode 100644 index 0000000..32512da --- /dev/null +++ b/manager_api/lib/model/content_dto.dart @@ -0,0 +1,179 @@ +// +// 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 ContentDTO { + /// Returns a new [ContentDTO] instance. + ContentDTO({ + this.title = const [], + this.description = const [], + this.resourceId, + this.resourceUrl, + this.order, + this.resourceType, + }); + + List? title; + + List? description; + + String? resourceId; + + 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 + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + /// + /// 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; + + @override + bool operator ==(Object other) => identical(this, other) || other is ContentDTO && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.resourceUrl == resourceUrl && + other.order == order && + other.resourceType == resourceType; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode); + + @override + String toString() => 'ContentDTO[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + + Map toJson() { + final json = {}; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = 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 { + json[r'order'] = null; + } + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; + } else { + json[r'resourceType'] = null; + } + return json; + } + + /// Returns a new [ContentDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ContentDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // 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 "ContentDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ContentDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ContentDTO( + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + resourceId: mapValueOfType(json, r'resourceId'), + resourceUrl: mapValueOfType(json, r'resourceUrl'), + order: mapValueOfType(json, r'order'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ContentDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ContentDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ContentDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ContentDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/content_geo_point.dart b/manager_api/lib/model/content_geo_point.dart new file mode 100644 index 0000000..e8fe80f --- /dev/null +++ b/manager_api/lib/model/content_geo_point.dart @@ -0,0 +1,151 @@ +// +// 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 ContentGeoPoint { + /// Returns a new [ContentGeoPoint] instance. + ContentGeoPoint({ + this.resourceId, + this.resourceType, + this.resourceUrl, + this.latitude, + }); + + 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; + + String? latitude; + + @override + bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint && + other.resourceId == resourceId && + other.resourceType == resourceType && + other.resourceUrl == resourceUrl && + other.latitude == latitude; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode); + + @override + String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, latitude=$latitude]'; + + Map toJson() { + final json = {}; + 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.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + return json; + } + + /// Returns a new [ContentGeoPoint] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ContentGeoPoint? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // 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 "ContentGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ContentGeoPoint[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ContentGeoPoint( + resourceId: mapValueOfType(json, r'resourceId'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceUrl: mapValueOfType(json, r'resourceUrl'), + latitude: mapValueOfType(json, r'latitude'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ContentGeoPoint.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ContentGeoPoint.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ContentGeoPoint-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ContentGeoPoint.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/export_configuration_dto.dart b/manager_api/lib/model/export_configuration_dto.dart index 19ca31a..c5d6fd7 100644 --- a/manager_api/lib/model/export_configuration_dto.dart +++ b/manager_api/lib/model/export_configuration_dto.dart @@ -28,6 +28,9 @@ class ExportConfigurationDTO { this.instanceId, this.sectionIds = const [], this.pinCode, + this.loaderImageId, + this.loaderImageUrl, + this.weatherCity, this.sections = const [], this.resources = const [], }); @@ -92,6 +95,12 @@ class ExportConfigurationDTO { /// int? pinCode; + String? loaderImageId; + + String? loaderImageUrl; + + String? weatherCity; + List? sections; List? resources; @@ -113,6 +122,9 @@ class ExportConfigurationDTO { other.instanceId == instanceId && other.sectionIds == sectionIds && other.pinCode == pinCode && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.weatherCity == weatherCity && other.sections == sections && other.resources == resources; @@ -134,11 +146,14 @@ class ExportConfigurationDTO { (instanceId == null ? 0 : instanceId!.hashCode) + (sectionIds == null ? 0 : sectionIds!.hashCode) + (pinCode == null ? 0 : pinCode!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (weatherCity == null ? 0 : weatherCity!.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, pinCode=$pinCode, 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, pinCode=$pinCode, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, sections=$sections, resources=$resources]'; Map toJson() { final json = {}; @@ -217,6 +232,21 @@ class ExportConfigurationDTO { } else { json[r'pinCode'] = null; } + if (this.loaderImageId != null) { + json[r'loaderImageId'] = this.loaderImageId; + } else { + json[r'loaderImageId'] = null; + } + if (this.loaderImageUrl != null) { + json[r'loaderImageUrl'] = this.loaderImageUrl; + } else { + json[r'loaderImageUrl'] = null; + } + if (this.weatherCity != null) { + json[r'weatherCity'] = this.weatherCity; + } else { + json[r'weatherCity'] = null; + } if (this.sections != null) { json[r'sections'] = this.sections; } else { @@ -268,6 +298,9 @@ class ExportConfigurationDTO { ? (json[r'sectionIds'] as List).cast() : const [], pinCode: mapValueOfType(json, r'pinCode'), + loaderImageId: mapValueOfType(json, r'loaderImageId'), + loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), + weatherCity: mapValueOfType(json, r'weatherCity'), sections: SectionDTO.listFromJson(json[r'sections']), resources: ResourceDTO.listFromJson(json[r'resources']), ); diff --git a/manager_api/lib/model/geo_point_dto.dart b/manager_api/lib/model/geo_point_dto.dart index e03a69c..0055667 100644 --- a/manager_api/lib/model/geo_point_dto.dart +++ b/manager_api/lib/model/geo_point_dto.dart @@ -16,7 +16,8 @@ class GeoPointDTO { this.id, this.title = const [], this.description = const [], - this.images = const [], + this.contents = const [], + this.categorie, this.latitude, this.longitude, }); @@ -33,7 +34,9 @@ class GeoPointDTO { List? description; - List? images; + List? contents; + + GeoPointDTOCategorie? categorie; String? latitude; @@ -44,7 +47,8 @@ class GeoPointDTO { other.id == id && other.title == title && other.description == description && - other.images == images && + other.contents == contents && + other.categorie == categorie && other.latitude == latitude && other.longitude == longitude; @@ -54,12 +58,13 @@ class GeoPointDTO { (id == null ? 0 : id!.hashCode) + (title == null ? 0 : title!.hashCode) + (description == null ? 0 : description!.hashCode) + - (images == null ? 0 : images!.hashCode) + + (contents == null ? 0 : contents!.hashCode) + + (categorie == null ? 0 : categorie!.hashCode) + (latitude == null ? 0 : latitude!.hashCode) + (longitude == null ? 0 : longitude!.hashCode); @override - String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, images=$images, latitude=$latitude, longitude=$longitude]'; + String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, latitude=$latitude, longitude=$longitude]'; Map toJson() { final json = {}; @@ -78,10 +83,15 @@ class GeoPointDTO { } else { json[r'description'] = null; } - if (this.images != null) { - json[r'images'] = this.images; + if (this.contents != null) { + json[r'contents'] = this.contents; } else { - json[r'images'] = null; + json[r'contents'] = null; + } + if (this.categorie != null) { + json[r'categorie'] = this.categorie; + } else { + json[r'categorie'] = null; } if (this.latitude != null) { json[r'latitude'] = this.latitude; @@ -118,7 +128,8 @@ class GeoPointDTO { id: mapValueOfType(json, r'id'), title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), - images: ImageGeoPoint.listFromJson(json[r'images']), + contents: ContentGeoPoint.listFromJson(json[r'contents']), + categorie: GeoPointDTOCategorie.fromJson(json[r'categorie']), latitude: mapValueOfType(json, r'latitude'), longitude: mapValueOfType(json, r'longitude'), ); diff --git a/manager_api/lib/model/geo_point_dto_categorie.dart b/manager_api/lib/model/geo_point_dto_categorie.dart new file mode 100644 index 0000000..184646a --- /dev/null +++ b/manager_api/lib/model/geo_point_dto_categorie.dart @@ -0,0 +1,123 @@ +// +// 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 GeoPointDTOCategorie { + /// Returns a new [GeoPointDTOCategorie] instance. + GeoPointDTOCategorie({ + this.name, + this.icon, + }); + + String? name; + + String? icon; + + @override + bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie && + other.name == name && + other.icon == icon; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (icon == null ? 0 : icon!.hashCode); + + @override + String toString() => 'GeoPointDTOCategorie[name=$name, icon=$icon]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.icon != null) { + json[r'icon'] = this.icon; + } else { + json[r'icon'] = null; + } + return json; + } + + /// Returns a new [GeoPointDTOCategorie] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPointDTOCategorie? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // 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 "GeoPointDTOCategorie[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPointDTOCategorie( + name: mapValueOfType(json, r'name'), + icon: mapValueOfType(json, r'icon'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GeoPointDTOCategorie.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPointDTOCategorie.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPointDTOCategorie-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GeoPointDTOCategorie.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/level_dto.dart b/manager_api/lib/model/level_dto.dart index 3332644..ae154d9 100644 --- a/manager_api/lib/model/level_dto.dart +++ b/manager_api/lib/model/level_dto.dart @@ -15,30 +15,41 @@ class LevelDTO { LevelDTO({ this.label = const [], this.resourceId, - this.source_, + this.resourceType, + this.resourceUrl, }); List? label; String? resourceId; - String? source_; + /// + /// 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 LevelDTO && other.label == label && other.resourceId == resourceId && - other.source_ == source_; + other.resourceType == resourceType && + other.resourceUrl == resourceUrl; @override int get hashCode => // ignore: unnecessary_parenthesis (label == null ? 0 : label!.hashCode) + (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode); + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode); @override - String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, source_=$source_]'; + String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]'; Map toJson() { final json = {}; @@ -52,10 +63,15 @@ class LevelDTO { } else { json[r'resourceId'] = null; } - if (this.source_ != null) { - json[r'source'] = this.source_; + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; } else { - json[r'source'] = null; + json[r'resourceType'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; } return json; } @@ -81,7 +97,8 @@ class LevelDTO { return LevelDTO( label: TranslationDTO.listFromJson(json[r'label']), resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceUrl: mapValueOfType(json, r'resourceUrl'), ); } return null; diff --git a/manager_api/lib/model/map_dto.dart b/manager_api/lib/model/map_dto.dart index b193330..c9614c2 100644 --- a/manager_api/lib/model/map_dto.dart +++ b/manager_api/lib/model/map_dto.dart @@ -18,6 +18,7 @@ class MapDTO { this.points = const [], this.iconResourceId, this.iconSource, + this.categories = const [], }); /// @@ -42,13 +43,16 @@ class MapDTO { String? iconSource; + List? categories; + @override bool operator ==(Object other) => identical(this, other) || other is MapDTO && other.zoom == zoom && other.mapType == mapType && other.points == points && other.iconResourceId == iconResourceId && - other.iconSource == iconSource; + other.iconSource == iconSource && + other.categories == categories; @override int get hashCode => @@ -57,10 +61,11 @@ class MapDTO { (mapType == null ? 0 : mapType!.hashCode) + (points == null ? 0 : points!.hashCode) + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconSource == null ? 0 : iconSource!.hashCode); + (iconSource == null ? 0 : iconSource!.hashCode) + + (categories == null ? 0 : categories!.hashCode); @override - String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]'; + String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories]'; Map toJson() { final json = {}; @@ -89,6 +94,11 @@ class MapDTO { } else { json[r'iconSource'] = null; } + if (this.categories != null) { + json[r'categories'] = this.categories; + } else { + json[r'categories'] = null; + } return json; } @@ -116,6 +126,7 @@ class MapDTO { points: GeoPointDTO.listFromJson(json[r'points']), iconResourceId: mapValueOfType(json, r'iconResourceId'), iconSource: mapValueOfType(json, r'iconSource'), + categories: CategorieDTO.listFromJson(json[r'categories']), ); } return null; diff --git a/manager_api/lib/model/pdf_dto.dart b/manager_api/lib/model/pdf_dto.dart index 505e5ff..a6242cc 100644 --- a/manager_api/lib/model/pdf_dto.dart +++ b/manager_api/lib/model/pdf_dto.dart @@ -13,29 +13,39 @@ part of openapi.api; class PdfDTO { /// Returns a new [PdfDTO] instance. PdfDTO({ - this.source_, + this.resourceId, + this.resourceUrl, }); - String? source_; + String? resourceId; + + String? resourceUrl; @override bool operator ==(Object other) => identical(this, other) || other is PdfDTO && - other.source_ == source_; + other.resourceId == resourceId && + other.resourceUrl == resourceUrl; @override int get hashCode => // ignore: unnecessary_parenthesis - (source_ == null ? 0 : source_!.hashCode); + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode); @override - String toString() => 'PdfDTO[source_=$source_]'; + String toString() => 'PdfDTO[resourceId=$resourceId, resourceUrl=$resourceUrl]'; Map toJson() { final json = {}; - if (this.source_ != null) { - json[r'source'] = this.source_; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; } else { - json[r'source'] = null; + json[r'resourceId'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; } return json; } @@ -59,7 +69,8 @@ class PdfDTO { }()); return PdfDTO( - source_: mapValueOfType(json, r'source'), + resourceId: mapValueOfType(json, r'resourceId'), + resourceUrl: mapValueOfType(json, r'resourceUrl'), ); } return null; diff --git a/manager_api/lib/model/puzzle_dto_image.dart b/manager_api/lib/model/puzzle_dto_image.dart index cdd7d4c..1cd92ce 100644 --- a/manager_api/lib/model/puzzle_dto_image.dart +++ b/manager_api/lib/model/puzzle_dto_image.dart @@ -16,8 +16,9 @@ class PuzzleDTOImage { this.title = const [], this.description = const [], this.resourceId, - this.source_, + this.resourceUrl, this.order, + this.resourceType, }); List? title; @@ -26,7 +27,7 @@ class PuzzleDTOImage { String? resourceId; - String? source_; + String? resourceUrl; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -36,13 +37,22 @@ class PuzzleDTOImage { /// int? order; + /// + /// 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; + @override bool operator ==(Object other) => identical(this, other) || other is PuzzleDTOImage && other.title == title && other.description == description && other.resourceId == resourceId && - other.source_ == source_ && - other.order == order; + other.resourceUrl == resourceUrl && + other.order == order && + other.resourceType == resourceType; @override int get hashCode => @@ -50,11 +60,12 @@ class PuzzleDTOImage { (title == null ? 0 : title!.hashCode) + (description == null ? 0 : description!.hashCode) + (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode) + - (order == null ? 0 : order!.hashCode); + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode); @override - String toString() => 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; + String toString() => 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; Map toJson() { final json = {}; @@ -73,16 +84,21 @@ class PuzzleDTOImage { } else { json[r'resourceId'] = null; } - if (this.source_ != null) { - json[r'source'] = this.source_; + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; } else { - json[r'source'] = null; + json[r'resourceUrl'] = null; } if (this.order != null) { json[r'order'] = this.order; } else { json[r'order'] = null; } + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; + } else { + json[r'resourceType'] = null; + } return json; } @@ -108,8 +124,9 @@ class PuzzleDTOImage { title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + resourceUrl: mapValueOfType(json, r'resourceUrl'), order: mapValueOfType(json, r'order'), + resourceType: ResourceType.fromJson(json[r'resourceType']), ); } return null; diff --git a/manager_api/lib/model/question_dto.dart b/manager_api/lib/model/question_dto.dart index 9d52588..e2ee08c 100644 --- a/manager_api/lib/model/question_dto.dart +++ b/manager_api/lib/model/question_dto.dart @@ -16,7 +16,8 @@ class QuestionDTO { this.label = const [], this.responses = const [], this.resourceId, - this.source_, + this.resourceType, + this.resourceUrl, this.order, }); @@ -26,7 +27,15 @@ class QuestionDTO { String? resourceId; - String? source_; + /// + /// 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 @@ -41,7 +50,8 @@ class QuestionDTO { other.label == label && other.responses == responses && other.resourceId == resourceId && - other.source_ == source_ && + other.resourceType == resourceType && + other.resourceUrl == resourceUrl && other.order == order; @override @@ -50,11 +60,12 @@ class QuestionDTO { (label == null ? 0 : label!.hashCode) + (responses == null ? 0 : responses!.hashCode) + (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + (order == null ? 0 : order!.hashCode); @override - String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, source_=$source_, order=$order]'; + String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, order=$order]'; Map toJson() { final json = {}; @@ -73,10 +84,15 @@ class QuestionDTO { } else { json[r'resourceId'] = null; } - if (this.source_ != null) { - json[r'source'] = this.source_; + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; } else { - json[r'source'] = null; + 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; @@ -108,7 +124,8 @@ class QuestionDTO { label: TranslationDTO.listFromJson(json[r'label']), responses: ResponseDTO.listFromJson(json[r'responses']), resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceUrl: mapValueOfType(json, r'resourceUrl'), order: mapValueOfType(json, r'order'), ); } diff --git a/manager_api/lib/model/quizz_dto_bad_level.dart b/manager_api/lib/model/quizz_dto_bad_level.dart index af82dd0..63b674b 100644 --- a/manager_api/lib/model/quizz_dto_bad_level.dart +++ b/manager_api/lib/model/quizz_dto_bad_level.dart @@ -15,30 +15,41 @@ class QuizzDTOBadLevel { QuizzDTOBadLevel({ this.label = const [], this.resourceId, - this.source_, + this.resourceType, + this.resourceUrl, }); List? label; String? resourceId; - String? source_; + /// + /// 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 QuizzDTOBadLevel && other.label == label && other.resourceId == resourceId && - other.source_ == source_; + other.resourceType == resourceType && + other.resourceUrl == resourceUrl; @override int get hashCode => // ignore: unnecessary_parenthesis (label == null ? 0 : label!.hashCode) + (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode); + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode); @override - String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, source_=$source_]'; + String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]'; Map toJson() { final json = {}; @@ -52,10 +63,15 @@ class QuizzDTOBadLevel { } else { json[r'resourceId'] = null; } - if (this.source_ != null) { - json[r'source'] = this.source_; + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; } else { - json[r'source'] = null; + json[r'resourceType'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; } return json; } @@ -81,7 +97,8 @@ class QuizzDTOBadLevel { return QuizzDTOBadLevel( label: TranslationDTO.listFromJson(json[r'label']), resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceUrl: mapValueOfType(json, r'resourceUrl'), ); } return null; diff --git a/manager_api/lib/model/resource_dto.dart b/manager_api/lib/model/resource_dto.dart index 551145c..028b523 100644 --- a/manager_api/lib/model/resource_dto.dart +++ b/manager_api/lib/model/resource_dto.dart @@ -16,7 +16,7 @@ class ResourceDTO { this.id, this.type, this.label, - this.data, + this.url, this.dateCreation, this.instanceId, }); @@ -33,7 +33,7 @@ class ResourceDTO { String? label; - String? data; + String? url; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -50,7 +50,7 @@ class ResourceDTO { other.id == id && other.type == type && other.label == label && - other.data == data && + other.url == url && other.dateCreation == dateCreation && other.instanceId == instanceId; @@ -60,12 +60,12 @@ class ResourceDTO { (id == null ? 0 : id!.hashCode) + (type == null ? 0 : type!.hashCode) + (label == null ? 0 : label!.hashCode) + - (data == null ? 0 : data!.hashCode) + + (url == null ? 0 : url!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, data=$data, dateCreation=$dateCreation, instanceId=$instanceId]'; + String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; Map toJson() { final json = {}; @@ -84,10 +84,10 @@ class ResourceDTO { } else { json[r'label'] = null; } - if (this.data != null) { - json[r'data'] = this.data; + if (this.url != null) { + json[r'url'] = this.url; } else { - json[r'data'] = null; + json[r'url'] = null; } if (this.dateCreation != null) { json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); @@ -124,7 +124,7 @@ class ResourceDTO { id: mapValueOfType(json, r'id'), type: ResourceType.fromJson(json[r'type']), label: mapValueOfType(json, r'label'), - data: mapValueOfType(json, r'data'), + url: mapValueOfType(json, r'url'), dateCreation: mapDateTime(json, r'dateCreation', ''), instanceId: mapValueOfType(json, r'instanceId'), ); diff --git a/manager_api/lib/model/slider_dto.dart b/manager_api/lib/model/slider_dto.dart index 6cf9a47..837fb7a 100644 --- a/manager_api/lib/model/slider_dto.dart +++ b/manager_api/lib/model/slider_dto.dart @@ -13,29 +13,29 @@ part of openapi.api; class SliderDTO { /// Returns a new [SliderDTO] instance. SliderDTO({ - this.images = const [], + this.contents = const [], }); - List? images; + List? contents; @override bool operator ==(Object other) => identical(this, other) || other is SliderDTO && - other.images == images; + other.contents == contents; @override int get hashCode => // ignore: unnecessary_parenthesis - (images == null ? 0 : images!.hashCode); + (contents == null ? 0 : contents!.hashCode); @override - String toString() => 'SliderDTO[images=$images]'; + String toString() => 'SliderDTO[contents=$contents]'; Map toJson() { final json = {}; - if (this.images != null) { - json[r'images'] = this.images; + if (this.contents != null) { + json[r'contents'] = this.contents; } else { - json[r'images'] = null; + json[r'contents'] = null; } return json; } @@ -59,7 +59,7 @@ class SliderDTO { }()); return SliderDTO( - images: ImageDTO.listFromJson(json[r'images']), + contents: ContentDTO.listFromJson(json[r'contents']), ); } return null; diff --git a/manager_api/test/categorie_dto_test.dart b/manager_api/test/categorie_dto_test.dart new file mode 100644 index 0000000..4c81425 --- /dev/null +++ b/manager_api/test/categorie_dto_test.dart @@ -0,0 +1,32 @@ +// +// 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 CategorieDTO +void main() { + // final instance = CategorieDTO(); + + group('test CategorieDTO', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String icon + test('to test the property `icon`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/content_dto_test.dart b/manager_api/test/content_dto_test.dart new file mode 100644 index 0000000..99e909b --- /dev/null +++ b/manager_api/test/content_dto_test.dart @@ -0,0 +1,52 @@ +// +// 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 ContentDTO +void main() { + // final instance = ContentDTO(); + + group('test ContentDTO', () { + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // String resourceUrl + test('to test the property `resourceUrl`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // ResourceType resourceType + test('to test the property `resourceType`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/content_geo_point_test.dart b/manager_api/test/content_geo_point_test.dart new file mode 100644 index 0000000..b24df45 --- /dev/null +++ b/manager_api/test/content_geo_point_test.dart @@ -0,0 +1,42 @@ +// +// 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 ContentGeoPoint +void main() { + // final instance = ContentGeoPoint(); + + group('test ContentGeoPoint', () { + // 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 + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/geo_point_dto_categorie_test.dart b/manager_api/test/geo_point_dto_categorie_test.dart new file mode 100644 index 0000000..03c380e --- /dev/null +++ b/manager_api/test/geo_point_dto_categorie_test.dart @@ -0,0 +1,32 @@ +// +// 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 GeoPointDTOCategorie +void main() { + // final instance = GeoPointDTOCategorie(); + + group('test GeoPointDTOCategorie', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String icon + test('to test the property `icon`', () async { + // TODO + }); + + + }); + +} diff --git a/pubspec.yaml b/pubspec.yaml index d07dbc3..890bcff 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.5.0+5 +version: 2.0.0+6 environment: sdk: ">=3.1.0 <4.0.0"