diff --git a/manager_api/.openapi-generator/FILES b/manager_api/.openapi-generator/FILES index 2ee0d73..74774bf 100644 --- a/manager_api/.openapi-generator/FILES +++ b/manager_api/.openapi-generator/FILES @@ -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 diff --git a/manager_api/README.md b/manager_api/README.md index 2fc4960..084ee52 100644 --- a/manager_api/README.md +++ b/manager_api/README.md @@ -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) diff --git a/manager_api/doc/ArticleDTO.md b/manager_api/doc/ArticleDTO.md new file mode 100644 index 0000000..7fc4abe --- /dev/null +++ b/manager_api/doc/ArticleDTO.md @@ -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.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**content** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**qrCode** | **String** | | [optional] +**isContentTop** | **bool** | | [optional] +**audioId** | **String** | | [optional] +**isReadAudioAuto** | **bool** | | [optional] +**images** | [**List**](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) + + diff --git a/manager_api/doc/ConfigurationDTO.md b/manager_api/doc/ConfigurationDTO.md index 425da4d..6cd01ae 100644 --- a/manager_api/doc/ConfigurationDTO.md +++ b/manager_api/doc/ConfigurationDTO.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **secondaryColor** | **String** | | [optional] **languages** | **List** | | [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) diff --git a/manager_api/doc/ExportConfigurationDTO.md b/manager_api/doc/ExportConfigurationDTO.md index 7c7c3f9..e1d4046 100644 --- a/manager_api/doc/ExportConfigurationDTO.md +++ b/manager_api/doc/ExportConfigurationDTO.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **secondaryColor** | **String** | | [optional] **languages** | **List** | | [optional] [default to const []] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**isMobile** | **bool** | | [optional] +**isOffline** | **bool** | | [optional] **sections** | [**List**](SectionDTO.md) | | [optional] [default to const []] **resources** | [**List**](ResourceDTO.md) | | [optional] [default to const []] diff --git a/manager_api/doc/SectionApi.md b/manager_api/doc/SectionApi.md index 7ede72a..4793ac5 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api/doc/SectionApi.md @@ -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('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) diff --git a/manager_api/lib/api.dart b/manager_api/lib/api.dart index 942b8c8..5fae69c 100644 --- a/manager_api/lib/api.dart +++ b/manager_api/lib/api.dart @@ -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'; diff --git a/manager_api/lib/api/section_api.dart b/manager_api/lib/api/section_api.dart index 1b2ff7f..ea05942 100644 --- a/manager_api/lib/api/section_api.dart +++ b/manager_api/lib/api/section_api.dart @@ -326,6 +326,58 @@ class SectionApi { return Future>.value(null); } + /// Performs an HTTP 'GET /api/Section/ArticleDTO' operation and returns the [Response]. + Future sectionGetArticleDTOWithHttpInfo() async { + final path = r'/api/Section/ArticleDTO'; + + Object postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + final contentTypes = []; + final nullableContentType = contentTypes.isNotEmpty ? contentTypes[0] : null; + final authNames = ['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 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.value(null); + } + /// Performs an HTTP 'GET /api/Section/{id}' operation and returns the [Response]. /// Parameters: /// diff --git a/manager_api/lib/api_client.dart b/manager_api/lib/api_client.dart index ed69aa5..c2fe2db 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api/lib/api_client.dart @@ -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': diff --git a/manager_api/lib/model/article_dto.dart b/manager_api/lib/model/article_dto.dart new file mode 100644 index 0000000..b64218f --- /dev/null +++ b/manager_api/lib/model/article_dto.dart @@ -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 title; + + List description; + + List content; + + String qrCode; + + bool isContentTop; + + String audioId; + + bool isReadAudioAuto; + + List 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 toJson() { + final json = {}; + 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 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 listFromJson(List json, {bool emptyIsNull, bool growable,}) => + json == null || json.isEmpty + ? true == emptyIsNull ? null : [] + : json.map((v) => ArticleDTO.fromJson(v)).toList(growable: true == growable); + + static Map mapFromJson(Map json) { + final map = {}; + 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> mapListFromJson(Map json, {bool emptyIsNull, bool growable,}) { + final map = >{}; + if (json != null && json.isNotEmpty) { + json.forEach((String key, dynamic v) { + map[key] = ArticleDTO.listFromJson(v, emptyIsNull: emptyIsNull, growable: growable); + }); + } + return map; + } +} + diff --git a/manager_api/lib/model/configuration_dto.dart b/manager_api/lib/model/configuration_dto.dart index 06db575..b5b9f58 100644 --- a/manager_api/lib/model/configuration_dto.dart +++ b/manager_api/lib/model/configuration_dto.dart @@ -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 toJson() { final json = {}; @@ -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 listFromJson(List json, {bool emptyIsNull, bool growable,}) => diff --git a/manager_api/lib/model/export_configuration_dto.dart b/manager_api/lib/model/export_configuration_dto.dart index 3e2a8a2..b30c1c5 100644 --- a/manager_api/lib/model/export_configuration_dto.dart +++ b/manager_api/lib/model/export_configuration_dto.dart @@ -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 sections; List 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 toJson() { final json = {}; @@ -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']), ); diff --git a/manager_api/lib/model/section_type.dart b/manager_api/lib/model/section_type.dart index 4d6cbc2..0858912 100644 --- a/manager_api/lib/model/section_type.dart +++ b/manager_api/lib/model/section_type.dart @@ -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 = [ @@ -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'); diff --git a/manager_api/swagger.yaml b/manager_api/swagger.yaml index 1344d5b..efff24d 100644 --- a/manager_api/swagger.yaml +++ b/manager_api/swagger.yaml @@ -1,3033 +1,1959 @@ -{ - "x-generator": "NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0))", - "openapi": "3.0.0", - "info": { - "title": "Manager Service", - "description": "API Manager Service", - "version": "Version Alpha" - }, - "servers": [ - { - "url": "http://localhost:5000" - } - ], - "paths": { - "/api/Configuration": { - "get": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_Get", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConfigurationDTO" - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "post": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_Create", - "requestBody": { - "x-name": "newConfiguration", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigurationDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigurationDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "put": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_Update", - "requestBody": { - "x-name": "updatedConfiguration", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigurationDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigurationDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Configuration/{id}": { - "get": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_GetDetail", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConfigurationDTO" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_Delete", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Configuration/{id}/export": { - "get": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_Export", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportConfigurationDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Configuration/import": { - "post": { - "tags": [ - "Configuration" - ], - "operationId": "Configuration_Import", - "requestBody": { - "x-name": "exportConfiguration", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportConfigurationDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Device": { - "get": { - "tags": [ - "Device" - ], - "operationId": "Device_Get", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceDTO" - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "post": { - "tags": [ - "Device" - ], - "operationId": "Device_Create", - "requestBody": { - "x-name": "newDevice", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDetailDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDetailDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "put": { - "tags": [ - "Device" - ], - "operationId": "Device_Update", - "requestBody": { - "x-name": "updatedDevice", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDetailDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDetailDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Device/{id}/detail": { - "get": { - "tags": [ - "Device" - ], - "operationId": "Device_GetDetail", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDetailDTO" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/Device/mainInfos": { - "put": { - "tags": [ - "Device" - ], - "operationId": "Device_UpdateMainInfos", - "requestBody": { - "x-name": "deviceIn", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Device/{id}": { - "delete": { - "tags": [ - "Device" - ], - "operationId": "Device_Delete", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Resource": { - "get": { - "tags": [ - "Resource" - ], - "operationId": "Resource_Get", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "post": { - "tags": [ - "Resource" - ], - "operationId": "Resource_Create", - "requestBody": { - "x-name": "newResource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "put": { - "tags": [ - "Resource" - ], - "operationId": "Resource_Update", - "requestBody": { - "x-name": "updatedResource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Resource/{id}/detail": { - "get": { - "tags": [ - "Resource" - ], - "operationId": "Resource_GetDetail", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/Resource/{id}": { - "get": { - "tags": [ - "Resource" - ], - "operationId": "Resource_Show", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Resource" - ], - "operationId": "Resource_Delete", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Resource/upload": { - "post": { - "tags": [ - "Resource" - ], - "operationId": "Resource_Upload", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "label": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_Get", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "post": { - "tags": [ - "Section" - ], - "operationId": "Section_Create", - "requestBody": { - "x-name": "newSection", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SectionDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "put": { - "tags": [ - "Section" - ], - "operationId": "Section_Update", - "requestBody": { - "x-name": "updatedSection", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SectionDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/configuration/{id}": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetFromConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Section" - ], - "operationId": "Section_DeleteAllForConfiguration", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/{id}/subsections": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetAllSectionSubSections", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/{id}": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetDetail", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Section" - ], - "operationId": "Section_Delete", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/order": { - "put": { - "tags": [ - "Section" - ], - "operationId": "Section_UpdateOrder", - "requestBody": { - "x-name": "updatedSectionsOrder", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/MapDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetMapDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MapDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/SliderDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetSliderDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SliderDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/VideoDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetVideoDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VideoDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/WebDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetWebDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/MenuDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetMenuDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MenuDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/PlayerMessageDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_PlayerMessageDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlayerMessageDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Section/QuizzDTO": { - "get": { - "tags": [ - "Section" - ], - "operationId": "Section_GetQuizzDTO", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QuizzDTO" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/User": { - "get": { - "tags": [ - "User" - ], - "operationId": "User_Get", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "post": { - "tags": [ - "User" - ], - "operationId": "User_CreateUser", - "requestBody": { - "x-name": "newUser", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDetailDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "put": { - "tags": [ - "User" - ], - "operationId": "User_UpdateUser", - "requestBody": { - "x-name": "updatedUser", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDetailDTO" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/User/{id}": { - "get": { - "tags": [ - "User" - ], - "operationId": "User_GetDetail", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserDetailDTO" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - }, - "delete": { - "tags": [ - "User" - ], - "operationId": "User_DeleteUser", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - }, - "x-position": 1 - } - ], - "responses": { - "202": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ] - } - }, - "/api/Authentication/Token": { - "post": { - "tags": [ - "Authentication" - ], - "operationId": "Authentication_AuthenticateWithForm", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "properties": { - "grant_type": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "client_id": { - "type": "string", - "nullable": true - }, - "client_secret": { - "type": "string", - "nullable": true - } - } - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenDTO" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/api/Authentication/Authenticate": { - "post": { - "tags": [ - "Authentication" - ], - "operationId": "Authentication_AuthenticateWithJson", - "requestBody": { - "x-name": "login", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginDTO" - } - } - }, - "required": true, - "x-position": 1 - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenDTO" - } - } - } - }, - "401": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "ConfigurationDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "primaryColor": { - "type": "string", - "nullable": true - }, - "secondaryColor": { - "type": "string", - "nullable": true - }, - "languages": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - }, - "dateCreation": { - "type": "string", - "format": "date-time" - } - } - }, - "ExportConfigurationDTO": { - "allOf": [ - { - "$ref": "#/components/schemas/ConfigurationDTO" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "sections": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/SectionDTO" - } - }, - "resources": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/ResourceDTO" - } - } - } - } - ] - }, - "SectionDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "title": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "description": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "imageId": { - "type": "string", - "nullable": true - }, - "imageSource": { - "type": "string", - "nullable": true - }, - "configurationId": { - "type": "string", - "nullable": true - }, - "isSubSection": { - "type": "boolean" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/SectionType" - }, - "data": { - "type": "string", - "nullable": true - }, - "dateCreation": { - "type": "string", - "format": "date-time" - }, - "order": { - "type": "integer", - "format": "int32" - } - } - }, - "TranslationDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "language": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - } - } - }, - "SectionType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Map", - "Slider", - "Video", - "Web", - "Menu", - "Quizz" - ], - "enum": [ - "Map", - "Slider", - "Video", - "Web", - "Menu", - "Quizz" - ] - }, - "ResourceDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ResourceType" - }, - "label": { - "type": "string", - "nullable": true - }, - "dateCreation": { - "type": "string", - "format": "date-time" - }, - "data": { - "type": "string", - "nullable": true - } - } - }, - "ResourceType": { - "type": "string", - "description": "", - "x-enumNames": [ - "Image", - "Video", - "ImageUrl", - "VideoUrl" - ], - "enum": [ - "Image", - "Video", - "ImageUrl", - "VideoUrl" - ] - }, - "DeviceDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "identifier": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "ipAddressWLAN": { - "type": "string", - "nullable": true - }, - "ipAddressETH": { - "type": "string", - "nullable": true - }, - "configurationId": { - "type": "string", - "nullable": true - }, - "configuration": { - "type": "string", - "nullable": true - }, - "connected": { - "type": "boolean" - }, - "dateCreation": { - "type": "string", - "format": "date-time" - }, - "dateUpdate": { - "type": "string", - "format": "date-time" - } - } - }, - "DeviceDetailDTO": { - "allOf": [ - { - "$ref": "#/components/schemas/DeviceDTO" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "connectionLevel": { - "type": "string", - "nullable": true - }, - "lastConnectionLevel": { - "type": "string", - "format": "date-time" - }, - "batteryLevel": { - "type": "string", - "nullable": true - }, - "lastBatteryLevel": { - "type": "string", - "format": "date-time" - } - } - } - ] - }, - "MapDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "zoom": { - "type": "integer", - "format": "int32" - }, - "mapType": { - "$ref": "#/components/schemas/MapTypeApp" - }, - "points": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/GeoPointDTO" - } - }, - "iconResourceId": { - "type": "string", - "nullable": true - }, - "iconSource": { - "type": "string", - "nullable": true - } - } - }, - "MapTypeApp": { - "type": "string", - "description": "", - "x-enumNames": [ - "none", - "normal", - "satellite", - "terrain", - "hybrid" - ], - "enum": [ - "none", - "normal", - "satellite", - "terrain", - "hybrid" - ] - }, - "GeoPointDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "description": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "images": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/ImageGeoPoint" - } - }, - "latitude": { - "type": "string", - "nullable": true - }, - "longitude": { - "type": "string", - "nullable": true - } - } - }, - "ImageGeoPoint": { - "type": "object", - "additionalProperties": false, - "properties": { - "imageResourceId": { - "type": "string", - "nullable": true - }, - "imageSource": { - "type": "string", - "nullable": true - } - } - }, - "SliderDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "images": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/ImageDTO" - } - } - } - }, - "ImageDTO": { - "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" - } - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "order": { - "type": "integer", - "format": "int32" - } - } - }, - "VideoDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "source": { - "type": "string", - "nullable": true - } - } - }, - "WebDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "source": { - "type": "string", - "nullable": true - } - } - }, - "MenuDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "sections": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/SectionDTO" - } - } - } - }, - "PlayerMessageDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "configChanged": { - "type": "boolean" - }, - "isDeleted": { - "type": "boolean" - } - } - }, - "QuizzDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "questions": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/QuestionDTO" - } - }, - "bad_level": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/LevelDTO" - } - ] - }, - "medium_level": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/LevelDTO" - } - ] - }, - "good_level": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/LevelDTO" - } - ] - }, - "great_level": { - "nullable": true, - "oneOf": [ - { - "$ref": "#/components/schemas/LevelDTO" - } - ] - } - } - }, - "QuestionDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "responses": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/ResponseDTO" - } - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "order": { - "type": "integer", - "format": "int32" - } - } - }, - "ResponseDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "isGood": { - "type": "boolean" - }, - "order": { - "type": "integer", - "format": "int32" - } - } - }, - "LevelDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "type": "array", - "nullable": true, - "items": { - "$ref": "#/components/schemas/TranslationDTO" - } - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - } - } - }, - "User": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - }, - "token": { - "type": "string", - "nullable": true - }, - "dateCreation": { - "type": "string", - "format": "date-time" - } - } - }, - "UserDetailDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "firstName": { - "type": "string", - "nullable": true - }, - "lastName": { - "type": "string", - "nullable": true - } - } - }, - "TokenDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "access_token": { - "type": "string", - "nullable": true - }, - "refresh_token": { - "type": "string", - "nullable": true - }, - "scope": { - "type": "string", - "nullable": true - }, - "token_type": { - "type": "string", - "nullable": true - }, - "expires_in": { - "type": "integer", - "format": "int32" - }, - "expiration": { - "type": "string", - "format": "date-time" - } - } - }, - "LoginDTO": { - "type": "object", - "additionalProperties": false, - "properties": { - "email": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - } - } - } - }, - "securitySchemes": { - "bearer": { - "type": "oauth2", - "description": "Manager Authentication", - "flows": { - "password": { - "authorizationUrl": "/authentication/Token", - "tokenUrl": "/api/authentication/Token", - "scopes": { - "Manager-api": "Manager WebAPI" - } - } - } - } - } - }, - "security": [ - { - "bearer": [] - } - ], - "tags": [ - { - "name": "Configuration", - "description": "Configuration management" - }, - { - "name": "Device", - "description": "Device management" - }, - { - "name": "Resource", - "description": "Resource management" - }, - { - "name": "Section", - "description": "Section management" - }, - { - "name": "User", - "description": "User management" - }, - { - "name": "Authentication", - "description": "Authentication management" - } - ] -} \ No newline at end of file +x-generator: NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0)) +openapi: 3.0.0 +info: + title: Manager Service + description: API Manager Service + version: Version Alpha +servers: + - url: http://localhost:5000 +paths: + /api/Configuration: + get: + tags: + - Configuration + operationId: Configuration_Get + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ConfigurationDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + post: + tags: + - Configuration + operationId: Configuration_Create + requestBody: + x-name: newConfiguration + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigurationDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigurationDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Configuration + operationId: Configuration_Update + requestBody: + x-name: updatedConfiguration + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigurationDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigurationDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Configuration/{id}: + get: + tags: + - Configuration + operationId: Configuration_GetDetail + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ConfigurationDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + delete: + tags: + - Configuration + operationId: Configuration_Delete + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Configuration/{id}/export: + get: + tags: + - Configuration + operationId: Configuration_Export + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/Configuration/import: + post: + tags: + - Configuration + operationId: Configuration_Import + requestBody: + x-name: exportConfiguration + content: + application/json: + schema: + $ref: '#/components/schemas/ExportConfigurationDTO' + required: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Device: + get: + tags: + - Device + operationId: Device_Get + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DeviceDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + post: + tags: + - Device + operationId: Device_Create + requestBody: + x-name: newDevice + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + put: + tags: + - Device + operationId: Device_Update + requestBody: + x-name: updatedDevice + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Device/{id}/detail: + get: + tags: + - Device + operationId: Device_GetDetail + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDetailDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/Device/mainInfos: + put: + tags: + - Device + operationId: Device_UpdateMainInfos + requestBody: + x-name: deviceIn + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Device/{id}: + delete: + tags: + - Device + operationId: Device_Delete + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Resource: + get: + tags: + - Resource + operationId: Resource_Get + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ResourceDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + post: + tags: + - Resource + operationId: Resource_Create + requestBody: + x-name: newResource + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Resource + operationId: Resource_Update + requestBody: + x-name: updatedResource + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Resource/{id}/detail: + get: + tags: + - Resource + operationId: Resource_GetDetail + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/ResourceDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/Resource/{id}: + get: + tags: + - Resource + operationId: Resource_Show + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/octet-stream: + schema: + type: string + format: binary + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + delete: + tags: + - Resource + operationId: Resource_Delete + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Resource/upload: + post: + tags: + - Resource + operationId: Resource_Upload + requestBody: + content: + multipart/form-data: + schema: + properties: + label: + type: string + nullable: true + type: + type: string + nullable: true + responses: + '200': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Section: + get: + tags: + - Section + operationId: Section_Get + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SectionDTO' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + post: + tags: + - Section + operationId: Section_Create + requestBody: + x-name: newSection + content: + application/json: + schema: + $ref: '#/components/schemas/SectionDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SectionDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + put: + tags: + - Section + operationId: Section_Update + requestBody: + x-name: updatedSection + content: + application/json: + schema: + $ref: '#/components/schemas/SectionDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SectionDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Section/configuration/{id}: + get: + tags: + - Section + operationId: Section_GetFromConfiguration + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SectionDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + delete: + tags: + - Section + operationId: Section_DeleteAllForConfiguration + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Section/{id}/subsections: + get: + tags: + - Section + operationId: Section_GetAllSectionSubSections + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: {} + '400': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Section/{id}: + get: + tags: + - Section + operationId: Section_GetDetail + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SectionDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + delete: + tags: + - Section + operationId: Section_Delete + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Section/order: + put: + tags: + - Section + operationId: Section_UpdateOrder + requestBody: + x-name: updatedSectionsOrder + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SectionDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Section/MapDTO: + get: + tags: + - Section + operationId: Section_GetMapDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/MapDTO' + security: + - bearer: [] + /api/Section/SliderDTO: + get: + tags: + - Section + operationId: Section_GetSliderDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/SliderDTO' + security: + - bearer: [] + /api/Section/VideoDTO: + get: + tags: + - Section + operationId: Section_GetVideoDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/VideoDTO' + security: + - bearer: [] + /api/Section/WebDTO: + get: + tags: + - Section + operationId: Section_GetWebDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/WebDTO' + security: + - bearer: [] + /api/Section/MenuDTO: + get: + tags: + - Section + operationId: Section_GetMenuDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/MenuDTO' + security: + - bearer: [] + /api/Section/PlayerMessageDTO: + get: + tags: + - Section + operationId: Section_PlayerMessageDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PlayerMessageDTO' + security: + - bearer: [] + /api/Section/QuizzDTO: + get: + tags: + - Section + operationId: Section_GetQuizzDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $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: + - User + operationId: User_Get + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + post: + tags: + - User + operationId: User_CreateUser + requestBody: + x-name: newUser + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '409': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + put: + tags: + - User + operationId: User_UpdateUser + requestBody: + x-name: updatedUser + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserDetailDTO' + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/User/{id}: + get: + tags: + - User + operationId: User_GetDetail + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/UserDetailDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + delete: + tags: + - User + operationId: User_DeleteUser + parameters: + - name: id + in: path + required: true + schema: + type: string + nullable: true + x-position: 1 + responses: + '202': + description: '' + content: + application/json: + schema: + type: string + '400': + description: '' + content: + application/json: + schema: + type: string + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + security: + - bearer: [] + /api/Authentication/Token: + post: + tags: + - Authentication + operationId: Authentication_AuthenticateWithForm + requestBody: + content: + multipart/form-data: + schema: + properties: + grant_type: + type: string + nullable: true + username: + type: string + nullable: true + password: + type: string + nullable: true + client_id: + type: string + nullable: true + client_secret: + type: string + nullable: true + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string + /api/Authentication/Authenticate: + post: + tags: + - Authentication + operationId: Authentication_AuthenticateWithJson + requestBody: + x-name: login + content: + application/json: + schema: + $ref: '#/components/schemas/LoginDTO' + required: true + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/TokenDTO' + '401': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string +components: + schemas: + ConfigurationDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + label: + type: string + nullable: true + primaryColor: + type: string + nullable: true + secondaryColor: + type: string + nullable: true + languages: + type: array + nullable: true + items: + type: string + dateCreation: + type: string + format: date-time + isMobile: + type: boolean + isTablet: + type: boolean + isOffline: + type: boolean + ExportConfigurationDTO: + allOf: + - $ref: '#/components/schemas/ConfigurationDTO' + - type: object + additionalProperties: false + properties: + sections: + type: array + nullable: true + items: + $ref: '#/components/schemas/SectionDTO' + resources: + type: array + nullable: true + items: + $ref: '#/components/schemas/ResourceDTO' + SectionDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + label: + type: string + nullable: true + title: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + description: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + imageId: + type: string + nullable: true + imageSource: + type: string + nullable: true + configurationId: + type: string + nullable: true + isSubSection: + type: boolean + parentId: + type: string + nullable: true + type: + $ref: '#/components/schemas/SectionType' + data: + type: string + nullable: true + dateCreation: + type: string + format: date-time + order: + type: integer + format: int32 + TranslationDTO: + type: object + additionalProperties: false + properties: + language: + type: string + nullable: true + value: + type: string + nullable: true + SectionType: + type: integer + description: |- + 0 = Map + 1 = Slider + 2 = Video + 3 = Web + 4 = Menu + 5 = Quizz + 6 = Article + x-enumNames: + - Map + - Slider + - Video + - Web + - Menu + - Quizz + - Article + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + ResourceDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + type: + $ref: '#/components/schemas/ResourceType' + label: + type: string + nullable: true + dateCreation: + type: string + format: date-time + data: + type: string + nullable: true + ResourceType: + type: integer + description: |- + 0 = Image + 1 = Video + 2 = ImageUrl + 3 = VideoUrl + x-enumNames: + - Image + - Video + - ImageUrl + - VideoUrl + enum: + - 0 + - 1 + - 2 + - 3 + DeviceDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + identifier: + type: string + nullable: true + name: + type: string + nullable: true + ipAddressWLAN: + type: string + nullable: true + ipAddressETH: + type: string + nullable: true + configurationId: + type: string + nullable: true + configuration: + type: string + nullable: true + connected: + type: boolean + dateCreation: + type: string + format: date-time + dateUpdate: + type: string + format: date-time + DeviceDetailDTO: + allOf: + - $ref: '#/components/schemas/DeviceDTO' + - type: object + additionalProperties: false + properties: + connectionLevel: + type: string + nullable: true + lastConnectionLevel: + type: string + format: date-time + batteryLevel: + type: string + nullable: true + lastBatteryLevel: + type: string + format: date-time + MapDTO: + type: object + additionalProperties: false + properties: + zoom: + type: integer + format: int32 + mapType: + $ref: '#/components/schemas/MapTypeApp' + points: + type: array + nullable: true + items: + $ref: '#/components/schemas/GeoPointDTO' + iconResourceId: + type: string + nullable: true + iconSource: + type: string + nullable: true + MapTypeApp: + type: integer + description: |- + 0 = none + 1 = normal + 2 = satellite + 3 = terrain + 4 = hybrid + x-enumNames: + - none + - normal + - satellite + - terrain + - hybrid + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + GeoPointDTO: + type: object + additionalProperties: false + properties: + id: + type: integer + format: int32 + title: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + description: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + images: + type: array + nullable: true + items: + $ref: '#/components/schemas/ImageGeoPoint' + latitude: + type: string + nullable: true + longitude: + type: string + nullable: true + ImageGeoPoint: + type: object + additionalProperties: false + properties: + imageResourceId: + type: string + nullable: true + imageSource: + type: string + nullable: true + SliderDTO: + type: object + additionalProperties: false + properties: + images: + type: array + nullable: true + items: + $ref: '#/components/schemas/ImageDTO' + ImageDTO: + 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' + resourceId: + type: string + nullable: true + source: + type: string + nullable: true + order: + type: integer + format: int32 + VideoDTO: + type: object + additionalProperties: false + properties: + source: + type: string + nullable: true + WebDTO: + type: object + additionalProperties: false + properties: + source: + type: string + nullable: true + MenuDTO: + type: object + additionalProperties: false + properties: + sections: + type: array + nullable: true + items: + $ref: '#/components/schemas/SectionDTO' + PlayerMessageDTO: + type: object + additionalProperties: false + properties: + configChanged: + type: boolean + isDeleted: + type: boolean + QuizzDTO: + type: object + additionalProperties: false + properties: + questions: + type: array + nullable: true + items: + $ref: '#/components/schemas/QuestionDTO' + bad_level: + nullable: true + oneOf: + - $ref: '#/components/schemas/LevelDTO' + medium_level: + nullable: true + oneOf: + - $ref: '#/components/schemas/LevelDTO' + good_level: + nullable: true + oneOf: + - $ref: '#/components/schemas/LevelDTO' + great_level: + nullable: true + oneOf: + - $ref: '#/components/schemas/LevelDTO' + QuestionDTO: + type: object + additionalProperties: false + properties: + label: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + responses: + type: array + nullable: true + items: + $ref: '#/components/schemas/ResponseDTO' + resourceId: + type: string + nullable: true + source: + type: string + nullable: true + order: + type: integer + format: int32 + ResponseDTO: + type: object + additionalProperties: false + properties: + label: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + isGood: + type: boolean + order: + type: integer + format: int32 + LevelDTO: + type: object + additionalProperties: false + properties: + label: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + resourceId: + type: string + nullable: true + 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 + properties: + id: + type: string + nullable: true + email: + type: string + nullable: true + password: + type: string + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + token: + type: string + nullable: true + dateCreation: + type: string + format: date-time + UserDetailDTO: + type: object + additionalProperties: false + properties: + id: + type: string + nullable: true + email: + type: string + nullable: true + firstName: + type: string + nullable: true + lastName: + type: string + nullable: true + TokenDTO: + type: object + additionalProperties: false + properties: + access_token: + type: string + nullable: true + refresh_token: + type: string + nullable: true + scope: + type: string + nullable: true + token_type: + type: string + nullable: true + expires_in: + type: integer + format: int32 + expiration: + type: string + format: date-time + LoginDTO: + type: object + additionalProperties: false + properties: + email: + type: string + nullable: true + password: + type: string + nullable: true + securitySchemes: + bearer: + type: oauth2 + description: Manager Authentication + flows: + password: + authorizationUrl: /authentication/Token + tokenUrl: /api/authentication/Token + scopes: + Manager-api: Manager WebAPI +security: + - bearer: [] +tags: + - name: Configuration + description: Configuration management + - name: Device + description: Device management + - name: Resource + description: Resource management + - name: Section + description: Section management + - name: User + description: User management + - name: Authentication + description: Authentication management diff --git a/manager_api/swagger.yaml.bak b/manager_api/swagger.yaml.bak index 7b9e9d2..8bad867 100644 --- a/manager_api/swagger.yaml.bak +++ b/manager_api/swagger.yaml.bak @@ -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 diff --git a/manager_api/test/article_dto_test.dart b/manager_api/test/article_dto_test.dart new file mode 100644 index 0000000..87b00b4 --- /dev/null +++ b/manager_api/test/article_dto_test.dart @@ -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 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 + }); + + // List 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 images (default value: const []) + test('to test the property `images`', () async { + // TODO + }); + + + }); + +} diff --git a/pubspec.lock b/pubspec.lock index 1acffeb..bd2d23c 100644 --- a/pubspec.lock +++ b/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"