diff --git a/src/ApiTester/ApiTester.csproj b/src/ApiTester/ApiTester.csproj index e7dcde5..e45571e 100644 --- a/src/ApiTester/ApiTester.csproj +++ b/src/ApiTester/ApiTester.csproj @@ -2,10 +2,10 @@ Exe - net6.0 + netcoreapp3.1;net6.0;net8.0 enable enable - 40d4c3dd-1286-4dad-afd8-2d1de12ef270 + $(MSBuildProjectName) diff --git a/src/ApiTester/Program.cs b/src/ApiTester/Program.cs index dea2e07..3ab7129 100644 --- a/src/ApiTester/Program.cs +++ b/src/ApiTester/Program.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; +using System.Net; using Veracode.ApiClients.ApplicationsApi; using Veracode.ApiClients.Helper; using Veracode.ApiClients.IdentityApi; @@ -29,6 +30,8 @@ static void Main(string[] args) .AddUserSecrets() .Build(); + HttpClient.DefaultProxy = new WebProxy("http://localhost:10082"); + GetUsers(); GetApplications(); @@ -47,10 +50,13 @@ static void GetUsers() var serviceProvider = services.BuildServiceProvider(); var client = serviceProvider.GetRequiredService(); - var response = client.GetUserApiCredsUsingGET(); - var result = response; + var users = client.GetUserApiCredsUsingGET(); Console.WriteLine("Users"); - Console.WriteLine(JsonConvert.SerializeObject(result, Formatting.Indented)); + Console.WriteLine(JsonConvert.SerializeObject(users, Formatting.Indented)); + + var teams = client.GetTeamsUsingGET(); + Console.WriteLine("Teams"); + Console.WriteLine(JsonConvert.SerializeObject(teams, Formatting.Indented)); } static void GetApplications() @@ -64,7 +70,7 @@ static void GetApplications() var serviceProvider = services.BuildServiceProvider(); var client = serviceProvider.GetRequiredService(); - var response = client.GetApplicationsUsingGET(team: "Veracity-Maritime-OVD"); + var response = client.GetApplicationsUsingGET(team: "Veracity-OVD"); var result = response._embedded.Applications.Select(a => new { AppId = a.Id, diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e7dbd38..15d6187 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,6 @@  - netstandard2.0 Latest 1.0.1 diff --git a/src/Veracode.ApiClients.ApplicationsApi/Veracode.ApiClients.ApplicationsApi.csproj b/src/Veracode.ApiClients.ApplicationsApi/Veracode.ApiClients.ApplicationsApi.csproj index bef0383..76b62a2 100644 --- a/src/Veracode.ApiClients.ApplicationsApi/Veracode.ApiClients.ApplicationsApi.csproj +++ b/src/Veracode.ApiClients.ApplicationsApi/Veracode.ApiClients.ApplicationsApi.csproj @@ -1,2 +1,7 @@  + + + netstandard2.0 + + diff --git a/src/Veracode.ApiClients.DynamicFlawApi/Veracode.ApiClients.DynamicFlawApi.csproj b/src/Veracode.ApiClients.DynamicFlawApi/Veracode.ApiClients.DynamicFlawApi.csproj index bef0383..3ae7562 100644 --- a/src/Veracode.ApiClients.DynamicFlawApi/Veracode.ApiClients.DynamicFlawApi.csproj +++ b/src/Veracode.ApiClients.DynamicFlawApi/Veracode.ApiClients.DynamicFlawApi.csproj @@ -1,2 +1,7 @@  + + + netstandard2.0 + + diff --git a/src/Veracode.ApiClients.FindingsApi/Veracode.ApiClients.FindingsApi.csproj b/src/Veracode.ApiClients.FindingsApi/Veracode.ApiClients.FindingsApi.csproj index bef0383..3ae7562 100644 --- a/src/Veracode.ApiClients.FindingsApi/Veracode.ApiClients.FindingsApi.csproj +++ b/src/Veracode.ApiClients.FindingsApi/Veracode.ApiClients.FindingsApi.csproj @@ -1,2 +1,7 @@  + + + netstandard2.0 + + diff --git a/src/Veracode.ApiClients.IdentityApi/Veracode.ApiClients.IdentityApi.csproj b/src/Veracode.ApiClients.IdentityApi/Veracode.ApiClients.IdentityApi.csproj index dd0d697..3ae7562 100644 --- a/src/Veracode.ApiClients.IdentityApi/Veracode.ApiClients.IdentityApi.csproj +++ b/src/Veracode.ApiClients.IdentityApi/Veracode.ApiClients.IdentityApi.csproj @@ -4,8 +4,4 @@ netstandard2.0 - - - - diff --git a/src/Veracode.ApiClients.SCAAgentApi/Veracode.ApiClients.SCAAgentApi.csproj b/src/Veracode.ApiClients.SCAAgentApi/Veracode.ApiClients.SCAAgentApi.csproj index 2ef1a36..3ae7562 100644 --- a/src/Veracode.ApiClients.SCAAgentApi/Veracode.ApiClients.SCAAgentApi.csproj +++ b/src/Veracode.ApiClients.SCAAgentApi/Veracode.ApiClients.SCAAgentApi.csproj @@ -1 +1,7 @@ - + + + + netstandard2.0 + + + diff --git a/src/Veracode.ApiClients.SummaryReportApi/Veracode.ApiClients.SummaryReportApi.csproj b/src/Veracode.ApiClients.SummaryReportApi/Veracode.ApiClients.SummaryReportApi.csproj index bef0383..3ae7562 100644 --- a/src/Veracode.ApiClients.SummaryReportApi/Veracode.ApiClients.SummaryReportApi.csproj +++ b/src/Veracode.ApiClients.SummaryReportApi/Veracode.ApiClients.SummaryReportApi.csproj @@ -1,2 +1,7 @@  + + + netstandard2.0 + + diff --git a/src/Veracode.ApiClients.sln b/src/Veracode.ApiClients.sln index 6e472a9..c087b6c 100644 --- a/src/Veracode.ApiClients.sln +++ b/src/Veracode.ApiClients.sln @@ -1,72 +1,89 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33502.350 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiTester", "ApiTester\ApiTester.csproj", "{DDC36AF6-B321-40FF-88AE-D113FF867351}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.SCAAgentApi", "Veracode.ApiClients.SCAAgentApi\Veracode.ApiClients.SCAAgentApi.csproj", "{C23F0593-896F-4B88-AD4C-5D0145A5CA2C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.ApplicationsApi", "Veracode.ApiClients.ApplicationsApi\Veracode.ApiClients.ApplicationsApi.csproj", "{8822BF15-4B22-48AC-9D71-C1A929C19B87}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.Helper", "Veracode.ApiClients.Helper\Veracode.ApiClients.Helper.csproj", "{F5FA54B4-319D-4679-ACDD-F4B80113B34A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.SummaryReportApi", "Veracode.ApiClients.SummaryReportApi\Veracode.ApiClients.SummaryReportApi.csproj", "{11C21C6B-502E-4A47-A59D-FC9595D72374}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.FindingsApi", "Veracode.ApiClients.FindingsApi\Veracode.ApiClients.FindingsApi.csproj", "{6A39E497-D8D8-4B37-AA41-4D9D12554547}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.DynamicFlawApi", "Veracode.ApiClients.DynamicFlawApi\Veracode.ApiClients.DynamicFlawApi.csproj", "{EDF594CF-2A78-4E29-BFC1-8D64B72209EF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.IdentityApi", "Veracode.ApiClients.IdentityApi\Veracode.ApiClients.IdentityApi.csproj", "{220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{691542A2-7461-4F56-9FFE-E843607017AA}" - ProjectSection(SolutionItems) = preProject - Directory.Build.props = Directory.Build.props - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DDC36AF6-B321-40FF-88AE-D113FF867351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DDC36AF6-B321-40FF-88AE-D113FF867351}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DDC36AF6-B321-40FF-88AE-D113FF867351}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DDC36AF6-B321-40FF-88AE-D113FF867351}.Release|Any CPU.Build.0 = Release|Any CPU - {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Release|Any CPU.Build.0 = Release|Any CPU - {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Release|Any CPU.Build.0 = Release|Any CPU - {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Release|Any CPU.Build.0 = Release|Any CPU - {11C21C6B-502E-4A47-A59D-FC9595D72374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {11C21C6B-502E-4A47-A59D-FC9595D72374}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11C21C6B-502E-4A47-A59D-FC9595D72374}.Release|Any CPU.ActiveCfg = Release|Any CPU - {11C21C6B-502E-4A47-A59D-FC9595D72374}.Release|Any CPU.Build.0 = Release|Any CPU - {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Release|Any CPU.Build.0 = Release|Any CPU - {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Release|Any CPU.Build.0 = Release|Any CPU - {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E7E030D1-26E4-49E3-8A01-9A8FD0AECC59} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33502.350 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiTester", "ApiTester\ApiTester.csproj", "{DDC36AF6-B321-40FF-88AE-D113FF867351}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.SCAAgentApi", "Veracode.ApiClients.SCAAgentApi\Veracode.ApiClients.SCAAgentApi.csproj", "{C23F0593-896F-4B88-AD4C-5D0145A5CA2C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.ApplicationsApi", "Veracode.ApiClients.ApplicationsApi\Veracode.ApiClients.ApplicationsApi.csproj", "{8822BF15-4B22-48AC-9D71-C1A929C19B87}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.Helper", "Veracode.ApiClients.Helper\Veracode.ApiClients.Helper.csproj", "{F5FA54B4-319D-4679-ACDD-F4B80113B34A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.SummaryReportApi", "Veracode.ApiClients.SummaryReportApi\Veracode.ApiClients.SummaryReportApi.csproj", "{11C21C6B-502E-4A47-A59D-FC9595D72374}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.FindingsApi", "Veracode.ApiClients.FindingsApi\Veracode.ApiClients.FindingsApi.csproj", "{6A39E497-D8D8-4B37-AA41-4D9D12554547}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.DynamicFlawApi", "Veracode.ApiClients.DynamicFlawApi\Veracode.ApiClients.DynamicFlawApi.csproj", "{EDF594CF-2A78-4E29-BFC1-8D64B72209EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Veracode.ApiClients.IdentityApi", "Veracode.ApiClients.IdentityApi\Veracode.ApiClients.IdentityApi.csproj", "{220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{691542A2-7461-4F56-9FFE-E843607017AA}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C6B4B6E3-4A4A-4882-8092-C2DE8B6BE87C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{FFDC7AA8-F01C-4BEB-89B0-02D28C124817}" + ProjectSection(SolutionItems) = preProject + ..\.github\workflows\Veracode.ApiClients.ApplicationsApi.publish.yml = ..\.github\workflows\Veracode.ApiClients.ApplicationsApi.publish.yml + ..\.github\workflows\Veracode.ApiClients.DynamicFlawApi.publish.yml = ..\.github\workflows\Veracode.ApiClients.DynamicFlawApi.publish.yml + ..\.github\workflows\Veracode.ApiClients.FindingsApi.publish.yml = ..\.github\workflows\Veracode.ApiClients.FindingsApi.publish.yml + ..\.github\workflows\Veracode.ApiClients.Helper.publish.yml = ..\.github\workflows\Veracode.ApiClients.Helper.publish.yml + ..\.github\workflows\Veracode.ApiClients.IdentityApi.publish.yml = ..\.github\workflows\Veracode.ApiClients.IdentityApi.publish.yml + ..\.github\workflows\Veracode.ApiClients.SCAAgentApi.publish.yml = ..\.github\workflows\Veracode.ApiClients.SCAAgentApi.publish.yml + ..\.github\workflows\Veracode.ApiClients.SummaryReportApi.publish.yml = ..\.github\workflows\Veracode.ApiClients.SummaryReportApi.publish.yml + ..\.github\workflows\_publish.yml = ..\.github\workflows\_publish.yml + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DDC36AF6-B321-40FF-88AE-D113FF867351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DDC36AF6-B321-40FF-88AE-D113FF867351}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DDC36AF6-B321-40FF-88AE-D113FF867351}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DDC36AF6-B321-40FF-88AE-D113FF867351}.Release|Any CPU.Build.0 = Release|Any CPU + {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C23F0593-896F-4B88-AD4C-5D0145A5CA2C}.Release|Any CPU.Build.0 = Release|Any CPU + {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8822BF15-4B22-48AC-9D71-C1A929C19B87}.Release|Any CPU.Build.0 = Release|Any CPU + {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5FA54B4-319D-4679-ACDD-F4B80113B34A}.Release|Any CPU.Build.0 = Release|Any CPU + {11C21C6B-502E-4A47-A59D-FC9595D72374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {11C21C6B-502E-4A47-A59D-FC9595D72374}.Debug|Any CPU.Build.0 = Debug|Any CPU + {11C21C6B-502E-4A47-A59D-FC9595D72374}.Release|Any CPU.ActiveCfg = Release|Any CPU + {11C21C6B-502E-4A47-A59D-FC9595D72374}.Release|Any CPU.Build.0 = Release|Any CPU + {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A39E497-D8D8-4B37-AA41-4D9D12554547}.Release|Any CPU.Build.0 = Release|Any CPU + {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EDF594CF-2A78-4E29-BFC1-8D64B72209EF}.Release|Any CPU.Build.0 = Release|Any CPU + {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {220309AF-E7CE-4BB8-BF0A-F8D77D7FCECA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {FFDC7AA8-F01C-4BEB-89B0-02D28C124817} = {C6B4B6E3-4A4A-4882-8092-C2DE8B6BE87C} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E7E030D1-26E4-49E3-8A01-9A8FD0AECC59} + EndGlobalSection +EndGlobal