Compare commits

..

2 Commits

Author SHA1 Message Date
Thomas Fransolet
25f59f3072 README.md edited online with Bitbucket 2022-10-28 08:40:06 +00:00
471190a153 Update code generation with article fort 2022-06-22 16:26:29 +02:00
21 changed files with 2466 additions and 3105 deletions

View File

@ -14,3 +14,22 @@ A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials, [online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference. samples, guidance on mobile development, and a full API reference.
# Model generation via command line
java -cp openapi-generator-cli-5.1.0.jar org.openapitools.codegen.OpenAPIGenerator generate -i swagger.yaml --additional-properties pubName=managerapi -g dart --enable-post-process-file
=> Faudrait mettre à jour le projet avec les nouvelles versions plugins
# Publication sur docker
docker build -t flutter-web .
Pour tester en local :
docker run -d -p 8080:80 name flutter-web flutter-web
Image tag:
docker image tag flutter-web registry.unov.be/mymuseum/manager:latest
Docker push:
docker image push registry.unov.be/mymuseum/manager:latest

View File

@ -44,7 +44,7 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO inputImageDTO, AppContext a
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text("Image", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)), Text("Image/vidéo", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)),
Column( Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [

View File

@ -5,9 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -16,8 +13,3 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

View File

@ -1,6 +1,7 @@
.gitignore .gitignore
.travis.yml .travis.yml
README.md README.md
doc/ArticleDTO.md
doc/AuthenticationApi.md doc/AuthenticationApi.md
doc/ConfigurationApi.md doc/ConfigurationApi.md
doc/ConfigurationDTO.md doc/ConfigurationDTO.md
@ -52,6 +53,7 @@ lib/auth/authentication.dart
lib/auth/http_basic_auth.dart lib/auth/http_basic_auth.dart
lib/auth/http_bearer_auth.dart lib/auth/http_bearer_auth.dart
lib/auth/oauth.dart lib/auth/oauth.dart
lib/model/article_dto.dart
lib/model/configuration_dto.dart lib/model/configuration_dto.dart
lib/model/device_detail_dto.dart lib/model/device_detail_dto.dart
lib/model/device_detail_dto_all_of.dart lib/model/device_detail_dto_all_of.dart
@ -82,3 +84,4 @@ lib/model/user_detail_dto.dart
lib/model/video_dto.dart lib/model/video_dto.dart
lib/model/web_dto.dart lib/model/web_dto.dart
pubspec.yaml pubspec.yaml
test/article_dto_test.dart

View File

@ -91,6 +91,7 @@ Class | Method | HTTP request | Description
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | *SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section | *SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | *SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | *SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
*SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | *SectionApi* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | *SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
@ -111,6 +112,7 @@ Class | Method | HTTP request | Description
## Documentation For Models ## Documentation For Models
- [ArticleDTO](doc\/ArticleDTO.md)
- [ConfigurationDTO](doc\/ConfigurationDTO.md) - [ConfigurationDTO](doc\/ConfigurationDTO.md)
- [DeviceDTO](doc\/DeviceDTO.md) - [DeviceDTO](doc\/DeviceDTO.md)
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md) - [DeviceDetailDTO](doc\/DeviceDetailDTO.md)

View File

@ -0,0 +1,22 @@
# managerapi.model.ArticleDTO
## Load the model package
```dart
import 'package:managerapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**title** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**description** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**content** | [**List<TranslationDTO>**](TranslationDTO.md) | | [optional] [default to const []]
**qrCode** | **String** | | [optional]
**isContentTop** | **bool** | | [optional]
**audioId** | **String** | | [optional]
**isReadAudioAuto** | **bool** | | [optional]
**images** | [**List<ImageDTO>**](ImageDTO.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)

View File

@ -14,6 +14,8 @@ Name | Type | Description | Notes
**secondaryColor** | **String** | | [optional] **secondaryColor** | **String** | | [optional]
**languages** | **List<String>** | | [optional] [default to const []] **languages** | **List<String>** | | [optional] [default to const []]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isMobile** | **bool** | | [optional]
**isOffline** | **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) [[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

@ -14,6 +14,8 @@ Name | Type | Description | Notes
**secondaryColor** | **String** | | [optional] **secondaryColor** | **String** | | [optional]
**languages** | **List<String>** | | [optional] [default to const []] **languages** | **List<String>** | | [optional] [default to const []]
**dateCreation** | [**DateTime**](DateTime.md) | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional]
**isMobile** | **bool** | | [optional]
**isOffline** | **bool** | | [optional]
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []] **sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
**resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []] **resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []]

View File

@ -14,6 +14,7 @@ Method | HTTP request | Description
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | [**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section | [**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | [**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
[**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
[**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} | [**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
[**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | [**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
[**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | [**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
@ -238,6 +239,45 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetArticleDTO**
> ArticleDTO sectionGetArticleDTO()
### Example
```dart
import 'package:managerapi/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = SectionApi();
try {
final result = api_instance.sectionGetArticleDTO();
print(result);
} catch (e) {
print('Exception when calling SectionApi->sectionGetArticleDTO: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ArticleDTO**](ArticleDTO.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sectionGetDetail** # **sectionGetDetail**
> SectionDTO sectionGetDetail(id) > SectionDTO sectionGetDetail(id)

View File

@ -34,6 +34,7 @@ part 'api/resource_api.dart';
part 'api/section_api.dart'; part 'api/section_api.dart';
part 'api/user_api.dart'; part 'api/user_api.dart';
part 'model/article_dto.dart';
part 'model/configuration_dto.dart'; part 'model/configuration_dto.dart';
part 'model/device_dto.dart'; part 'model/device_dto.dart';
part 'model/device_detail_dto.dart'; part 'model/device_detail_dto.dart';

View File

@ -326,6 +326,58 @@ class SectionApi {
return Future<List<Object>>.value(null); return Future<List<Object>>.value(null);
} }
/// Performs an HTTP 'GET /api/Section/ArticleDTO' operation and returns the [Response].
Future<Response> sectionGetArticleDTOWithHttpInfo() async {
final path = r'/api/Section/ArticleDTO';
Object postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
final contentTypes = <String>[];
final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null;
final authNames = <String>['bearer'];
if (
nullableContentType != null &&
nullableContentType.toLowerCase().startsWith('multipart/form-data')
) {
bool hasFields = false;
final mp = MultipartRequest(null, null);
if (hasFields) {
postBody = mp;
}
} else {
}
return await apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
nullableContentType,
authNames,
);
}
Future<ArticleDTO> sectionGetArticleDTO() async {
final response = await sectionGetArticleDTOWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body != null && response.statusCode != HttpStatus.noContent) {
return apiClient.deserialize(_decodeBodyBytes(response), 'ArticleDTO') as ArticleDTO;
}
return Future<ArticleDTO>.value(null);
}
/// Performs an HTTP 'GET /api/Section/{id}' operation and returns the [Response]. /// Performs an HTTP 'GET /api/Section/{id}' operation and returns the [Response].
/// Parameters: /// Parameters:
/// ///

