Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark Correspondence client and responses as Experimental #1059

Merged
merged 5 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Altinn.App.Core/Altinn.App.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Description>
This class library holds all the core features used by a standard Altinn 3 App.
</Description>
<NoWarn>Correspondence001</NoWarn>
martinothamar marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
Expand All @@ -18,7 +19,7 @@
<PackageReference Include="Altinn.Platform.Storage.Interface" Version="4.0.4" />
<PackageReference Include="JsonPatch.Net" Version="3.2.3" />
<PackageReference Include="JWTCookieAuthentication" Version="3.0.1" />
<!-- The follwoing are depencencies for JWTCookieAuthentication, but we need newer versions-->
<!-- The following are depencencies for JWTCookieAuthentication, but we need newer versions-->
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.3.0"
/>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.24" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Net.Http.Headers;
using System.Text.Json;
Expand All @@ -16,6 +17,7 @@
namespace Altinn.App.Core.Features.Correspondence;

/// <inheritdoc />
[Experimental("Correspondence001")]
internal sealed class CorrespondenceClient : ICorrespondenceClient
{
private readonly ILogger<CorrespondenceClient> _logger;
Expand All @@ -41,6 +43,7 @@ public CorrespondenceClient(
}

/// <inheritdoc />
[Experimental(diagnosticId: "Correspondence001")]
public async Task<SendCorrespondenceResponse> Send(
SendCorrespondencePayload payload,
CancellationToken cancellationToken = default
Expand Down Expand Up @@ -90,6 +93,7 @@ public async Task<SendCorrespondenceResponse> Send(
}

/// <inheritdoc/>
[Experimental(diagnosticId: "Correspondence001")]
public async Task<GetCorrespondenceStatusResponse> GetStatus(
GetCorrespondenceStatusPayload payload,
CancellationToken cancellationToken = default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Altinn.App.Core.Features.Correspondence.Models;

namespace Altinn.App.Core.Features.Correspondence;
Expand All @@ -6,6 +7,7 @@ namespace Altinn.App.Core.Features.Correspondence;
/// <p>Contains logic for interacting with the correspondence message service.</p>
/// <p>The use of this client requires Maskinporten scopes <c>altinn:correspondence.write</c> and <c>altinn:serviceowner</c>.</p>
/// </summary>
[Experimental(diagnosticId: "Correspondence001")]
public interface ICorrespondenceClient
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Altinn.App.Core.Models;

Expand All @@ -6,6 +7,7 @@ namespace Altinn.App.Core.Features.Correspondence.Models;
/// <summary>
/// Response after a successful <see cref="CorrespondenceClient.GetStatus"/> request.
/// </summary>
[Experimental(diagnosticId: "Correspondence001")]
public sealed record GetCorrespondenceStatusResponse
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace Altinn.App.Core.Features.Correspondence.Models;

/// <summary>
/// Response after a successful <see cref="CorrespondenceClient.Send"/> request.
/// </summary>
[Experimental(diagnosticId: "Correspondence001")]
public sealed record SendCorrespondenceResponse
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion test/Altinn.App.Core.Tests/Altinn.App.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<NoWarn>$(NoWarn);CS1591;CS0618</NoWarn>
<NoWarn>$(NoWarn);CS1591;CS0618;Correspondence001</NoWarn>
<!--
CS1591: Don't warn for missing XML doc
CS0618: This is a test project, so we usually continue testing [Obsolete] apis
Expand Down
Loading