From 0e7fcd6517e05170749d75f5e3dab7597a41032b Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Tue, 5 Dec 2023 14:22:25 +0100 Subject: [PATCH] update service generation --- lib/api/swagger.yaml | 6 +++++- manager_api/README.md | 2 +- manager_api/doc/AuthenticationApi.md | 2 +- manager_api/doc/ConfigurationApi.md | 2 +- manager_api/doc/DeviceApi.md | 2 +- manager_api/doc/InstanceApi.md | 2 +- manager_api/doc/ResourceApi.md | 2 +- manager_api/doc/SectionApi.md | 2 +- manager_api/doc/TokenDTO.md | 1 + manager_api/doc/UserApi.md | 2 +- manager_api/lib/api_client.dart | 2 +- manager_api/lib/model/token_dto.dart | 17 ++++++++++++++--- 12 files changed, 29 insertions(+), 13 deletions(-) diff --git a/lib/api/swagger.yaml b/lib/api/swagger.yaml index 71950c8..c746371 100644 --- a/lib/api/swagger.yaml +++ b/lib/api/swagger.yaml @@ -5,7 +5,7 @@ info: description: API Manager Service version: Version Alpha servers: - - url: http://localhost:5000 + - url: https://api.mymuseum.be paths: /api/Configuration: get: @@ -2321,6 +2321,10 @@ components: instanceId: type: string nullable: true + pinCode: + type: integer + format: int32 + nullable: true LoginDTO: type: object additionalProperties: false diff --git a/manager_api/README.md b/manager_api/README.md index 5b4274c..b7c0cc0 100644 --- a/manager_api/README.md +++ b/manager_api/README.md @@ -60,7 +60,7 @@ try { ## Documentation for API Endpoints -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- diff --git a/manager_api/doc/AuthenticationApi.md b/manager_api/doc/AuthenticationApi.md index 8fdf05d..be64641 100644 --- a/manager_api/doc/AuthenticationApi.md +++ b/manager_api/doc/AuthenticationApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ConfigurationApi.md b/manager_api/doc/ConfigurationApi.md index 99d625e..a30aafb 100644 --- a/manager_api/doc/ConfigurationApi.md +++ b/manager_api/doc/ConfigurationApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/DeviceApi.md b/manager_api/doc/DeviceApi.md index 020ce00..30e9574 100644 --- a/manager_api/doc/DeviceApi.md +++ b/manager_api/doc/DeviceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/InstanceApi.md b/manager_api/doc/InstanceApi.md index 4176d2e..7810fc6 100644 --- a/manager_api/doc/InstanceApi.md +++ b/manager_api/doc/InstanceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ResourceApi.md b/manager_api/doc/ResourceApi.md index fb6bad9..83d00db 100644 --- a/manager_api/doc/ResourceApi.md +++ b/manager_api/doc/ResourceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/SectionApi.md b/manager_api/doc/SectionApi.md index 2d83ce4..46e8e00 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api/doc/SectionApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/TokenDTO.md b/manager_api/doc/TokenDTO.md index f8a2124..843486c 100644 --- a/manager_api/doc/TokenDTO.md +++ b/manager_api/doc/TokenDTO.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **expiresIn** | **int** | | [optional] **expiration** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] +**pinCode** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/manager_api/doc/UserApi.md b/manager_api/doc/UserApi.md index 6a55295..5963708 100644 --- a/manager_api/doc/UserApi.md +++ b/manager_api/doc/UserApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *http://localhost:5000* +All URIs are relative to *https://api.mymuseum.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/lib/api_client.dart b/manager_api/lib/api_client.dart index 961d5d4..007b008 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api/lib/api_client.dart @@ -11,7 +11,7 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'http://localhost:5000', this.authentication,}); + ApiClient({this.basePath = 'https://api.mymuseum.be', this.authentication,}); final String basePath; final Authentication? authentication; diff --git a/manager_api/lib/model/token_dto.dart b/manager_api/lib/model/token_dto.dart index 2f4456d..1c9ceb5 100644 --- a/manager_api/lib/model/token_dto.dart +++ b/manager_api/lib/model/token_dto.dart @@ -20,6 +20,7 @@ class TokenDTO { this.expiresIn, this.expiration, this.instanceId, + this.pinCode, }); String? accessToken; @@ -48,6 +49,8 @@ class TokenDTO { String? instanceId; + int? pinCode; + @override bool operator ==(Object other) => identical(this, other) || other is TokenDTO && other.accessToken == accessToken && @@ -56,7 +59,8 @@ class TokenDTO { other.tokenType == tokenType && other.expiresIn == expiresIn && other.expiration == expiration && - other.instanceId == instanceId; + other.instanceId == instanceId && + other.pinCode == pinCode; @override int get hashCode => @@ -67,10 +71,11 @@ class TokenDTO { (tokenType == null ? 0 : tokenType!.hashCode) + (expiresIn == null ? 0 : expiresIn!.hashCode) + (expiration == null ? 0 : expiration!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + (instanceId == null ? 0 : instanceId!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId]'; + String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId, pinCode=$pinCode]'; Map toJson() { final json = {}; @@ -109,6 +114,11 @@ class TokenDTO { } else { json[r'instanceId'] = null; } + if (this.pinCode != null) { + json[r'pinCode'] = this.pinCode; + } else { + json[r'pinCode'] = null; + } return json; } @@ -138,6 +148,7 @@ class TokenDTO { expiresIn: mapValueOfType(json, r'expires_in'), expiration: mapDateTime(json, r'expiration', ''), instanceId: mapValueOfType(json, r'instanceId'), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null;