View File

@ -156,6 +156,8 @@ class ApiClient {
break; break;
case 'double': case 'double':
return value is double ? value : double.parse('$value'); return value is double ? value : double.parse('$value');
case 'ArticleDTO':
return ArticleDTO.fromJson(value);
case 'ConfigurationDTO': case 'ConfigurationDTO':
return ConfigurationDTO.fromJson(value); return ConfigurationDTO.fromJson(value);
case 'DeviceDTO': case 'DeviceDTO':

View File

@ -0,0 +1,134 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ArticleDTO {
/// Returns a new [ArticleDTO] instance.
ArticleDTO({
this.title,
this.description,
this.content,
this.qrCode,
this.isContentTop,
this.audioId,
this.isReadAudioAuto,
this.images,
});
List<TranslationDTO> title;
List<TranslationDTO> description;
List<TranslationDTO> content;
String qrCode;
bool isContentTop;
String audioId;
bool isReadAudioAuto;
List<ImageDTO> images;
@override
bool operator ==(Object other) => identical(this, other) || other is ArticleDTO &&
other.title == title &&
other.description == description &&
other.content == content &&
other.qrCode == qrCode &&
other.isContentTop == isContentTop &&
other.audioId == audioId &&
other.isReadAudioAuto == isReadAudioAuto &&
other.images == images;
@override
int get hashCode =>
(title == null ? 0 : title.hashCode) +
(description == null ? 0 : description.hashCode) +
(content == null ? 0 : content.hashCode) +
(qrCode == null ? 0 : qrCode.hashCode) +
(isContentTop == null ? 0 : isContentTop.hashCode) +
(audioId == null ? 0 : audioId.hashCode) +
(isReadAudioAuto == null ? 0 : isReadAudioAuto.hashCode) +
(images == null ? 0 : images.hashCode);
@override
String toString() => 'ArticleDTO[title=$title, description=$description, content=$content, qrCode=$qrCode, isContentTop=$isContentTop, audioId=$audioId, isReadAudioAuto=$isReadAudioAuto, images=$images]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (title != null) {
json[r'title'] = title;
}
if (description != null) {
json[r'description'] = description;
}
if (content != null) {
json[r'content'] = content;
}
if (qrCode != null) {
json[r'qrCode'] = qrCode;
}
if (isContentTop != null) {
json[r'isContentTop'] = isContentTop;
}
if (audioId != null) {
json[r'audioId'] = audioId;
}
if (isReadAudioAuto != null) {
json[r'isReadAudioAuto'] = isReadAudioAuto;
}
if (images != null) {
json[r'images'] = images;
}
return json;
}
/// Returns a new [ArticleDTO] instance and imports its values from
/// [json] if it's non-null, null if [json] is null.
static ArticleDTO fromJson(Map<String, dynamic> json) => json == null
? null
: ArticleDTO(
title: TranslationDTO.listFromJson(json[r'title']),
description: TranslationDTO.listFromJson(json[r'description']),
content: TranslationDTO.listFromJson(json[r'content']),
qrCode: json[r'qrCode'],
isContentTop: json[r'isContentTop'],
audioId: json[r'audioId'],
isReadAudioAuto: json[r'isReadAudioAuto'],
images: ImageDTO.listFromJson(json[r'images']),
);
static List<ArticleDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
json == null || json.isEmpty
? true == emptyIsNull ? null : <ArticleDTO>[]
: json.map((v) => ArticleDTO.fromJson(v)).toList(growable: true == growable);
static Map<String, ArticleDTO> mapFromJson(Map<String, dynamic> json) {
final map = <String, ArticleDTO>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) => map[key] = ArticleDTO.fromJson(v));
}
return map;
}
// maps a json object with a list of ArticleDTO-objects as value to a dart map
static Map<String, List<ArticleDTO>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
final map = <String, List<ArticleDTO>>{};
if (json != null && json.isNotEmpty) {
json.forEach((String key, dynamic v) {
map[key] = ArticleDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable);
});
}
return map;
}
}

