Skip to content

Commit

Permalink
Mark Correspondence client and responses as Experimental (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielskovli authored Jan 23, 2025
1 parent 91eb75c commit 319ef01
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
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>ALTINNAPP0200</NoWarn>
</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("ALTINNAPP0200")]
internal sealed class CorrespondenceClient : ICorrespondenceClient
{
private readonly ILogger<CorrespondenceClient> _logger;
Expand All @@ -41,6 +43,7 @@ public CorrespondenceClient(
}

/// <inheritdoc />
[Experimental(diagnosticId: "ALTINNAPP0200")]
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: "ALTINNAPP0200")]
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: "ALTINNAPP0200")]
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: "ALTINNAPP0200")]
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: "ALTINNAPP0200")]
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;ALTINNAPP0200</NoWarn>
<!--
CS1591: Don't warn for missing XML doc
CS0618: This is a test project, so we usually continue testing [Obsolete] apis
Expand Down

0 comments on commit 319ef01

Please sign in to comment.