From c17f5c8d69f314de483dcbc4b56ab1295723c7bb Mon Sep 17 00:00:00 2001 From: Robert Brands Date: Mon, 15 Jan 2024 17:40:43 +0100 Subject: [PATCH] Version updates (#134) Co-authored-by: Robert Brands (RiwaAdmin) --- MeetUpFunctions/AddCoGuide.cs | 5 +- MeetUpFunctions/AddCommentToCalendarItem.cs | 5 -- MeetUpFunctions/AddCommentToInfoItem.cs | 5 -- .../AddParticipantToCalendarItem.cs | 5 -- .../AssignNewHostToCalendarItem.cs | 5 -- MeetUpFunctions/CheckKeyword.cs | 7 --- MeetUpFunctions/Constants.cs | 2 +- MeetUpFunctions/CopyWeeklysToNextWeek.cs | 7 --- MeetUpFunctions/DeleteCalendarItem.cs | 5 -- MeetUpFunctions/DeleteInfoItem.cs | 5 -- MeetUpFunctions/DeleteMeetingPlace.cs | 5 -- MeetUpFunctions/ExportTrackingReport.cs | 6 -- .../GetAllExtendedCalendarItems.cs | 4 -- MeetUpFunctions/GetCalendarItem.cs | 8 --- MeetUpFunctions/GetCalendarItems.cs | 7 --- MeetUpFunctions/GetChallengeByTitle.cs | 4 -- MeetUpFunctions/GetClientSettings.cs | 4 -- MeetUpFunctions/GetContentWithChaptersItem.cs | 4 -- MeetUpFunctions/GetExportLog.cs | 6 -- MeetUpFunctions/GetExtendedCalendarItem.cs | 7 --- MeetUpFunctions/GetExtendedCalendarItems.cs | 6 -- .../GetExtendedCalendarItemsForDate.cs | 7 --- MeetUpFunctions/GetExtendedInfoItem.cs | 7 --- MeetUpFunctions/GetExtendedInfoItems.cs | 6 -- MeetUpFunctions/GetInfoItem.cs | 8 --- MeetUpFunctions/GetLinkPreview.cs | 5 -- MeetUpFunctions/GetMeetingPlace.cs | 9 --- MeetUpFunctions/GetMeetingPlaces.cs | 7 --- .../GetNotificationSubscriptions.cs | 9 --- MeetUpFunctions/GetScopedCalendarItems.cs | 6 -- MeetUpFunctions/GetServerSettings.cs | 5 -- MeetUpFunctions/GetTenantClientSettings.cs | 5 -- MeetUpFunctions/GetWebcalToken.cs | 3 - .../MeetUpPlanner.Functions.csproj | 9 +-- .../NotificationSubscriptionRepository.cs | 5 -- .../RemoveCommentFromCalendarItem.cs | 6 -- MeetUpFunctions/RemoveFederation.cs | 1 - .../RemoveParticipantFromCalendarItem.cs | 5 -- MeetUpFunctions/Version.cs | 3 - MeetUpFunctions/WriteCalendarItem.cs | 5 -- MeetUpFunctions/WriteClientSettings.cs | 5 -- .../WriteContentWithChaptersItem.cs | 1 - MeetUpFunctions/WriteInfoItem.cs | 5 -- MeetUpFunctions/WriteMeetingPlace.cs | 5 -- .../WriteNotificationSubscription.cs | 5 -- MeetUpFunctions/WriteServerSettings.cs | 5 -- .../Client/MeetUpPlanner.Client.csproj | 12 ++-- MeetUpPlanner/Client/Pages/About.razor | 2 +- MeetUpPlanner/Client/Pages/Invite.razor | 9 +-- .../Server/Controllers/UtilController.cs | 56 +++++++++---------- .../Controllers/WinterpokalController.cs | 2 +- .../Server/MeetUpPlanner.Server.csproj | 9 ++- .../Shared/MeetUpPlanner.Shared.csproj | 2 +- 53 files changed, 50 insertions(+), 291 deletions(-) diff --git a/MeetUpFunctions/AddCoGuide.cs b/MeetUpFunctions/AddCoGuide.cs index 6a2606a..38e3593 100644 --- a/MeetUpFunctions/AddCoGuide.cs +++ b/MeetUpFunctions/AddCoGuide.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -65,13 +64,13 @@ public async Task Run( int counter = calendarItem.WithoutHost ? 0 : 1; int waitingCounter = 0; int coGuideCounter = 0; - bool alreadyRegistered = false; + // bool alreadyRegistered = false; foreach (Participant p in participants) { if (p.ParticipantFirstName.Equals(participant.ParticipantFirstName) && p.ParticipantLastName.Equals(participant.ParticipantLastName)) { // already registered - alreadyRegistered = true; + // alreadyRegistered = true; participant.Id = p.Id; participant.IsWaiting = p.IsWaiting; } diff --git a/MeetUpFunctions/AddCommentToCalendarItem.cs b/MeetUpFunctions/AddCommentToCalendarItem.cs index e9ce442..6f3f559 100644 --- a/MeetUpFunctions/AddCommentToCalendarItem.cs +++ b/MeetUpFunctions/AddCommentToCalendarItem.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using System.Web.Http; using MeetUpPlanner.Shared; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -38,10 +37,6 @@ public AddCommentToCalendarItem(ILogger logger, } [FunctionName("AddCommentToCalendarItem")] - [OpenApiOperation(Summary = "Add a comment to the referenced CalendarItem.", - Description = "If the CalendarComment already exists (same id) it is overwritten.")] - [OpenApiRequestBody("application/json", typeof(CalendarComment), Description = "New CalendarComment to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/AddCommentToInfoItem.cs b/MeetUpFunctions/AddCommentToInfoItem.cs index 8cb0124..52bbb54 100644 --- a/MeetUpFunctions/AddCommentToInfoItem.cs +++ b/MeetUpFunctions/AddCommentToInfoItem.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using System.Web.Http; using MeetUpPlanner.Shared; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -31,10 +30,6 @@ public AddCommentToInfoItem(ILogger logger, } [FunctionName("AddCommentToInfoItem")] - [OpenApiOperation(Summary = "Add a comment to the referenced InfoItem.", - Description = "If the CalendarComment already exists (same id) it is overwritten.")] - [OpenApiRequestBody("application/json", typeof(CalendarComment), Description = "New CalendarComment to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/AddParticipantToCalendarItem.cs b/MeetUpFunctions/AddParticipantToCalendarItem.cs index 1efeeef..70fefa2 100644 --- a/MeetUpFunctions/AddParticipantToCalendarItem.cs +++ b/MeetUpFunctions/AddParticipantToCalendarItem.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -32,10 +31,6 @@ public AddParticipantToCalendarItem(ILogger logger } [FunctionName("AddParticipantToCalendarItem")] - [OpenApiOperation(Summary = "Add a participant to the referenced CalendarItem.", - Description = "If the Participants already exists (same id) it is overwritten.")] - [OpenApiRequestBody("application/json", typeof(Participant), Description = "New Participant to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/AssignNewHostToCalendarItem.cs b/MeetUpFunctions/AssignNewHostToCalendarItem.cs index d2cdb76..35b7e43 100644 --- a/MeetUpFunctions/AssignNewHostToCalendarItem.cs +++ b/MeetUpFunctions/AssignNewHostToCalendarItem.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -32,10 +31,6 @@ public AssignNewHostToCalendarItem(ILogger logger, } [FunctionName("AssignNewHostToCalendarItem")] - [OpenApiOperation(Summary = "Assign a new host.", - Description = "The given participant will be assigned as new host for the CalendarItem.")] - [OpenApiRequestBody("application/json", typeof(Participant), Description = "Participant to be the new host.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/CheckKeyword.cs b/MeetUpFunctions/CheckKeyword.cs index b675843..c267f68 100644 --- a/MeetUpFunctions/CheckKeyword.cs +++ b/MeetUpFunctions/CheckKeyword.cs @@ -1,14 +1,11 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Shared; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -31,10 +28,6 @@ public CheckKeyword(ILogger logger, ServerSettingsRepository serve /// /// [FunctionName(nameof(CheckKeyword))] - [OpenApiOperation(Summary = "Checks the given keyword and returns if it matches the user or admin keyword.", - Description = "Reading the ServerSettings is only needed for editing for administrators. To be able to read ServerSettings the admin keyword must be set as header x-meetup-keyword.")] - [OpenApiParameter("keyword", Description = "Keyword to be checked.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(KeywordCheck), Description = "With status IsUser and IsAdmin.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req, ILogger log) diff --git a/MeetUpFunctions/Constants.cs b/MeetUpFunctions/Constants.cs index 12eeddc..297d1a6 100644 --- a/MeetUpFunctions/Constants.cs +++ b/MeetUpFunctions/Constants.cs @@ -22,7 +22,7 @@ public static class Constants public const string DEFAULT_DISCLAIMER = "Disclaimer"; public const string DEFAULT_GUEST_DISCLAIMER = "Guest Disclaimer"; - public const string VERSION = "2023-09-16"; + public const string VERSION = "2024-01-02"; public const int ADMINOVERBOOKFACTOR = 1; // no overbooking any more, because not needed public const int LOG_TTL = 30 * 24 * 3600; // 30 days TTL for Log items diff --git a/MeetUpFunctions/CopyWeeklysToNextWeek.cs b/MeetUpFunctions/CopyWeeklysToNextWeek.cs index 43b5f5f..a7752a5 100644 --- a/MeetUpFunctions/CopyWeeklysToNextWeek.cs +++ b/MeetUpFunctions/CopyWeeklysToNextWeek.cs @@ -7,11 +7,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; -using System.Web.Http; -using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; @@ -36,9 +32,6 @@ public CopyWeeklysToNextWeek(ILogger logger, ServerSettin /// /// [FunctionName("CopyWeeklysToNextWeek")] - [OpenApiOperation(Summary = "Copies all CalendarItems marked as weekly to next week.", - Description = "Copies all CalendarItems marked as weekly from current day to next week.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Result of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/DeleteCalendarItem.cs b/MeetUpFunctions/DeleteCalendarItem.cs index cb734f8..b25e358 100644 --- a/MeetUpFunctions/DeleteCalendarItem.cs +++ b/MeetUpFunctions/DeleteCalendarItem.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -36,10 +35,6 @@ CosmosDBRepository participantRepository } [FunctionName("DeleteCalendarItem")] - [OpenApiOperation(Summary = "Deletes a CalendarItem including all corresponding Participant and CalendarComment items.", - Description = "Every CalendarItem has a unique id that is used to delete it.")] - [OpenApiRequestBody("application/json", typeof(CalendarItem), Description = "CalendarItem to be removed.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/DeleteInfoItem.cs b/MeetUpFunctions/DeleteInfoItem.cs index a85a077..105aeda 100644 --- a/MeetUpFunctions/DeleteInfoItem.cs +++ b/MeetUpFunctions/DeleteInfoItem.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -33,10 +32,6 @@ CosmosDBRepository commentRepository } [FunctionName("DeleteInfoItem")] - [OpenApiOperation(Summary = "Deletes an InfoItem including all CalendarComment items.", - Description = "Every InfoItem has a unique id that is used to delete it.")] - [OpenApiRequestBody("application/json", typeof(InfoItem), Description = "InfoItem to be removed.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/DeleteMeetingPlace.cs b/MeetUpFunctions/DeleteMeetingPlace.cs index 55413fd..51bef54 100644 --- a/MeetUpFunctions/DeleteMeetingPlace.cs +++ b/MeetUpFunctions/DeleteMeetingPlace.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -30,10 +29,6 @@ CosmosDBRepository cosmosRepository } [FunctionName("DeleteMeetingPlace")] - [OpenApiOperation(Summary = "Deletes a MeetingPlace.", - Description = "Every MeetingPlace has a unique id that is used to delete it.")] - [OpenApiRequestBody("application/json", typeof(InfoItem), Description = "MeetingPlace to be removed.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/ExportTrackingReport.cs b/MeetUpFunctions/ExportTrackingReport.cs index 138a911..f963932 100644 --- a/MeetUpFunctions/ExportTrackingReport.cs +++ b/MeetUpFunctions/ExportTrackingReport.cs @@ -11,8 +11,6 @@ using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; -using System.Collections; namespace MeetUpPlanner.Functions { @@ -38,10 +36,6 @@ public ExportTrackingReport(ILogger logger, } [FunctionName("ExportTrackingReport")] - [OpenApiOperation(Summary = "Export a list of participants of the given user sharing rides", - Description = "All CalendarItems still in database are scanned for participants who had shared an envent with the given person. To be able to read all ExtendedCalenderItems the admin keyword must be set as header x-meetup-keyword.")] - [OpenApiRequestBody("application/json", typeof(TrackingReportRequest), Description = "Holds all information needed to assemble a tracking report")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(TrackingReport))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetAllExtendedCalendarItems.cs b/MeetUpFunctions/GetAllExtendedCalendarItems.cs index 09c423b..31c82a7 100644 --- a/MeetUpFunctions/GetAllExtendedCalendarItems.cs +++ b/MeetUpFunctions/GetAllExtendedCalendarItems.cs @@ -11,7 +11,6 @@ using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -36,9 +35,6 @@ public GetAllExtendedCalendarItems(ILogger logger, Ser } [FunctionName("GetAllExtendedCalendarItems")] - [OpenApiOperation(Summary = "Gets all ExtendedCalendarIitems", - Description = "Reading all ExtendedCalendarItems (including particpants and comments) for tracking issues. To be able to read all ExtendedCalenderItems the admin keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetCalendarItem.cs b/MeetUpFunctions/GetCalendarItem.cs index d7146b1..47121e1 100644 --- a/MeetUpFunctions/GetCalendarItem.cs +++ b/MeetUpFunctions/GetCalendarItem.cs @@ -1,16 +1,12 @@ using System; -using System.IO; -using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -29,10 +25,6 @@ public GetCalendarItem(ILogger logger, ServerSettingsRepository } [FunctionName("GetCalendarItem")] - [OpenApiOperation(Summary = "Gets the CalendarItem by the given itemId", - Description = "Reading a CalendarItem by id. To be able to read a CalenderItem the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(CalendarItem))] - [OpenApiParameter("id", Description = "Id of CalendarItem to read.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetCalendarItem/{id}")] HttpRequest req, string id) diff --git a/MeetUpFunctions/GetCalendarItems.cs b/MeetUpFunctions/GetCalendarItems.cs index 6a36bd6..ccd1d38 100644 --- a/MeetUpFunctions/GetCalendarItems.cs +++ b/MeetUpFunctions/GetCalendarItems.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +6,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -29,10 +26,6 @@ public GetCalendarItems(ILogger logger, ServerSettingsReposito } [FunctionName("GetCalendarItems")] - [OpenApiOperation(Summary = "Gets the relevant CalendarIitems", - Description = "Reading current CalendarItems starting in the future or the configured past (in hours). To be able to read CalenderItems the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] - [OpenApiParameter("privatekeywords", Description = "Holds a list of private keywords, separated by ;")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetChallengeByTitle.cs b/MeetUpFunctions/GetChallengeByTitle.cs index 1845cf2..d05ed4c 100644 --- a/MeetUpFunctions/GetChallengeByTitle.cs +++ b/MeetUpFunctions/GetChallengeByTitle.cs @@ -1,16 +1,12 @@ using System; -using System.IO; -using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions diff --git a/MeetUpFunctions/GetClientSettings.cs b/MeetUpFunctions/GetClientSettings.cs index 049ed32..929c62c 100644 --- a/MeetUpFunctions/GetClientSettings.cs +++ b/MeetUpFunctions/GetClientSettings.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -9,7 +8,6 @@ using MeetUpPlanner.Shared; using Microsoft.Extensions.Configuration; using MeetUpPlanner.Functions; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpFunctions { @@ -32,8 +30,6 @@ public GetClientSettings(ILogger logger, IConfiguration confi /// /// [FunctionName(nameof(GetClientSettings))] - [OpenApiOperation(Summary = "Gets the active ClientSettings", Description = "Reading the ClientSettings should be done at the very beginning of the client application.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ClientSettings))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetContentWithChaptersItem.cs b/MeetUpFunctions/GetContentWithChaptersItem.cs index e814eca..4804070 100644 --- a/MeetUpFunctions/GetContentWithChaptersItem.cs +++ b/MeetUpFunctions/GetContentWithChaptersItem.cs @@ -1,16 +1,12 @@ using System; -using System.IO; -using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions diff --git a/MeetUpFunctions/GetExportLog.cs b/MeetUpFunctions/GetExportLog.cs index 90eb732..fefc1e3 100644 --- a/MeetUpFunctions/GetExportLog.cs +++ b/MeetUpFunctions/GetExportLog.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +6,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -29,9 +26,6 @@ public GetExportLog(ILogger logger, ServerSettingsRepository serve } [FunctionName("GetExportLog")] - [OpenApiOperation(Summary = "Returns all export log items", - Description = "Reading all ExportLogItems. To be able to read ExportLogItems the admin keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetExtendedCalendarItem.cs b/MeetUpFunctions/GetExtendedCalendarItem.cs index 3304397..eb1ba07 100644 --- a/MeetUpFunctions/GetExtendedCalendarItem.cs +++ b/MeetUpFunctions/GetExtendedCalendarItem.cs @@ -1,17 +1,13 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -37,9 +33,6 @@ public GetExtendedCalendarItem(ILogger logger, } [FunctionName("GetExtendedCalendarItem")] - [OpenApiOperation(Summary = "Gets the CalendarIitem with all referencing data", - Description = "Reading given CalendarItem To be able to read CalenderItems the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ExtendedCalendarItem))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetExtendedCalendarItem/{id}")] HttpRequest req, string id) { diff --git a/MeetUpFunctions/GetExtendedCalendarItems.cs b/MeetUpFunctions/GetExtendedCalendarItems.cs index 01a4520..7ad458b 100644 --- a/MeetUpFunctions/GetExtendedCalendarItems.cs +++ b/MeetUpFunctions/GetExtendedCalendarItems.cs @@ -7,11 +7,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -36,10 +34,6 @@ public GetExtendedCalendarItems(ILogger logger, Server } [FunctionName("GetExtendedCalendarItems")] - [OpenApiOperation(Summary = "Gets the relevant ExtendedCalendarItems", - Description = "Reading current ExtendedCalendarItems (CalendarItem including correpondent participants and comments) starting in the future or the configured past (in hours). To be able to read CalenderItems the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] - [OpenApiParameter("privatekeywords", Description = "Holds a list of private keywords, separated by ;")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetExtendedCalendarItemsForDate.cs b/MeetUpFunctions/GetExtendedCalendarItemsForDate.cs index 77413e5..29bcaf8 100644 --- a/MeetUpFunctions/GetExtendedCalendarItemsForDate.cs +++ b/MeetUpFunctions/GetExtendedCalendarItemsForDate.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +6,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -36,10 +33,6 @@ public GetExtendedCalendarItemsForDate(ILogger logger, } [FunctionName("GetExtendedCalendarItemsForDate")] - [OpenApiOperation(Summary = "Gets the ExtendedCalendarIitems for the given date", - Description = "Reading current ExtendedCalendarItems (CalendarItem including correpondent participants and comments) for the given date. To be able to read CalenderItems the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] - [OpenApiParameter("privatekeywords", Description = "Holds a list of private keywords, separated by ;")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetExtendedInfoItem.cs b/MeetUpFunctions/GetExtendedInfoItem.cs index c9ab793..e38e3f0 100644 --- a/MeetUpFunctions/GetExtendedInfoItem.cs +++ b/MeetUpFunctions/GetExtendedInfoItem.cs @@ -1,17 +1,13 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -34,9 +30,6 @@ public GetExtendedInfoItem(ILogger logger, } [FunctionName("GetExtendedInfoItem")] - [OpenApiOperation(Summary = "Gets the InfoUtem with all referencing data", - Description = "Reading given InfoItem. To be able to read InfoItem the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ExtendedInfoItem))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetExtendedInfoItem/{id}")] HttpRequest req, string id) { diff --git a/MeetUpFunctions/GetExtendedInfoItems.cs b/MeetUpFunctions/GetExtendedInfoItems.cs index 9e42c63..73ecccb 100644 --- a/MeetUpFunctions/GetExtendedInfoItems.cs +++ b/MeetUpFunctions/GetExtendedInfoItems.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +6,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -33,9 +30,6 @@ public GetExtendedInfoItems(ILogger logger, ServerSettings } [FunctionName("GetExtendedInfoItems")] - [OpenApiOperation(Summary = "Gets the relevant ExtendedInfoItems", - Description = "Reading current ExtendedCalendarItems (InfoItem including correpondent comments). To be able to read InfoItems the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetInfoItem.cs b/MeetUpFunctions/GetInfoItem.cs index f9e5cf3..a09325c 100644 --- a/MeetUpFunctions/GetInfoItem.cs +++ b/MeetUpFunctions/GetInfoItem.cs @@ -1,16 +1,12 @@ using System; -using System.IO; -using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -29,10 +25,6 @@ public GetInfoItem(ILogger logger, ServerSettingsRepository serverS } [FunctionName("GetInfoItem")] - [OpenApiOperation(Summary = "Gets the InfoItem by the given itemId", - Description = "Reading a InfoItem by id. To be able to read a InfoItem the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(InfoItem))] - [OpenApiParameter("id", Description = "Id of InfoItem to read.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetInfoItem/{id}")] HttpRequest req, string id) diff --git a/MeetUpFunctions/GetLinkPreview.cs b/MeetUpFunctions/GetLinkPreview.cs index 3ac0633..706e361 100644 --- a/MeetUpFunctions/GetLinkPreview.cs +++ b/MeetUpFunctions/GetLinkPreview.cs @@ -10,7 +10,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MSiccDev.Libs.LinkTools.LinkPreview; using MeetUpPlanner.Shared; @@ -31,10 +30,6 @@ public GetLinkPreview(ILogger logger, ServerSettingsRepository s [FunctionName("GetLinkPreview")] - [OpenApiOperation(Summary = "Gets the LinkPreview for given URL", - Description = "Retrieves the link preview infos.")] - [OpenApiRequestBody("application/json", typeof(LinkPreview), Description = "LinkPreview with url to be evaluated.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(LinkPreview))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetMeetingPlace.cs b/MeetUpFunctions/GetMeetingPlace.cs index ab3b6b0..4ef6280 100644 --- a/MeetUpFunctions/GetMeetingPlace.cs +++ b/MeetUpFunctions/GetMeetingPlace.cs @@ -1,17 +1,12 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -30,10 +25,6 @@ public GetMeetingPlace(ILogger logger, ServerSettingsRepository } [FunctionName("GetMeetingPlace")] - [OpenApiOperation(Summary = "Gets a MeetingPlace", - Description = "Reading meeting place for editing. To be able to read MeetingPlace the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(MeetingPlace))] - [OpenApiParameter("id", Description = "Id of CalendarItem to read.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetMeetingPlace/{id}")] HttpRequest req, string id) { diff --git a/MeetUpFunctions/GetMeetingPlaces.cs b/MeetUpFunctions/GetMeetingPlaces.cs index 8411bad..565fda9 100644 --- a/MeetUpFunctions/GetMeetingPlaces.cs +++ b/MeetUpFunctions/GetMeetingPlaces.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +6,8 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -30,9 +26,6 @@ public GetMeetingPlaces(ILogger logger, ServerSettingsReposito } [FunctionName("GetMeetingPlaces")] - [OpenApiOperation(Summary = "Gets all MeetingPlaces", - Description = "Reading all preconfigured meeting places. To be able to read InfoItems the user keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetNotificationSubscriptions.cs b/MeetUpFunctions/GetNotificationSubscriptions.cs index 0636b04..f380c95 100644 --- a/MeetUpFunctions/GetNotificationSubscriptions.cs +++ b/MeetUpFunctions/GetNotificationSubscriptions.cs @@ -1,5 +1,3 @@ -using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +5,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; -using System.Web.Http; -using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -27,9 +21,6 @@ public GetNotificationSubscriptions(ILogger logger } [FunctionName("GetNotificationSubscriptions")] - [OpenApiOperation(Summary = "Gets all active notification subscriptions", - Description = "Reading all notification subscriptions currently stored..")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetScopedCalendarItems.cs b/MeetUpFunctions/GetScopedCalendarItems.cs index ccd651d..d4435fd 100644 --- a/MeetUpFunctions/GetScopedCalendarItems.cs +++ b/MeetUpFunctions/GetScopedCalendarItems.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -7,11 +6,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using System.Collections.Generic; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; using System.Linq; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -36,9 +33,6 @@ public GetScopedCalendarItems(ILogger logger, ServerSett } [FunctionName("GetScopedCalendarItems")] - [OpenApiOperation(Summary = "Gets the ExtendedCalendarIitems for the given guest scope", - Description = "Reading current ExtendedCalendarItems (CalendarItem including correpondent participants and comments) for the given scope.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(IEnumerable))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetServerSettings.cs b/MeetUpFunctions/GetServerSettings.cs index 6a2b79b..3711d0d 100644 --- a/MeetUpFunctions/GetServerSettings.cs +++ b/MeetUpFunctions/GetServerSettings.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -9,7 +8,6 @@ using Microsoft.Extensions.Configuration; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions { @@ -34,9 +32,6 @@ public GetServerSettings(ILogger logger, IConfiguration confi /// /// [FunctionName("GetServerSettings")] - [OpenApiOperation(Summary = "Gets the active ServerSettings", - Description = "Reading the ServerSettings is only needed for editing for administrators. To be able to read ServerSettings the admin keyword must be set as header x-meetup-keyword.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ServerSettings))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetTenantClientSettings.cs b/MeetUpFunctions/GetTenantClientSettings.cs index 7cd89bb..713788b 100644 --- a/MeetUpFunctions/GetTenantClientSettings.cs +++ b/MeetUpFunctions/GetTenantClientSettings.cs @@ -1,5 +1,4 @@ using System; -using System.IO; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; @@ -8,8 +7,6 @@ using Microsoft.Extensions.Logging; using MeetUpPlanner.Shared; using Microsoft.Extensions.Configuration; -using MeetUpPlanner.Functions; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using System.Web.Http; @@ -39,8 +36,6 @@ public GetTenantClientSettings(ILogger logger, /// /// [FunctionName(nameof(GetTenantClientSettings))] - [OpenApiOperation(Summary = "Gets the active combination of TenantSettings/ClientSettings", Description = "Reading TenantSettings and ClientSettings should be done at the very beginning of the client application.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ClientSettings))] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/GetWebcalToken.cs b/MeetUpFunctions/GetWebcalToken.cs index 97235c3..a1de2d1 100644 --- a/MeetUpFunctions/GetWebcalToken.cs +++ b/MeetUpFunctions/GetWebcalToken.cs @@ -1,13 +1,10 @@ using System; -using System.IO; -using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; diff --git a/MeetUpFunctions/MeetUpPlanner.Functions.csproj b/MeetUpFunctions/MeetUpPlanner.Functions.csproj index 605cfe0..5942071 100644 --- a/MeetUpFunctions/MeetUpPlanner.Functions.csproj +++ b/MeetUpFunctions/MeetUpPlanner.Functions.csproj @@ -5,11 +5,10 @@ 43fef60c-ead0-476a-956f-0c7a3c479b26 - - - + + - + @@ -17,6 +16,8 @@ + + diff --git a/MeetUpFunctions/NotificationSubscriptionRepository.cs b/MeetUpFunctions/NotificationSubscriptionRepository.cs index e87aafc..ada3a45 100644 --- a/MeetUpFunctions/NotificationSubscriptionRepository.cs +++ b/MeetUpFunctions/NotificationSubscriptionRepository.cs @@ -1,17 +1,12 @@ using System; using System.Collections.Generic; -using System.Text; using System.Text.Json; using MeetUpPlanner.Shared; using Microsoft.Extensions.Configuration; -using Microsoft.Azure.Cosmos; using System.Threading.Tasks; using WebPush; using System.Linq; using Microsoft.Extensions.Logging; -using System.Security.Policy; -using System.Text.Encodings.Web; -using System.Runtime.CompilerServices; namespace MeetUpPlanner.Functions { diff --git a/MeetUpFunctions/RemoveCommentFromCalendarItem.cs b/MeetUpFunctions/RemoveCommentFromCalendarItem.cs index 6286d09..6f89b64 100644 --- a/MeetUpFunctions/RemoveCommentFromCalendarItem.cs +++ b/MeetUpFunctions/RemoveCommentFromCalendarItem.cs @@ -8,9 +8,7 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; -using System.Collections.Generic; namespace MeetUpPlanner.Functions { @@ -30,10 +28,6 @@ CosmosDBRepository cosmosRepository } [FunctionName("RemoveCommentFromCalendarItem")] - [OpenApiOperation(Summary = "Removes a comment from CalendarItem by the given comment id.", - Description = "Every comment has a unique id that is used to delete it.")] - [OpenApiRequestBody("application/json", typeof(Participant), Description = "CalendarComment to be removed.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/RemoveFederation.cs b/MeetUpFunctions/RemoveFederation.cs index 61a0982..92e6b75 100644 --- a/MeetUpFunctions/RemoveFederation.cs +++ b/MeetUpFunctions/RemoveFederation.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions diff --git a/MeetUpFunctions/RemoveParticipantFromCalendarItem.cs b/MeetUpFunctions/RemoveParticipantFromCalendarItem.cs index 5cb6aa7..b437441 100644 --- a/MeetUpFunctions/RemoveParticipantFromCalendarItem.cs +++ b/MeetUpFunctions/RemoveParticipantFromCalendarItem.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; using MeetUpPlanner.Shared; using System.Collections.Generic; @@ -37,10 +36,6 @@ CosmosDBRepository cosmosRepository } [FunctionName("RemoveParticipantFromCalendarItem")] - [OpenApiOperation(Summary = "Removes a participant from the CalendarItem by the given participant id.", - Description = "Every participant has a unique id that is used to delete it.")] - [OpenApiRequestBody("application/json", typeof(Participant), Description = "Participant to be removed.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(BackendResult), Description = "Status of operation.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/Version.cs b/MeetUpFunctions/Version.cs index 9654de7..5474583 100644 --- a/MeetUpFunctions/Version.cs +++ b/MeetUpFunctions/Version.cs @@ -6,9 +6,7 @@ using Microsoft.Azure.WebJobs.Extensions.Http; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using MeetUpPlanner.Functions; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpFunctions @@ -18,7 +16,6 @@ public static class Version const string functionsVersion = Constants.VERSION; [FunctionName("GetVersion")] - [OpenApiOperation(Summary = "Gets the version of Azure Functions", Description = "Returns the current version of Azure Functions.")] public static async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", Route = null)] HttpRequest req, ILogger log) diff --git a/MeetUpFunctions/WriteCalendarItem.cs b/MeetUpFunctions/WriteCalendarItem.cs index 6fa9744..797e377 100644 --- a/MeetUpFunctions/WriteCalendarItem.cs +++ b/MeetUpFunctions/WriteCalendarItem.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -41,10 +40,6 @@ public WriteCalendarItem(ILogger logger, /// /// [FunctionName("WriteCalendarItem")] - [OpenApiOperation(Summary = "Writes a new or updated CalendarItem to database.", - Description = "If the CalendarItem already exists (same id) it it overwritten.")] - [OpenApiRequestBody("application/json", typeof(CalendarItem), Description = "New CalendarItem to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(CalendarItem), Description = "New CalendarItem as written to database.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/WriteClientSettings.cs b/MeetUpFunctions/WriteClientSettings.cs index 1c423e5..15d02b5 100644 --- a/MeetUpFunctions/WriteClientSettings.cs +++ b/MeetUpFunctions/WriteClientSettings.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -35,10 +34,6 @@ public WriteClientSettings(ILogger logger, ServerSettingsRe /// /// [FunctionName(nameof(WriteClientSettings))] - [OpenApiOperation(Summary = "Writes new ClientSettings to database.", - Description = "Only needed if the ClientSettings has been changed. To be able to write ClientSettings the admin keyword must be set as header x-meetup-keyword.")] - [OpenApiRequestBody("application/json", typeof(ServerSettings), Description = "New ClientSettings to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ServerSettings), Description = "New ClientSettings as written to database.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req, ILogger log) diff --git a/MeetUpFunctions/WriteContentWithChaptersItem.cs b/MeetUpFunctions/WriteContentWithChaptersItem.cs index 47a4ca9..29e0e60 100644 --- a/MeetUpFunctions/WriteContentWithChaptersItem.cs +++ b/MeetUpFunctions/WriteContentWithChaptersItem.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions diff --git a/MeetUpFunctions/WriteInfoItem.cs b/MeetUpFunctions/WriteInfoItem.cs index bfbb8e2..6a1748e 100644 --- a/MeetUpFunctions/WriteInfoItem.cs +++ b/MeetUpFunctions/WriteInfoItem.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -33,10 +32,6 @@ public WriteInfoItem(ILogger logger, ServerSettingsRepository ser /// /// [FunctionName("WriteInfoItem")] - [OpenApiOperation(Summary = "Writes a new or updated InfoItem to database.", - Description = "If the InfoItem already exists (same id) it is overwritten.")] - [OpenApiRequestBody("application/json", typeof(InfoItem), Description = "New InfoItem to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(InfoItem), Description = "New InfoItem as written to database.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/WriteMeetingPlace.cs b/MeetUpFunctions/WriteMeetingPlace.cs index 8656a3a..a7a95c4 100644 --- a/MeetUpFunctions/WriteMeetingPlace.cs +++ b/MeetUpFunctions/WriteMeetingPlace.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -33,10 +32,6 @@ public WriteMeetingPlace(ILogger logger, ServerSettingsReposi /// /// [FunctionName("WriteMeetingPlace")] - [OpenApiOperation(Summary = "Writes a new or updated MeetingPlace to database.", - Description = "If the MeetingPlace already exists (same id) it is overwritten.")] - [OpenApiRequestBody("application/json", typeof(InfoItem), Description = "New MeetingPlace to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(InfoItem), Description = "New MeetingPlace as written to database.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/WriteNotificationSubscription.cs b/MeetUpFunctions/WriteNotificationSubscription.cs index 8682dc8..92956ed 100644 --- a/MeetUpFunctions/WriteNotificationSubscription.cs +++ b/MeetUpFunctions/WriteNotificationSubscription.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -33,10 +32,6 @@ public WriteNotificationSubscription(ILogger logg /// /// [FunctionName("WriteNotificationSubscription")] - [OpenApiOperation(Summary = "Writes a new or updated NotificationSubscription to database.", - Description = "If the NotificationSubscription already exists (same tenant + url) it it overwritten.")] - [OpenApiRequestBody("application/json", typeof(NotificationSubscription), Description = "New NotificationSubscription to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(NotificationSubscription), Description = "New NotificationSubscription as to be written to database.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpFunctions/WriteServerSettings.cs b/MeetUpFunctions/WriteServerSettings.cs index fbfa56c..dc6ff76 100644 --- a/MeetUpFunctions/WriteServerSettings.cs +++ b/MeetUpFunctions/WriteServerSettings.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using MeetUpPlanner.Shared; using System.Web.Http; -using Aliencube.AzureFunctions.Extensions.OpenApi.Core.Attributes; namespace MeetUpPlanner.Functions @@ -35,10 +34,6 @@ public WriteServerSettings(ILogger logger, ServerSettingsRe /// /// [FunctionName("WriteServerSettings")] - [OpenApiOperation(Summary = "Writes new ServerSettings to database.", - Description = "Only needed if the ServerSettings has been changed.")] - [OpenApiRequestBody("application/json", typeof(ServerSettings), Description = "New ServerSettings to be written.")] - [OpenApiResponseWithBody(System.Net.HttpStatusCode.OK, "application/json", typeof(ServerSettings), Description = "New ServerSettings as written to database.")] public async Task Run( [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req) { diff --git a/MeetUpPlanner/Client/MeetUpPlanner.Client.csproj b/MeetUpPlanner/Client/MeetUpPlanner.Client.csproj index d9907bf..537c7a4 100644 --- a/MeetUpPlanner/Client/MeetUpPlanner.Client.csproj +++ b/MeetUpPlanner/Client/MeetUpPlanner.Client.csproj @@ -6,16 +6,16 @@ - + - - - - - + + + + + diff --git a/MeetUpPlanner/Client/Pages/About.razor b/MeetUpPlanner/Client/Pages/About.razor index 3a26f2f..c41b44a 100644 --- a/MeetUpPlanner/Client/Pages/About.razor +++ b/MeetUpPlanner/Client/Pages/About.razor @@ -51,7 +51,7 @@ @code { - private const string clientVersion = "2023-09-16"; + private const string clientVersion = "2024-01-02"; private string serverVersion = "tbd"; private string functionsVersion = "tbd"; diff --git a/MeetUpPlanner/Client/Pages/Invite.razor b/MeetUpPlanner/Client/Pages/Invite.razor index 0420762..662a858 100644 --- a/MeetUpPlanner/Client/Pages/Invite.razor +++ b/MeetUpPlanner/Client/Pages/Invite.razor @@ -9,7 +9,7 @@ - +
@@ -17,23 +17,16 @@
-
-
- QRCode-Link -
-
@code { [Parameter] public string ItemId { get; set; } ExtendedCalendarItem meetup = new ExtendedCalendarItem(); - string _imageUrl; string _checkinUrl = ""; protected override async Task OnInitializedAsync() { _checkinUrl = $"{Http.BaseAddress}{ItemId}"; - _imageUrl = $"Util/qrcodeimage?link={_checkinUrl}"; if (null != AppStateStore && KeywordCheck.IsParticipant) { await ReadData(); diff --git a/MeetUpPlanner/Server/Controllers/UtilController.cs b/MeetUpPlanner/Server/Controllers/UtilController.cs index f10b9a4..fa5d799 100644 --- a/MeetUpPlanner/Server/Controllers/UtilController.cs +++ b/MeetUpPlanner/Server/Controllers/UtilController.cs @@ -5,9 +5,9 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using System.Drawing; -using System.IO; -using QRCoder; +//using System.Drawing; +//using System.IO; +//using QRCoder; using MeetUpPlanner.Server.Repositories; using MeetUpPlanner.Shared; @@ -20,7 +20,7 @@ public class UtilController : ControllerBase { private readonly MeetUpFunctions _meetUpFunctions; private readonly ILogger logger; - const string serverVersion = "2023-09-16"; + const string serverVersion = "2024-01-02"; string functionsVersion = "tbd"; public UtilController(ILogger logger, MeetUpFunctions meetUpFunctions) @@ -107,37 +107,37 @@ public async Task WriteNotificationSubscription([FromHeader(Name public String GetQrCode([FromQuery] string link) { string imageUrl = ""; - QRCodeGenerator qrGenerator = new QRCodeGenerator(); - QRCodeData qrCodeData = qrGenerator.CreateQrCode(link, QRCodeGenerator.ECCLevel.Q); - QRCode qrCode = new QRCode(qrCodeData); + //QRCodeGenerator qrGenerator = new QRCodeGenerator(); + //QRCodeData qrCodeData = qrGenerator.CreateQrCode(link, QRCodeGenerator.ECCLevel.Q); + //QRCode qrCode = new QRCode(qrCodeData); - using (Bitmap bitMap = qrCode.GetGraphic(20)) - { - using (MemoryStream ms = new MemoryStream()) - { - bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); - byte[] byteImage = ms.ToArray(); - imageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage); - } - } + //using (Bitmap bitMap = qrCode.GetGraphic(20)) + //{ + // using (MemoryStream ms = new MemoryStream()) + // { + // bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); + // byte[] byteImage = ms.ToArray(); + // imageUrl = "data:image/png;base64," + Convert.ToBase64String(byteImage); + // } + //} return imageUrl; } [HttpGet("qrcodeimage")] public IActionResult GetQrCodeImage([FromQuery] string link) { - QRCodeGenerator qrGenerator = new QRCodeGenerator(); - QRCodeData qrCodeData = qrGenerator.CreateQrCode(link, QRCodeGenerator.ECCLevel.Q); - QRCode qrCode = new QRCode(qrCodeData); - byte[] byteImage; + byte[] byteImage = new byte[] { 0 }; + //QRCodeGenerator qrGenerator = new QRCodeGenerator(); + //QRCodeData qrCodeData = qrGenerator.CreateQrCode(link, QRCodeGenerator.ECCLevel.Q); + //QRCode qrCode = new QRCode(qrCodeData); - using (Bitmap bitMap = qrCode.GetGraphic(20)) - { - using (MemoryStream ms = new MemoryStream()) - { - bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); - byteImage = ms.ToArray(); - } - } + //using (Bitmap bitMap = qrCode.GetGraphic(20)) + //{ + // using (MemoryStream ms = new MemoryStream()) + // { + // bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Png); + // byteImage = ms.ToArray(); + // } + //} return File(byteImage, "image/png"); } [HttpPost("getlinkpreview")] diff --git a/MeetUpPlanner/Server/Controllers/WinterpokalController.cs b/MeetUpPlanner/Server/Controllers/WinterpokalController.cs index acda8c6..9407a08 100644 --- a/MeetUpPlanner/Server/Controllers/WinterpokalController.cs +++ b/MeetUpPlanner/Server/Controllers/WinterpokalController.cs @@ -32,7 +32,7 @@ public async Task GetTeam([FromRoute] string teamId) dynamic response = await $"{_winterpokalConfig.ApiEndpoint}/api/v1/teams/get/{teamId}.json" .WithHeader("api-token", _winterpokalConfig.ApiKey) - .GetJsonAsync(); + .GetJsonAsync(); WinterpokalTeam team = new WinterpokalTeam() { Id = Convert.ToInt64(teamId) diff --git a/MeetUpPlanner/Server/MeetUpPlanner.Server.csproj b/MeetUpPlanner/Server/MeetUpPlanner.Server.csproj index f2c9f00..483787f 100644 --- a/MeetUpPlanner/Server/MeetUpPlanner.Server.csproj +++ b/MeetUpPlanner/Server/MeetUpPlanner.Server.csproj @@ -6,12 +6,11 @@ - - + + - - - + + diff --git a/MeetUpPlanner/Shared/MeetUpPlanner.Shared.csproj b/MeetUpPlanner/Shared/MeetUpPlanner.Shared.csproj index aa1e131..151ff75 100644 --- a/MeetUpPlanner/Shared/MeetUpPlanner.Shared.csproj +++ b/MeetUpPlanner/Shared/MeetUpPlanner.Shared.csproj @@ -6,7 +6,7 @@ - +