chore(server): update openapi (#2205)

This commit is contained in:
Michel Heusschen
2023-04-09 04:26:09 +02:00
committed by GitHub
parent 91e27affeb
commit 983abf5e14
65 changed files with 756 additions and 1458 deletions

View File

@@ -20,7 +20,7 @@ class ApiKeyAuth implements Authentication {
String apiKey = '';
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey';
if (paramValue.isNotEmpty) {

View File

@@ -13,5 +13,5 @@ part of openapi.api;
// ignore: one_member_abstracts
abstract class Authentication {
/// Apply authentication settings to header and query params.
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
}

View File

@@ -17,7 +17,7 @@ class HttpBasicAuth implements Authentication {
String password;
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
if (username.isNotEmpty && password.isNotEmpty) {
final credentials = '$username:$password';
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';

View File

@@ -27,7 +27,7 @@ class HttpBearerAuth implements Authentication {
}
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
if (_accessToken == null) {
return;
}

View File

@@ -16,7 +16,7 @@ class OAuth implements Authentication {
String accessToken;
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
Future<void> applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams,) async {
if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}