Update code generation with article fort
This commit is contained in:
parent
dd6d8b57ec
commit
471190a153
@ -1,6 +1,7 @@
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
doc/ArticleDTO.md
|
||||
doc/AuthenticationApi.md
|
||||
doc/ConfigurationApi.md
|
||||
doc/ConfigurationDTO.md
|
||||
@ -52,6 +53,7 @@ lib/auth/authentication.dart
|
||||
lib/auth/http_basic_auth.dart
|
||||
lib/auth/http_bearer_auth.dart
|
||||
lib/auth/oauth.dart
|
||||
lib/model/article_dto.dart
|
||||
lib/model/configuration_dto.dart
|
||||
lib/model/device_detail_dto.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/web_dto.dart
|
||||
pubspec.yaml
|
||||
test/article_dto_test.dart
|
||||
|
||||
@ -91,6 +91,7 @@ Class | Method | HTTP request | Description
|
||||
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
|
||||
*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* | [**sectionGetFromConfiguration**](doc\/SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
||||
*SectionApi* | [**sectionGetMapDTO**](doc\/SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO |
|
||||
@ -111,6 +112,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [ArticleDTO](doc\/ArticleDTO.md)
|
||||
- [ConfigurationDTO](doc\/ConfigurationDTO.md)
|
||||
- [DeviceDTO](doc\/DeviceDTO.md)
|
||||
- [DeviceDetailDTO](doc\/DeviceDetailDTO.md)
|
||||
|
||||
22
manager_api/doc/ArticleDTO.md
Normal file
22
manager_api/doc/ArticleDTO.md
Normal 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)
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ Name | Type | Description | Notes
|
||||
**secondaryColor** | **String** | | [optional]
|
||||
**languages** | **List<String>** | | [optional] [default to const []]
|
||||
**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)
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ Name | Type | Description | Notes
|
||||
**secondaryColor** | **String** | | [optional]
|
||||
**languages** | **List<String>** | | [optional] [default to const []]
|
||||
**dateCreation** | [**DateTime**](DateTime.md) | | [optional]
|
||||
**isMobile** | **bool** | | [optional]
|
||||
**isOffline** | **bool** | | [optional]
|
||||
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
|
||||
**resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []]
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ Method | HTTP request | Description
|
||||
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
|
||||
[**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} |
|
||||
[**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} |
|
||||
[**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)
|
||||
|
||||
# **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**
|
||||
> SectionDTO sectionGetDetail(id)
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ part 'api/resource_api.dart';
|
||||
part 'api/section_api.dart';
|
||||
part 'api/user_api.dart';
|
||||
|
||||
part 'model/article_dto.dart';
|
||||
part 'model/configuration_dto.dart';
|
||||
part 'model/device_dto.dart';
|
||||
part 'model/device_detail_dto.dart';
|
||||
|
||||
@ -326,6 +326,58 @@ class SectionApi {
|
||||
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].
|
||||
/// Parameters:
|
||||
///
|
||||
|
||||
@ -156,6 +156,8 @@ class ApiClient {
|
||||
break;
|
||||
case 'double':
|
||||
return value is double ? value : double.parse('$value');
|
||||
case 'ArticleDTO':
|
||||
return ArticleDTO.fromJson(value);
|
||||
case 'ConfigurationDTO':
|
||||
return ConfigurationDTO.fromJson(value);
|
||||
case 'DeviceDTO':
|
||||
|
||||
134
manager_api/lib/model/article_dto.dart
Normal file
134
manager_api/lib/model/article_dto.dart
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,6 +18,8 @@ class ConfigurationDTO {
|
||||
this.secondaryColor,
|
||||
this.languages,
|
||||
this.dateCreation,
|
||||
this.isMobile,
|
||||
this.isOffline,
|
||||
});
|
||||
|
||||
String id;
|
||||
@ -32,6 +34,10 @@ class ConfigurationDTO {
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
bool isMobile;
|
||||
|
||||
bool isOffline;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
|
||||
other.id == id &&
|
||||
@ -39,7 +45,9 @@ class ConfigurationDTO {
|
||||
other.primaryColor == primaryColor &&
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.languages == languages &&
|
||||
other.dateCreation == dateCreation;
|
||||
other.dateCreation == dateCreation &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isOffline == isOffline;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@ -48,10 +56,12 @@ class ConfigurationDTO {
|
||||
(primaryColor == null ? 0 : primaryColor.hashCode) +
|
||||
(secondaryColor == null ? 0 : secondaryColor.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
|
||||
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() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -73,6 +83,12 @@ class ConfigurationDTO {
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (isMobile != null) {
|
||||
json[r'isMobile'] = isMobile;
|
||||
}
|
||||
if (isOffline != null) {
|
||||
json[r'isOffline'] = isOffline;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -91,6 +107,8 @@ class ConfigurationDTO {
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
isMobile: json[r'isMobile'],
|
||||
isOffline: json[r'isOffline'],
|
||||
);
|
||||
|
||||
static List<ConfigurationDTO> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
|
||||
@ -18,6 +18,8 @@ class ExportConfigurationDTO {
|
||||
this.secondaryColor,
|
||||
this.languages,
|
||||
this.dateCreation,
|
||||
this.isMobile,
|
||||
this.isOffline,
|
||||
this.sections,
|
||||
this.resources,
|
||||
});
|
||||
@ -34,6 +36,10 @@ class ExportConfigurationDTO {
|
||||
|
||||
DateTime dateCreation;
|
||||
|
||||
bool isMobile;
|
||||
|
||||
bool isOffline;
|
||||
|
||||
List<SectionDTO> sections;
|
||||
|
||||
List<ResourceDTO> resources;
|
||||
@ -46,6 +52,8 @@ class ExportConfigurationDTO {
|
||||
other.secondaryColor == secondaryColor &&
|
||||
other.languages == languages &&
|
||||
other.dateCreation == dateCreation &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isOffline == isOffline &&
|
||||
other.sections == sections &&
|
||||
other.resources == resources;
|
||||
|
||||
@ -57,11 +65,13 @@ class ExportConfigurationDTO {
|
||||
(secondaryColor == null ? 0 : secondaryColor.hashCode) +
|
||||
(languages == null ? 0 : languages.hashCode) +
|
||||
(dateCreation == null ? 0 : dateCreation.hashCode) +
|
||||
(isMobile == null ? 0 : isMobile.hashCode) +
|
||||
(isOffline == null ? 0 : isOffline.hashCode) +
|
||||
(sections == null ? 0 : sections.hashCode) +
|
||||
(resources == null ? 0 : resources.hashCode);
|
||||
|
||||
@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() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -83,6 +93,12 @@ class ExportConfigurationDTO {
|
||||
if (dateCreation != null) {
|
||||
json[r'dateCreation'] = dateCreation.toUtc().toIso8601String();
|
||||
}
|
||||
if (isMobile != null) {
|
||||
json[r'isMobile'] = isMobile;
|
||||
}
|
||||
if (isOffline != null) {
|
||||
json[r'isOffline'] = isOffline;
|
||||
}
|
||||
if (sections != null) {
|
||||
json[r'sections'] = sections;
|
||||
}
|
||||
@ -107,6 +123,8 @@ class ExportConfigurationDTO {
|
||||
dateCreation: json[r'dateCreation'] == null
|
||||
? null
|
||||
: DateTime.parse(json[r'dateCreation']),
|
||||
isMobile: json[r'isMobile'],
|
||||
isOffline: json[r'isOffline'],
|
||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||
resources: ResourceDTO.listFromJson(json[r'resources']),
|
||||
);
|
||||
|
||||
@ -28,6 +28,7 @@ class SectionType {
|
||||
static const web = SectionType._(r'Web');
|
||||
static const menu = SectionType._(r'Menu');
|
||||
static const quizz = SectionType._(r'Quizz');
|
||||
static const article = SectionType._(r'Article');
|
||||
|
||||
/// List of all possible values in this [enum][SectionType].
|
||||
static const values = <SectionType>[
|
||||
@ -37,6 +38,7 @@ class SectionType {
|
||||
web,
|
||||
menu,
|
||||
quizz,
|
||||
article
|
||||
];
|
||||
|
||||
static SectionType fromJson(dynamic value) =>
|
||||
@ -75,6 +77,7 @@ class SectionTypeTypeTransformer {
|
||||
case r'Web': return SectionType.web;
|
||||
case r'Menu': return SectionType.menu;
|
||||
case r'Quizz': return SectionType.quizz;
|
||||
case r'Article': return SectionType.article;
|
||||
default:
|
||||
if (allowNull == false) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -193,9 +193,10 @@ paths:
|
||||
'200':
|
||||
description: ''
|
||||
content:
|
||||
application/json:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ExportConfigurationDTO'
|
||||
type: string
|
||||
format: binary
|
||||
'400':
|
||||
description: ''
|
||||
content:
|
||||
@ -214,8 +215,6 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
security:
|
||||
- bearer: []
|
||||
/api/Configuration/import:
|
||||
post:
|
||||
tags:
|
||||
@ -1132,6 +1131,20 @@ paths:
|
||||
$ref: '#/components/schemas/QuizzDTO'
|
||||
security:
|
||||
- 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:
|
||||
get:
|
||||
tags:
|
||||
@ -1405,6 +1418,10 @@ components:
|
||||
dateCreation:
|
||||
type: string
|
||||
format: date-time
|
||||
isMobile:
|
||||
type: boolean
|
||||
isOffline:
|
||||
type: boolean
|
||||
ExportConfigurationDTO:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ConfigurationDTO'
|
||||
@ -1477,8 +1494,15 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
SectionType:
|
||||
type: string
|
||||
description: ''
|
||||
type: integer
|
||||
description: |-
|
||||
0 = Map
|
||||
1 = Slider
|
||||
2 = Video
|
||||
3 = Web
|
||||
4 = Menu
|
||||
5 = Quizz
|
||||
6 = Article
|
||||
x-enumNames:
|
||||
- Map
|
||||
- Slider
|
||||
@ -1486,13 +1510,15 @@ components:
|
||||
- Web
|
||||
- Menu
|
||||
- Quizz
|
||||
- Article
|
||||
enum:
|
||||
- Map
|
||||
- Slider
|
||||
- Video
|
||||
- Web
|
||||
- Menu
|
||||
- Quizz
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
ResourceDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -1512,18 +1538,22 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
ResourceType:
|
||||
type: string
|
||||
description: ''
|
||||
type: integer
|
||||
description: |-
|
||||
0 = Image
|
||||
1 = Video
|
||||
2 = ImageUrl
|
||||
3 = VideoUrl
|
||||
x-enumNames:
|
||||
- Image
|
||||
- Video
|
||||
- ImageUrl
|
||||
- VideoUrl
|
||||
enum:
|
||||
- Image
|
||||
- Video
|
||||
- ImageUrl
|
||||
- VideoUrl
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
DeviceDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -1596,8 +1626,13 @@ components:
|
||||
type: string
|
||||
nullable: true
|
||||
MapTypeApp:
|
||||
type: string
|
||||
description: ''
|
||||
type: integer
|
||||
description: |-
|
||||
0 = none
|
||||
1 = normal
|
||||
2 = satellite
|
||||
3 = terrain
|
||||
4 = hybrid
|
||||
x-enumNames:
|
||||
- none
|
||||
- normal
|
||||
@ -1605,11 +1640,11 @@ components:
|
||||
- terrain
|
||||
- hybrid
|
||||
enum:
|
||||
- none
|
||||
- normal
|
||||
- satellite
|
||||
- terrain
|
||||
- hybrid
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
GeoPointDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -1770,6 +1805,9 @@ components:
|
||||
$ref: '#/components/schemas/TranslationDTO'
|
||||
isGood:
|
||||
type: boolean
|
||||
order:
|
||||
type: integer
|
||||
format: int32
|
||||
LevelDTO:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -1785,6 +1823,40 @@ components:
|
||||
source:
|
||||
type: string
|
||||
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:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
|
||||
61
manager_api/test/article_dto_test.dart
Normal file
61
manager_api/test/article_dto_test.dart
Normal 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
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
34
pubspec.lock
34
pubspec.lock
@ -7,7 +7,7 @@ packages:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
version: "2.3.1"
|
||||
asn1lib:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -70,28 +70,28 @@ packages:
|
||||
name: convert
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.2"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.0.2"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: csslib
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.17.1"
|
||||
version: "0.17.2"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
drag_and_drop_lists:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -119,14 +119,14 @@ packages:
|
||||
name: ffi
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
version: "1.2.1"
|
||||
file_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: file_picker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.5.1"
|
||||
version: "4.6.1"
|
||||
flare_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -152,7 +152,7 @@ packages:
|
||||
name: flutter_plugin_android_lifecycle
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.5"
|
||||
version: "2.0.6"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -253,7 +253,7 @@ packages:
|
||||
name: password_credential
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.1"
|
||||
version: "0.3.2"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -281,7 +281,7 @@ packages:
|
||||
name: pointycastle
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.5.2"
|
||||
version: "3.6.0"
|
||||
provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -363,42 +363,42 @@ packages:
|
||||
name: video_player
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
version: "2.4.5"
|
||||
video_player_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
version: "2.3.6"
|
||||
video_player_avfoundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_avfoundation
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
version: "2.3.5"
|
||||
video_player_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.1.1"
|
||||
version: "5.1.3"
|
||||
video_player_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: video_player_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
version: "2.0.10"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.4"
|
||||
version: "2.5.2"
|
||||
sdks:
|
||||
dart: ">=2.15.0 <3.0.0"
|
||||
flutter: ">=2.8.0"
|
||||
flutter: ">=2.10.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user