View File

@ -18,6 +18,8 @@ class ConfigurationDTO {
this.secondaryColor, this.secondaryColor,
this.languages, this.languages,
this.dateCreation, this.dateCreation,
this.isMobile,
this.isOffline,
}); });
String id; String id;
@ -32,6 +34,10 @@ class ConfigurationDTO {
DateTime dateCreation; DateTime dateCreation;
bool isMobile;
bool isOffline;
@override @override
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO && bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
other.id == id && other.id == id &&
@ -39,7 +45,9 @@ class ConfigurationDTO {
other.primaryColor == primaryColor && other.primaryColor == primaryColor &&
other.secondaryColor == secondaryColor && other.secondaryColor == secondaryColor &&
other.languages == languages && other.languages == languages &&
other.dateCreation == dateCreation; other.dateCreation == dateCreation &&
other.isMobile == isMobile &&
other.isOffline == isOffline;
@override @override
int get hashCode => int get hashCode =>
@ -48,10 +56,12 @@ class ConfigurationDTO {
(primaryColor == null ? 0 : primaryColor.hashCode) + (primaryColor == null ? 0 : primaryColor.hashCode) +
(secondaryColor == null ? 0 : secondaryColor.hashCode) + (secondaryColor == null ? 0 : secondaryColor.hashCode) +
(languages == null ? 0 : languages.hashCode) + (languages == null ? 0 : languages.hashCode) +
(dateCreation == null ? 0 : dateCreation.hashCode); (dateCreation == null ? 0 : dateCreation.hashCode) +
(isMobile == null ? 0 : isMobile.hashCode) +
(isOffline == null ? 0 : isOffline.hashCode);
@override @override
String toString() => 'ConfigurationDTO[id=$id, label=$label, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation]'; String toString() => 'ConfigurationDTO[id=$id, label=$label, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isOffline=$isOffline]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -73,6 +83,12 @@ class ConfigurationDTO {
if (dateCreation != null) { if (dateCreation != null) {
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
} }
if (isMobile != null) {
json[r'isMobile'] = isMobile;
}
if (isOffline != null) {
json[r'isOffline'] = isOffline;
}
return json; return json;
} }
@ -91,6 +107,8 @@ class ConfigurationDTO {
dateCreation: json[r'dateCreation'] == null dateCreation: json[r'dateCreation'] == null
? null ? null
: DateTime.parse(json[r'dateCreation']), : DateTime.parse(json[r'dateCreation']),
isMobile: json[r'isMobile'],
isOffline: json[r'isOffline'],
); );
static List<ConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) => static List<ConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>

