Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to FunctionalDDD version 1.1.0-alpha.28 #22

Merged
merged 2 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Api/src/2022-12-21/Controllers/DinnersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/// </summary>
[ApiVersion("2022-10-01")]
[Route("[controller]")]
[Consumes("application/json")]
[Produces("application/json")]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status200OK)]
public class DinnersController : ControllerBase
Expand Down
4 changes: 3 additions & 1 deletion Api/src/2022-12-21/Controllers/MenusController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Asp.Versioning;
using BuberDinner.Api._2022_12_21.Models.Menus;
using FunctionalDDD.Results.Asp;
using FunctionalDDD.Asp;
using Mapster;
using Mediator;
using Microsoft.AspNetCore.Mvc;
Expand All @@ -12,6 +12,8 @@
/// </summary>
[ApiVersion("2022-10-01")]
[Route("hosts/{hostId}/menus")]
[Consumes("application/json")]
[Produces("application/json")]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status201Created)]
Expand Down
4 changes: 3 additions & 1 deletion Api/src/Neutral/Controllers/AuthenticationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Asp.Versioning;
using BuberDinner.Api.Neutral.Models.Authentication;
using FunctionalDDD.Results.Asp;
using FunctionalDDD.Asp;
using Mapster;
using Mediator;
using Microsoft.AspNetCore.Authorization;
Expand All @@ -13,6 +13,8 @@
/// </summary>
[AllowAnonymous]
[ApiVersionNeutral]
[Consumes("application/json")]
[Produces("application/json")]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status200OK)]
[Route("[controller]")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public ValueTask<Result<AuthenticationResult>> Handle(RegisterCommand request, C

private async ValueTask<Result<User>> CreateUser(RegisterCommand command, CancellationToken cancellationToken) =>
await User.New(command.UserId, command.FirstName, command.LastName, command.Email, command.Password)
.TeeAsync(user => _userRepository.Add(user, cancellationToken));
.TapAsync(user => _userRepository.Add(user, cancellationToken));

private async ValueTask<Result<string>> ValidateUserDoesNotExist(UserId id, CancellationToken cancellationToken)
{
Expand Down
2 changes: 1 addition & 1 deletion Application/src/Menus/Commands/CreateMenuCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ValueTask<Result<Menu>> Handle(CreateMenuCommand request, CancellationTok

private async ValueTask<Result<Menu>> CreateMenu(CreateMenuCommand request, CancellationToken cancellationToken) =>
await Menu.New(request.Name, request.Description, CreateMenuSections(request.Sections), request.HostId)
.TeeAsync(menu => _menuRepository.Add(menu, cancellationToken));
.TapAsync(menu => _menuRepository.Add(menu, cancellationToken));

private static IReadOnlyList<MenuSection> CreateMenuSections(IReadOnlyList<MenuSectionCommand> commands) =>
commands
Expand Down
28 changes: 14 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<Project>
<PropertyGroup>
<FunctionalDDDVersion>0.1.0-alpha.40</FunctionalDDDVersion>
<FunctionalDDDVersion>1.1.0-alpha.28</FunctionalDDDVersion>
</PropertyGroup>
<!-- Runtime -->
<ItemGroup>
<PackageVersion Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.0.1" />
<PackageVersion Include="Azure.Identity" Version="1.10.1" />
<PackageVersion Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.1.0" />
<PackageVersion Include="Azure.Identity" Version="1.10.3" />
<PackageVersion Include="FluentValidation" Version="11.3.0" />
<PackageVersion Include="FunctionalDDD.Asp" Version="1.1.0-alpha.18" />
<PackageVersion Include="FunctionalDDD.CommonValueObjectGenerator" Version="1.1.0-alpha.18" />
<PackageVersion Include="FunctionalDDD.CommonValueObjects" Version="1.1.0-alpha.18" />
<PackageVersion Include="FunctionalDDD.DomainDrivenDesign" Version="1.1.0-alpha.18" />
<PackageVersion Include="FunctionalDDD.FluentValidation" Version="1.1.0-alpha.18" />
<PackageVersion Include="FunctionalDDD.Asp" Version="$(FunctionalDDDVersion)" />
<PackageVersion Include="FunctionalDDD.CommonValueObjectGenerator" Version="$(FunctionalDDDVersion)" />
<PackageVersion Include="FunctionalDDD.CommonValueObjects" Version="$(FunctionalDDDVersion)" />
<PackageVersion Include="FunctionalDDD.DomainDrivenDesign" Version="$(FunctionalDDDVersion)" />
<PackageVersion Include="FunctionalDDD.FluentValidation" Version="$(FunctionalDDDVersion)" />
<PackageVersion Include="FunctionalDDD.RailwayOrientedProgramming" Version="$(FunctionalDDDVersion)" />
<PackageVersion Include="Mapster" Version="7.4.0" />
<PackageVersion Include="Mapster.DependencyInjection" Version="1.0.1" />
<PackageVersion Include="Mediator.Abstractions" Version="2.1.7" />
<PackageVersion Include="Mediator.SourceGenerator" Version="2.1.7" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.11" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.13" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.11" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.13" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="7.0.0" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.35.4" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.36.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.0.1" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
</ItemGroup>
<!-- Test -->
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageVersion Include="xunit" Version="2.5.1" />
<PackageVersion Include="xunit" Version="2.5.3" />
<PackageVersion Include="Xunit.DependencyInjection" Version="8.9.0" />
<PackageVersion Include="Xunit.Priority" Version="1.1.6" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="xunit.categories" Version="2.0.8" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Domain/src/Common/ValueObjects/Description.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class Description : RequiredString<Description>
public partial class Description : RequiredString
{
}
2 changes: 1 addition & 1 deletion Domain/src/Common/ValueObjects/Name.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class Name : RequiredString<Name>
public partial class Name : RequiredString
{
}
2 changes: 1 addition & 1 deletion Domain/src/Dinner/ValueObjects/DinnerId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class DinnerId : RequiredGuid<DinnerId>
public partial class DinnerId : RequiredGuid
{
}
2 changes: 1 addition & 1 deletion Domain/src/Host/ValueObjects/HostId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class HostId : RequiredGuid<HostId>
public partial class HostId : RequiredGuid
{
}
2 changes: 1 addition & 1 deletion Domain/src/Menu/ValueObjects/MenuId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class MenuId : RequiredGuid<MenuId>
public partial class MenuId : RequiredGuid
{
}
2 changes: 1 addition & 1 deletion Domain/src/Menu/ValueObjects/MenuItemId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class MenuItemId : RequiredGuid<MenuItemId>
public partial class MenuItemId : RequiredGuid
{
}
2 changes: 1 addition & 1 deletion Domain/src/Menu/ValueObjects/MenuSectionId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class MenuSectionId : RequiredGuid<MenuSectionId>
public partial class MenuSectionId : RequiredGuid
{
}
2 changes: 1 addition & 1 deletion Domain/src/MenuReview/ValueObjects/MenuId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class MenuReviewId : RequiredGuid<MenuReviewId>
public partial class MenuReviewId : RequiredGuid
{
}
2 changes: 1 addition & 1 deletion Domain/src/User/ValueObjects/FirstName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class FirstName : RequiredString<FirstName>
public partial class FirstName : RequiredString
{
}
2 changes: 1 addition & 1 deletion Domain/src/User/ValueObjects/LastName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class LastName : RequiredString<LastName>
public partial class LastName : RequiredString
{
}
2 changes: 1 addition & 1 deletion Domain/src/User/ValueObjects/Password.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class Password : RequiredString<Password>
public partial class Password : RequiredString
{
}
2 changes: 1 addition & 1 deletion Domain/src/User/ValueObjects/UserId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

using FunctionalDDD.Domain;

public partial class UserId : RequiredString<UserId>
public partial class UserId : RequiredString
{
}