diff --git a/Altinn.Profile.sln b/Altinn.Profile.sln
index c418625..a74d7ef 100644
--- a/Altinn.Profile.sln
+++ b/Altinn.Profile.sln
@@ -17,7 +17,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution
README.md = README.md
EndProjectSection
EndProject
-
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0CCDE9AB-15C9-4B1C-97A8-21F49262BDE3}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{00F4FF62-D447-4DE4-902D-CB1FB98FBECF}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -28,10 +31,6 @@ Global
{D32C4EE9-E827-467A-B116-8EF0BA08A11F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D32C4EE9-E827-467A-B116-8EF0BA08A11F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D32C4EE9-E827-467A-B116-8EF0BA08A11F}.Release|Any CPU.Build.0 = Release|Any CPU
- {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Release|Any CPU.Build.0 = Release|Any CPU
{46B6764A-0DCF-47E6-86B8-09A1CFC3CF80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46B6764A-0DCF-47E6-86B8-09A1CFC3CF80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46B6764A-0DCF-47E6-86B8-09A1CFC3CF80}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -40,10 +39,20 @@ Global
{8DF9A6F4-AF02-4B36-B199-78883FC51631}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8DF9A6F4-AF02-4B36-B199-78883FC51631}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8DF9A6F4-AF02-4B36-B199-78883FC51631}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {D32C4EE9-E827-467A-B116-8EF0BA08A11F} = {0CCDE9AB-15C9-4B1C-97A8-21F49262BDE3}
+ {46B6764A-0DCF-47E6-86B8-09A1CFC3CF80} = {0CCDE9AB-15C9-4B1C-97A8-21F49262BDE3}
+ {8DF9A6F4-AF02-4B36-B199-78883FC51631} = {0CCDE9AB-15C9-4B1C-97A8-21F49262BDE3}
+ {85BF7FD9-90C1-4A4E-BDCC-F89F0BA65218} = {00F4FF62-D447-4DE4-902D-CB1FB98FBECF}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0BE3D36E-14FA-4A8E-A968-DE322F5A381E}
EndGlobalSection
diff --git a/README.md b/README.md
index 3cd1eef..5d34067 100644
--- a/README.md
+++ b/README.md
@@ -56,15 +56,15 @@ cd altinn-profile
- Start Altinn Profile docker container run the command
- ```cmd
- podman compose up -d --build
- ```
+```cmd
+podman compose up -d --build
+```
- To stop the container running Altinn Profile run the command
- ```cmd
- podman stop altinn-profile
- ```
+```cmd
+podman stop altinn-profile
+```
### Running the application with .NET
@@ -73,10 +73,10 @@ The Profile components can be run locally when developing/debugging. Follow the
- Navigate to _src/Profile, and build and run the code from there, or run the solution using you selected code editor
- ```cmd
- cd src/Profile
- dotnet run
- ```
+```cmd
+cd src/Profile
+dotnet run
+```
The profile solution is now available locally at http://localhost:5030/.
To access swagger use http://localhost:5030/swagger.
diff --git a/src/Altinn.Profile.Core/Altinn.Profile.Core.csproj b/src/Altinn.Profile.Core/Altinn.Profile.Core.csproj
index fb99ea9..e0706fd 100644
--- a/src/Altinn.Profile.Core/Altinn.Profile.Core.csproj
+++ b/src/Altinn.Profile.Core/Altinn.Profile.Core.csproj
@@ -4,6 +4,7 @@
net8.0
enable
enable
+ true
{7BA8E238-C930-45C0-BB5D-28AE4D89669B}
diff --git a/src/Altinn.Profile.Integrations/Altinn.Profile.Integrations.csproj b/src/Altinn.Profile.Integrations/Altinn.Profile.Integrations.csproj
index abdd68a..0468954 100644
--- a/src/Altinn.Profile.Integrations/Altinn.Profile.Integrations.csproj
+++ b/src/Altinn.Profile.Integrations/Altinn.Profile.Integrations.csproj
@@ -4,6 +4,7 @@
net8.0
enable
enable
+ true
diff --git a/src/Altinn.Profile.Integrations/SblBridge/UnitProfileClient.cs b/src/Altinn.Profile.Integrations/SblBridge/UnitProfileClient.cs
index a8d77cb..9a8f3ed 100644
--- a/src/Altinn.Profile.Integrations/SblBridge/UnitProfileClient.cs
+++ b/src/Altinn.Profile.Integrations/SblBridge/UnitProfileClient.cs
@@ -12,7 +12,7 @@
namespace Altinn.Profile.Integrations.SblBridge;
///
-/// Represents an implementation of using SBLBridge to obtain unit profile information.
+/// Represents an implementation of using SBLBridge to obtain unit profile information.
///
public class UnitProfileClient : IUnitProfileClient
{
diff --git a/src/Altinn.Profile.Integrations/SblBridge/UserProfileClient.cs b/src/Altinn.Profile.Integrations/SblBridge/UserProfileClient.cs
index 0d3ec7b..46d846d 100644
--- a/src/Altinn.Profile.Integrations/SblBridge/UserProfileClient.cs
+++ b/src/Altinn.Profile.Integrations/SblBridge/UserProfileClient.cs
@@ -13,7 +13,7 @@
namespace Altinn.Profile.Integrations.SblBridge;
///
-/// Represents an implementation of using SBLBridge to obtain profile information.
+/// Represents an implementation of using SBLBridge to obtain profile information.
///
public class UserProfileClient : IUserProfileClient
{
@@ -73,7 +73,7 @@ public async Task> GetUser(string ssn)
if (!response.IsSuccessStatusCode)
{
- _logger.LogError("Getting user by SSN failed with statuscode {statusCode}", response.StatusCode);
+ _logger.LogError("Getting user by SSN failed with statuscode {StatusCode}", response.StatusCode);
return false;
}
@@ -92,7 +92,7 @@ public async Task> GetUserByUuid(Guid userUuid)
if (!response.IsSuccessStatusCode)
{
- _logger.LogError("Getting user {userUuid} failed with {statusCode}", userUuid, response.StatusCode);
+ _logger.LogError("Getting user {userUuid} failed with {StatusCode}", userUuid, response.StatusCode);
return false;
}
@@ -112,7 +112,7 @@ public async Task, bool>> GetUserListByUuid(List
if (!response.IsSuccessStatusCode)
{
- _logger.LogError("Getting users failed with {statusCode}", response.StatusCode);
+ _logger.LogError("Getting users failed with {StatusCode}", response.StatusCode);
return false;
}
@@ -131,7 +131,7 @@ public async Task> GetUserByUsername(string username)
if (!response.IsSuccessStatusCode)
{
- _logger.LogError("Getting user {username} failed with {statusCode}", HttpUtility.HtmlEncode(username), response.StatusCode);
+ _logger.LogError("Getting user {Username} failed with {StatusCode}", HttpUtility.HtmlEncode(username), response.StatusCode);
return false;
}
diff --git a/src/Altinn.Profile/Properties/launchSettings.json b/src/Altinn.Profile/Properties/launchSettings.json
index 546ebf6..e7c51d8 100644
--- a/src/Altinn.Profile/Properties/launchSettings.json
+++ b/src/Altinn.Profile/Properties/launchSettings.json
@@ -1,26 +1,10 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:58874",
- "sslPort": 44339
- }
- },
"profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "profile/swagger",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
"Altinn.Profile": {
"commandName": "Project",
"launchBrowser": true,
- "launchUrl": "profile/swagger",
+ "launchUrl": "swagger",
"applicationUrl": "http://localhost:5030",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
diff --git a/stylecop.json b/stylecop.json
index 4eef0f1..f712646 100644
--- a/stylecop.json
+++ b/stylecop.json
@@ -1,10 +1,4 @@
{
- // ACTION REQUIRED: This file was automatically added to your project, but it
- // will not take effect until additional steps are taken to enable it. See the
- // following page for additional information:
- //
- // https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/EnableConfiguration.md
-
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
@@ -14,56 +8,6 @@
"usingDirectivesPlacement": "outsideNamespace",
"systemUsingDirectivesFirst": true,
"blankLinesBetweenUsingGroups": "allow"
- },
- "namingRules": {
- "allowCommonHungarianPrefixes": true,
- "allowedHungarianPrefixes": [
- "as",
- "d",
- "db",
- "dn",
- "do",
- "dr",
- "ds",
- "dt",
- "e",
- "e2",
- "er",
- "f",
- "fs",
- "go",
- "id",
- "if",
- "in",
- "ip",
- "is",
- "js",
- "li",
- "my",
- "no",
- "ns",
- "on",
- "or",
- "pi",
- "pv",
- "sa",
- "sb",
- "se",
- "si",
- "so",
- "sp",
- "tc",
- "to",
- "tr",
- "ui",
- "un",
- "wf",
- "ws",
- "x",
- "y",
- "j",
- "js"
- ]
}
}
}
diff --git a/test/Altinn.Profile.Tests/Altinn.Profile.Tests.csproj b/test/Altinn.Profile.Tests/Altinn.Profile.Tests.csproj
index 0f4e25a..5ce23a0 100644
--- a/test/Altinn.Profile.Tests/Altinn.Profile.Tests.csproj
+++ b/test/Altinn.Profile.Tests/Altinn.Profile.Tests.csproj
@@ -2,7 +2,6 @@
net8.0
-
false
@@ -37,8 +36,7 @@
- true
- $(NoWarn);1591
+ $(NoWarn);SA0001;CS1591;SA1600
diff --git a/test/Altinn.Profile.Tests/GlobalSuppressions.cs b/test/Altinn.Profile.Tests/GlobalSuppressions.cs
deleted file mode 100644
index 51d4d2b..0000000
--- a/test/Altinn.Profile.Tests/GlobalSuppressions.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file is used by Code Analysis to maintain SuppressMessage
-// attributes that are applied to this project.
-// Project-level suppressions either have no target or are given
-// a specific target and scoped to a namespace, type, member, etc.
-
-using System.Diagnostics.CodeAnalysis;
-
-[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Test description should be in the name of the test.", Scope = "module")]