Skip to content

Commit 7e32af5

Browse files
authored
Merge pull request #11 from futurum-dev/feature/v2
v2 - dotnet 8 and split out Futurum.Core
2 parents d575e0b + 74da080 commit 7e32af5

File tree

134 files changed

+2104
-8174
lines changed

Some content is hidden

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

134 files changed

+2104
-8174
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
- uses: actions/checkout@v2
1515
with:
1616
fetch-depth: 100
17-
18-
- name: Setup .NET 7
17+
18+
- name: Setup .NET 8
1919
uses: actions/setup-dotnet@v1
2020
with:
21-
dotnet-version: 7.x
21+
dotnet-version: 8.x
2222

2323
- name: Install dependencies
2424
run: dotnet restore
2525

2626
- name: Build
2727
run: dotnet build --configuration Release --no-restore
28-
29-
- name: Test on .NET 7
28+
29+
- name: Test
3030
run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov
3131

3232
- name: Publish coverage report to coveralls.io
@@ -44,14 +44,14 @@ jobs:
4444
flag-name: end-to-end
4545
parallel: true
4646
path-to-lcov: ./test/Futurum.WebApiEndpoint.Micro.EndToEndTests/TestResults/coverage.info
47-
47+
4848
finish:
4949
needs: build
5050
runs-on: ubuntu-latest
51-
51+
5252
steps:
5353
- name: Coveralls Finished
5454
uses: coverallsapp/github-action@master
5555
with:
5656
github-token: ${{ secrets.GITHUB_TOKEN }}
57-
parallel-finished: true
57+
parallel-finished: true

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
uses: actions/checkout@v2
1414
with:
1515
fetch-depth: 100
16-
17-
- name: Setup .NET 7
16+
17+
- name: Setup .NET 8
1818
uses: actions/setup-dotnet@v1
1919
with:
20-
dotnet-version: 7.x
20+
dotnet-version: 8.x
2121

2222
- name: Install dependencies
2323
run: dotnet restore
@@ -28,7 +28,7 @@ jobs:
2828
- name: Test
2929
run: dotnet test --no-restore --verbosity normal
3030

31-
- name: Pack Futurum.Core
31+
- name: Pack Futurum.WebApiEndpoint.Micro
3232
run: dotnet pack ./src/Futurum.WebApiEndpoint.Micro/Futurum.WebApiEndpoint.Micro.csproj --output nuget-packages --configuration Release
3333
- name: NuGet publish
3434
run: find nuget-packages -name 'Futurum.WebApiEndpoint.Micro*.nupkg' | xargs -i dotnet nuget push {} --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
@@ -37,4 +37,4 @@ jobs:
3737
uses: actions/upload-artifact@v2
3838
with:
3939
name: nuget-packages
40-
path: nuget-packages/**/*
40+
path: nuget-packages/**/*

.idea/.idea.Futurum.WebApiEndpoint.Micro/.idea/aws.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 79 additions & 229 deletions
Large diffs are not rendered by default.
-306 KB
Loading

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100",
4+
"rollForward": "disable",
5+
"allowPrerelease": false
6+
}
7+
}

sample/Futurum.WebApiEndpoint.Micro.Sample.Addition/AdditionWebApiEndpoint.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Futurum.WebApiEndpoint.Micro.Sample.Addition;
44

5-
[WebApiEndpoint(prefixRoute: "addition")]
6-
public class AdditionWebApiEndpoint : IWebApiEndpoint
5+
[WebApiEndpoint("addition")]
6+
public partial class AdditionWebApiEndpoint
77
{
8-
public void Register(IEndpointRouteBuilder builder)
8+
protected override void Build(IEndpointRouteBuilder builder)
99
{
1010
builder.MapGet("/", GetHandler);
1111
}
@@ -16,4 +16,4 @@ private static Ok<DataCollectionDto<AdditionDto>> GetHandler(HttpContext context
1616
.Select(AdditionMapper.Map)
1717
.ToDataCollectionDto()
1818
.ToOk();
19-
}
19+
}

sample/Futurum.WebApiEndpoint.Micro.Sample.Addition/Futurum.WebApiEndpoint.Micro.Sample.Addition.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<OutputType>Library</OutputType>
8+
<LangVersion>default</LangVersion>
89
</PropertyGroup>
910

1011
<ItemGroup>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
namespace Futurum.WebApiEndpoint.Micro.Sample.Analyzers;
22

33
[WebApiEndpoint(prefixRoute: "method-returning-BadRequest-without-ProblemDetails", group: "analyzer")]
4-
public class MethodReturningBadRequestWithoutProblemDetails : IWebApiEndpoint
4+
public partial class MethodReturningBadRequestWithoutProblemDetails
55
{
6-
public void Register(IEndpointRouteBuilder builder)
6+
protected override void Build(IEndpointRouteBuilder builder)
77
{
88
builder.MapGet("/", ResultErrorHandler);
99
}
10-
10+
1111
private static Results<Ok<string>, BadRequest<string>> ResultErrorHandler(HttpContext context) =>
1212
"This WebApiEndpoint has a non-empty constructor and will raise a warning.".ToOk();
13-
}
13+
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
namespace Futurum.WebApiEndpoint.Micro.Sample.Analyzers;
22

33
[WebApiEndpoint("non-empty-constructor", "analyzer")]
4-
public class NonEmptyConstructorOnWebApiEndpoint : IWebApiEndpoint
4+
public partial class NonEmptyConstructorOnWebApiEndpoint
55
{
66
public NonEmptyConstructorOnWebApiEndpoint(IConfiguration configuration)
77
{
88
}
9-
10-
public void Register(IEndpointRouteBuilder builder)
9+
10+
protected override void Build(IEndpointRouteBuilder builder)
1111
{
1212
builder.MapGet("/", GetHandler);
1313
}
1414

1515
private static Ok<string> GetHandler(HttpContext context) =>
1616
"This WebApiEndpoint has a non-empty constructor and will raise a warning.".ToOk();
17-
}
17+
}

0 commit comments

Comments
 (0)