Skip to content

Commit

Permalink
Bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
elsand committed Mar 24, 2023
1 parent 0c263c9 commit 3dfdd27
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dan.Common" Version="1.0.0-preview3" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.3.0" OutputItemType="Analyzer" />
<PackageReference Include="Dan.Common" Version="1.3.1" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.9.0-preview1" OutputItemType="Analyzer" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.0.13" />
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.14" />
</ItemGroup>
Expand Down
9 changes: 8 additions & 1 deletion src/Dan.Plugin.DATASOURCENAME/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,20 @@ public Plugin(
_logger = loggerFactory.CreateLogger<Plugin>();
_settings = settings.Value;
_evidenceSourceMetadata = evidenceSourceMetadata;

_logger.LogDebug("Initialized plugin! This should be visible in the console");
}

[Function(SimpleDatasetName)]
public async Task<HttpResponseData> GetSimpleDatasetAsync(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequestData req,
FunctionContext context)
{

_logger.LogDebug("debug HERE");
_logger.LogWarning("warning HERE");
_logger.LogError("error HERE");

var evidenceHarvesterRequest = await req.ReadFromJsonAsync<EvidenceHarvesterRequest>();

return await EvidenceSourceResponse.CreateResponse(req,
Expand Down Expand Up @@ -97,7 +104,7 @@ private async Task<List<EvidenceValue>> GetEvidenceValuesRichDataset(EvidenceHar
// dataset model.
//
// Another way to do this is to not generate the schema from the model, but "hand code" the schema in the metadata and validate the
// received JSON against it, throwing eg. a EvidenceSourcePermanentServerException if it fails to match.
// received JSON against it, throwing eg. a EvidenceSourcePermanentServerException if it fails to match.
ecb.AddEvidenceValue("default", JsonConvert.SerializeObject(exampleModel), SourceName);

return ecb.GetEvidenceValues();
Expand Down
13 changes: 13 additions & 0 deletions src/Dan.Plugin.DATASOURCENAME/worker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Function": "Debug"
},
"ApplicationInsights": {
"SamplingSettings": {
"IsEnabled": false
}
}
}
}

0 comments on commit 3dfdd27

Please sign in to comment.