View File

@ -18,6 +18,8 @@ class ExportConfigurationDTO {
this.secondaryColor, this.secondaryColor,
this.languages, this.languages,
this.dateCreation, this.dateCreation,
this.isMobile,
this.isOffline,
this.sections, this.sections,
this.resources, this.resources,
}); });
@ -34,6 +36,10 @@ class ExportConfigurationDTO {
DateTime dateCreation; DateTime dateCreation;
bool isMobile;
bool isOffline;
List<SectionDTO> sections; List<SectionDTO> sections;
List<ResourceDTO> resources; List<ResourceDTO> resources;
@ -46,6 +52,8 @@ class ExportConfigurationDTO {
other.secondaryColor == secondaryColor && other.secondaryColor == secondaryColor &&
other.languages == languages && other.languages == languages &&
other.dateCreation == dateCreation && other.dateCreation == dateCreation &&
other.isMobile == isMobile &&
other.isOffline == isOffline &&
other.sections == sections && other.sections == sections &&
other.resources == resources; other.resources == resources;
@ -57,11 +65,13 @@ class ExportConfigurationDTO {
(secondaryColor == null ? 0 : secondaryColor.hashCode) + (secondaryColor == null ? 0 : secondaryColor.hashCode) +
(languages == null ? 0 : languages.hashCode) + (languages == null ? 0 : languages.hashCode) +
(dateCreation == null ? 0 : dateCreation.hashCode) + (dateCreation == null ? 0 : dateCreation.hashCode) +
(isMobile == null ? 0 : isMobile.hashCode) +
(isOffline == null ? 0 : isOffline.hashCode) +
(sections == null ? 0 : sections.hashCode) + (sections == null ? 0 : sections.hashCode) +
(resources == null ? 0 : resources.hashCode); (resources == null ? 0 : resources.hashCode);
@override @override
String toString() => 'ExportConfigurationDTO[id=$id, label=$label, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, sections=$sections, resources=$resources]'; String toString() => 'ExportConfigurationDTO[id=$id, label=$label, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isOffline=$isOffline, sections=$sections, resources=$resources]';
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final json = <String, dynamic>{}; final json = <String, dynamic>{};
@ -83,6 +93,12 @@ class ExportConfigurationDTO {
if (dateCreation != null) { if (dateCreation != null) {
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String(); json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
} }
if (isMobile != null) {
json[r'isMobile'] = isMobile;
}
if (isOffline != null) {
json[r'isOffline'] = isOffline;
}
if (sections != null) { if (sections != null) {
json[r'sections'] = sections; json[r'sections'] = sections;
} }
@ -107,6 +123,8 @@ class ExportConfigurationDTO {
dateCreation: json[r'dateCreation'] == null dateCreation: json[r'dateCreation'] == null
? null ? null
: DateTime.parse(json[r'dateCreation']), : DateTime.parse(json[r'dateCreation']),
isMobile: json[r'isMobile'],
isOffline: json[r'isOffline'],
sections: SectionDTO.listFromJson(json[r'sections']), sections: SectionDTO.listFromJson(json[r'sections']),
resources: ResourceDTO.listFromJson(json[r'resources']), resources: ResourceDTO.listFromJson(json[r'resources']),
); );

View File

@ -28,6 +28,7 @@ class SectionType {
static const web = SectionType._(r'Web'); static const web = SectionType._(r'Web');
static const menu = SectionType._(r'Menu'); static const menu = SectionType._(r'Menu');
static const quizz = SectionType._(r'Quizz'); static const quizz = SectionType._(r'Quizz');
static const article = SectionType._(r'Article');
/// List of all possible values in this [enum][SectionType]. /// List of all possible values in this [enum][SectionType].
static const values = <SectionType>[ static const values = <SectionType>[
@ -37,6 +38,7 @@ class SectionType {
web, web,
menu, menu,
quizz, quizz,
article
]; ];
static SectionType fromJson(dynamic value) => static SectionType fromJson(dynamic value) =>
@ -75,6 +77,7 @@ class SectionTypeTypeTransformer {
case r'Web': return SectionType.web; case r'Web': return SectionType.web;
case r'Menu': return SectionType.menu; case r'Menu': return SectionType.menu;
case r'Quizz': return SectionType.quizz; case r'Quizz': return SectionType.quizz;
case r'Article': return SectionType.article;
default: default:
if (allowNull == false) { if (allowNull == false) {
throw ArgumentError('Unknown enum value to decode: $data'); throw ArgumentError('Unknown enum value to decode: $data');

File diff suppressed because it is too large Load Diff

View File

@ -193,9 +193,10 @@ paths:
'200': '200':
description: '' description: ''
content: content:
application/json: application/octet-stream:
schema: schema:
$ref: '#/components/schemas/ExportConfigurationDTO' type: string
format: binary
'400': '400':
description: '' description: ''
content: content:
@ -214,8 +215,6 @@ paths:
application/json: application/json:
schema: schema:
type: string type: string
security:
- bearer: []
/api/Configuration/import: /api/Configuration/import:
post: post:
tags: tags:
@ -1132,6 +1131,20 @@ paths:
$ref: '#/components/schemas/QuizzDTO' $ref: '#/components/schemas/QuizzDTO'
security: security:
- bearer: [] - bearer: []
/api/Section/ArticleDTO:
get:
tags:
- Section
operationId: Section_GetArticleDTO
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ArticleDTO'
security:
- bearer: []
/api/User: /api/User:
get: get:
tags: tags:
@ -1405,6 +1418,10 @@ components:
dateCreation: dateCreation:
type: string type: string
format: date-time format: date-time
isMobile:
type: boolean
isOffline:
type: boolean
ExportConfigurationDTO: ExportConfigurationDTO:
allOf: allOf:
- $ref: '#/components/schemas/ConfigurationDTO' - $ref: '#/components/schemas/ConfigurationDTO'
@ -1477,8 +1494,15 @@ components:
type: string type: string
nullable: true nullable: true
SectionType: SectionType:
type: string type: integer
description: '' description: |-
0 = Map
1 = Slider
2 = Video
3 = Web
4 = Menu
5 = Quizz
6 = Article
x-enumNames: x-enumNames:
- Map - Map
- Slider - Slider
@ -1486,13 +1510,15 @@ components:
- Web - Web
- Menu - Menu
- Quizz - Quizz
- Article
enum: enum:
- Map - 0
- Slider - 1
- Video - 2
- Web - 3
- Menu - 4
- Quizz - 5
- 6
ResourceDTO: ResourceDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1512,18 +1538,22 @@ components:
type: string type: string
nullable: true nullable: true
ResourceType: ResourceType:
type: string type: integer
description: '' description: |-
0 = Image
1 = Video
2 = ImageUrl
3 = VideoUrl
x-enumNames: x-enumNames:
- Image - Image
- Video - Video
- ImageUrl - ImageUrl
- VideoUrl - VideoUrl
enum: enum:
- Image - 0
- Video - 1
- ImageUrl - 2
- VideoUrl - 3
DeviceDTO: DeviceDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1596,8 +1626,13 @@ components:
type: string type: string
nullable: true nullable: true
MapTypeApp: MapTypeApp:
type: string type: integer
description: '' description: |-
0 = none
1 = normal
2 = satellite
3 = terrain
4 = hybrid
x-enumNames: x-enumNames:
- none - none
- normal - normal
@ -1605,11 +1640,11 @@ components:
- terrain - terrain
- hybrid - hybrid
enum: enum:
- none - 0
- normal - 1
- satellite - 2
- terrain - 3
- hybrid - 4
GeoPointDTO: GeoPointDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1770,6 +1805,9 @@ components:
$ref: '#/components/schemas/TranslationDTO' $ref: '#/components/schemas/TranslationDTO'
isGood: isGood:
type: boolean type: boolean
order:
type: integer
format: int32
LevelDTO: LevelDTO:
type: object type: object
additionalProperties: false additionalProperties: false
@ -1785,6 +1823,40 @@ components:
source: source:
type: string type: string
nullable: true nullable: true
ArticleDTO:
type: object
additionalProperties: false
properties:
title:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
description:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
content:
type: array
nullable: true
items:
$ref: '#/components/schemas/TranslationDTO'
qrCode:
type: string
nullable: true
isContentTop:
type: boolean
audioId:
type: string
nullable: true
isReadAudioAuto:
type: boolean
images:
type: array
nullable: true
items:
$ref: '#/components/schemas/ImageDTO'
User: User:
type: object type: object
additionalProperties: false additionalProperties: false

View File

@ -0,0 +1,61 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.0
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: lines_longer_than_80_chars
import 'package:managerapi/api.dart';
import 'package:test/test.dart';
// tests for ArticleDTO
void main() {
final instance = ArticleDTO();
group('test ArticleDTO', () {
// List<TranslationDTO> title (default value: const [])
test('to test the property `title`', () async {
// TODO
});
// List<TranslationDTO> description (default value: const [])
test('to test the property `description`', () async {
// TODO
});
// List<TranslationDTO> content (default value: const [])
test('to test the property `content`', () async {
// TODO
});
// String qrCode
test('to test the property `qrCode`', () async {
// TODO
});
// bool isContentTop
test('to test the property `isContentTop`', () async {
// TODO
});
// String audioId
test('to test the property `audioId`', () async {
// TODO
});
// bool isReadAudioAuto
test('to test the property `isReadAudioAuto`', () async {
// TODO
});
// List<ImageDTO> images (default value: const [])
test('to test the property `images`', () async {
// TODO
});
});
}

View File

@ -7,7 +7,7 @@ packages:
name: args name: args
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.0" version: "2.3.1"
asn1lib: asn1lib:
dependency: transitive dependency: transitive
description: description:
@ -63,35 +63,35 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.16.0" version: "1.15.0"
convert: convert:
dependency: "direct main" dependency: "direct main"
description: description:
name: convert name: convert
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
name: crypto name: crypto
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "3.0.2"
csslib: csslib:
dependency: transitive dependency: transitive
description: description:
name: csslib name: csslib
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.17.1" version: "0.17.2"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
name: cupertino_icons name: cupertino_icons
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.5"
drag_and_drop_lists: drag_and_drop_lists:
dependency: "direct main" dependency: "direct main"
description: description:
@ -112,21 +112,21 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.2.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
name: ffi name: ffi
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.2" version: "1.2.1"
file_picker: file_picker:
dependency: "direct main" dependency: "direct main"
description: description:
name: file_picker name: file_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.5.1" version: "4.6.1"
flare_flutter: flare_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
@ -152,7 +152,7 @@ packages:
name: flutter_plugin_android_lifecycle name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.5" version: "2.0.6"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -197,7 +197,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.4" version: "0.6.3"
managerapi: managerapi:
dependency: "direct main" dependency: "direct main"
description: description:
@ -218,7 +218,7 @@ packages:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.3"
material_segmented_control: material_segmented_control:
dependency: "direct main" dependency: "direct main"
description: description:
@ -253,14 +253,14 @@ packages:
name: password_credential name: password_credential
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.1" version: "0.3.2"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.0"
pedantic: pedantic:
dependency: transitive dependency: transitive
description: description:
@ -281,7 +281,7 @@ packages:
name: pointycastle name: pointycastle
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.5.2" version: "3.6.0"
provider: provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -307,7 +307,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.8.1"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -342,7 +342,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.9" version: "0.4.8"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -356,49 +356,49 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.1.1"
video_player: video_player:
dependency: "direct main" dependency: "direct main"
description: description:
name: video_player name: video_player
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.0" version: "2.4.5"
video_player_android: video_player_android:
dependency: transitive dependency: transitive
description: description:
name: video_player_android name: video_player_android
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.1" version: "2.3.6"
video_player_avfoundation: video_player_avfoundation:
dependency: transitive dependency: transitive
description: description:
name: video_player_avfoundation name: video_player_avfoundation
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.3.1" version: "2.3.5"
video_player_platform_interface: video_player_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: video_player_platform_interface name: video_player_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.1.1" version: "5.1.3"
video_player_web: video_player_web:
dependency: transitive dependency: transitive
description: description:
name: video_player_web name: video_player_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.7" version: "2.0.10"
win32: win32:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.4" version: "2.5.2"
sdks: sdks:
dart: ">=2.17.0-0 <3.0.0" dart: ">=2.15.0 <3.0.0"
flutter: ">=2.8.0" flutter: ">=2.10.0"

View File

@ -5,9 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -16,8 +13,3 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)