Skip to content

Commit 02499d8

Browse files
committed
Merge branch 'v3' into dev
2 parents a2345d3 + e2e3f3b commit 02499d8

File tree

282 files changed

+7740
-4642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+7740
-4642
lines changed

.github/workflows/build.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- master
77
- dev
8+
- v3
89
- feature/*
910

1011
jobs:
@@ -13,7 +14,7 @@ jobs:
1314
strategy:
1415
matrix:
1516
os: [ 'windows-latest' ]
16-
dotnet: [ '3.1.301' ]
17+
dotnet: [ '3.1.302' ]
1718

1819
runs-on: ${{ matrix.os }}
1920

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ 'windows-latest' ]
14-
dotnet: [ '3.1.301' ]
14+
dotnet: [ '3.1.302' ]
1515

1616
runs-on: ${{ matrix.os }}
1717

.github/workflows/release-all.yaml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ on:
77
- release/configjson-*
88
- release/di-*
99
- release/swagger-*
10+
- release/swaggercore-*
1011

1112
jobs:
1213
build_test_package_release:
1314
name: Build, test, package and release
1415
strategy:
1516
matrix:
1617
os: [ 'windows-latest' ]
17-
dotnet: [ '3.1.301' ]
18+
dotnet: [ '3.1.302' ]
1819

1920
runs-on: ${{ matrix.os }}
2021

@@ -89,12 +90,21 @@ jobs:
8990
dotnet build ./src/Aliencube.AzureFunctions.Extensions.DependencyInjection -c Release -p:Version=${{ steps.release.outputs.version }} -v minimal
9091
dotnet build ./test/Aliencube.AzureFunctions.Extensions.DependencyInjection.Tests -c Release
9192
93+
- name: Build solution for OpenApi Core
94+
if: steps.release.outputs.module == 'swaggercore'
95+
shell: pwsh
96+
run: |
97+
dir
98+
dotnet build ./src/Aliencube.AzureFunctions.Extensions.OpenApi.Core -c Release -p:Version=${{ steps.release.outputs.version }} -v minimal
99+
dotnet build ./test/Aliencube.AzureFunctions.Extensions.OpenApi.Core.Tests -c Release
100+
92101
- name: Build solution for OpenApi
93102
if: steps.release.outputs.module == 'swagger'
94103
shell: pwsh
95104
run: |
96105
dir
97-
dotnet build . -c Release -p:Version=${{ steps.release.outputs.version }} -v minimal
106+
dotnet build ./src/Aliencube.AzureFunctions.Extensions.OpenApi -c Release -p:Version=${{ steps.release.outputs.version }} -v minimal
107+
dotnet build ./test/Aliencube.AzureFunctions.Extensions.OpenApi.Tests -c Release
98108
99109
- name: Test solution for AppSettings
100110
if: steps.release.outputs.module == 'appsettings'
@@ -117,12 +127,19 @@ jobs:
117127
dir
118128
dotnet test ./test/Aliencube.AzureFunctions.Extensions.DependencyInjection.Tests -c Release
119129
130+
- name: Test solution for OpenApi Core
131+
if: steps.release.outputs.module == 'swaggercore'
132+
shell: pwsh
133+
run: |
134+
dir
135+
dotnet test ./test/Aliencube.AzureFunctions.Extensions.OpenApi.Core.Tests -c Release
136+
120137
- name: Test solution for OpenApi
121138
if: steps.release.outputs.module == 'swagger'
122139
shell: pwsh
123140
run: |
124141
dir
125-
dotnet test . -c Release
142+
dotnet test ./test/Aliencube.AzureFunctions.Extensions.OpenApi.Tests -c Release
126143
127144
- name: List Package for AppSettings
128145
if: steps.release.outputs.module == 'appsettings'
@@ -157,6 +174,17 @@ jobs:
157174
echo "::set-env name=PACKAGE_PATH::$path"
158175
echo "::set-env name=PACKAGE_NAME::$name"
159176
177+
- name: List Package for OpenApi Core
178+
if: steps.release.outputs.module == 'swaggercore'
179+
shell: pwsh
180+
run: |
181+
$package = Get-ChildItem -Path ./src/*.OpenApi.Core -Include *.nupkg -Recurse | Where-Object { $_.FullName -like "*${{ steps.release.outputs.version }}*" }
182+
$path = $package[0].FullName
183+
$name = $package[0].Name
184+
185+
echo "::set-env name=PACKAGE_PATH::$path"
186+
echo "::set-env name=PACKAGE_NAME::$name"
187+
160188
- name: List Package for OpenApi
161189
if: steps.release.outputs.module == 'swagger'
162190
shell: pwsh

.github/workflows/release-cli.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
os: [ 'windows-latest' ]
1414
node: [ 10 ]
15-
dotnet: [ '3.1.301' ]
15+
dotnet: [ '3.1.302' ]
1616
targetFramework: [ 'net461', 'netcoreapp3.1' ]
1717
runtime: [ 'win-x64', 'linux-x64', 'osx-x64' ]
1818

Aliencube.AzureFunctions.Extensions.sln

Lines changed: 43 additions & 63 deletions
Large diffs are not rendered by default.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#if NET461
2+
using System;
3+
using System.Net;
4+
using System.Net.Http;
5+
#endif
6+
7+
using System.Threading.Tasks;
8+
9+
using Aliencube.AzureFunctions.Extensions.DependencyInjection.Abstractions;
10+
using Aliencube.AzureFunctions.FunctionApp.Services;
11+
12+
#if !NET461
13+
using Microsoft.AspNetCore.Mvc;
14+
#endif
15+
16+
using Microsoft.Extensions.Logging;
17+
18+
namespace Aliencube.AzureFunctions.FunctionApp.Functions
19+
{
20+
/// <summary>
21+
/// This represents the function entity for sample HTTP trigger.
22+
/// </summary>
23+
public class AddDummyFunction : FunctionBase<ILogger>, IAddDummyFunction
24+
{
25+
private readonly IDummyHttpService _service;
26+
27+
/// <summary>
28+
/// Initializes a new instance of the <see cref="AddDummyFunction"/> class.
29+
/// </summary>
30+
/// <param name="dependency"><see cref="IDummyHttpService"/> instance.</param>
31+
public AddDummyFunction(IDummyHttpService service)
32+
{
33+
this._service = service;
34+
}
35+
36+
/// <inheritdoc />
37+
public override async Task<TOutput> InvokeAsync<TInput, TOutput>(TInput input, FunctionOptionsBase options = null)
38+
{
39+
this.Log.LogInformation("C# HTTP trigger function processed a request.");
40+
41+
var content = await this._service.AddDummy().ConfigureAwait(false);
42+
#if NET461
43+
var req = input as HttpRequestMessage;
44+
var result = req.CreateResponse(HttpStatusCode.OK, content);
45+
46+
return (TOutput)Convert.ChangeType(result, typeof(TOutput));
47+
#elif NETSTANDARD2_0
48+
var result = new OkObjectResult(content);
49+
50+
return (TOutput)(IActionResult)result;
51+
#endif
52+
}
53+
}
54+
}

samples/Aliencube.AzureFunctions.FunctionApp.Functions/GetSamplesFunction.cs renamed to samples/Aliencube.AzureFunctions.FunctionApp.Functions/GetDummiesFunction.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NET461
1+
#if NET461
22
using System;
33
using System.Net;
44
using System.Net.Http;
@@ -20,15 +20,15 @@ namespace Aliencube.AzureFunctions.FunctionApp.Functions
2020
/// <summary>
2121
/// This represents the function entity for sample HTTP trigger.
2222
/// </summary>
23-
public class GetSamplesFunction : FunctionBase<ILogger>, IGetSamplesFunction
23+
public class GetDummiesFunction : FunctionBase<ILogger>, IGetDummiesFunction
2424
{
25-
private readonly ISampleHttpService _service;
25+
private readonly IDummyHttpService _service;
2626

2727
/// <summary>
28-
/// Initializes a new instance of the <see cref="GetSamplesFunction"/> class.
28+
/// Initializes a new instance of the <see cref="GetDummiesFunction"/> class.
2929
/// </summary>
30-
/// <param name="dependency"><see cref="ISampleHttpService"/> instance.</param>
31-
public GetSamplesFunction(ISampleHttpService service)
30+
/// <param name="dependency"><see cref="IDummyHttpService"/> instance.</param>
31+
public GetDummiesFunction(IDummyHttpService service)
3232
{
3333
this._service = service;
3434
}
@@ -38,7 +38,7 @@ public override async Task<TOutput> InvokeAsync<TInput, TOutput>(TInput input, F
3838
{
3939
this.Log.LogInformation("C# HTTP trigger function processed a request.");
4040

41-
var content = await this._service.GetSamples().ConfigureAwait(false);
41+
var content = await this._service.GetDummies().ConfigureAwait(false);
4242
#if NET461
4343
var req = input as HttpRequestMessage;
4444
var result = req.CreateResponse(HttpStatusCode.OK, content);

samples/Aliencube.AzureFunctions.FunctionApp.Functions/IGetSamplesFunction.cs renamed to samples/Aliencube.AzureFunctions.FunctionApp.Functions/IAddDummyFunction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace Aliencube.AzureFunctions.FunctionApp.Functions
66
{
77
/// <summary>
8-
/// This provides interfaces to <see cref="GetSamplesFunction"/>.
8+
/// This provides interfaces to <see cref="AddDummyFunction"/>.
99
/// </summary>
10-
public interface IGetSamplesFunction : IFunction<ILogger>
10+
public interface IAddDummyFunction : IFunction<ILogger>
1111
{
1212
}
1313
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Aliencube.AzureFunctions.Extensions.DependencyInjection.Abstractions;
2+
3+
using Microsoft.Extensions.Logging;
4+
5+
namespace Aliencube.AzureFunctions.FunctionApp.Functions
6+
{
7+
/// <summary>
8+
/// This provides interfaces to <see cref="GetDummiesFunction"/>.
9+
/// </summary>
10+
public interface IGetDummiesFunction : IFunction<ILogger>
11+
{
12+
}
13+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<ProjectReference Include="..\..\src\Aliencube.AzureFunctions.Extensions.OpenApi\Aliencube.AzureFunctions.Extensions.OpenApi.csproj" />
8+
<ProjectReference Include="..\..\src\Aliencube.AzureFunctions.Extensions.OpenApi.Core\Aliencube.AzureFunctions.Extensions.OpenApi.Core.csproj" />
99
</ItemGroup>
1010

1111
</Project>

0 commit comments

Comments
 (0)