Skip to content

Commit

Permalink
Reformat solution
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoelman committed Oct 1, 2024
1 parent aa17e02 commit abfc8c8
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 22 deletions.
3 changes: 2 additions & 1 deletion src/JsonApiDotNetCore.OpenApi.Client.NSwag/ApiResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public static async Task<ApiResponse> TranslateAsync(Func<Task<ApiResponse>> ope
}

[PublicAPI]
public class ApiResponse<TResult>(int statusCode, IReadOnlyDictionary<string, IEnumerable<string>> headers, TResult result) : ApiResponse(statusCode, headers)
public class ApiResponse<TResult>(int statusCode, IReadOnlyDictionary<string, IEnumerable<string>> headers, TResult result)
: ApiResponse(statusCode, headers)
{
public TResult Result { get; private set; } = result;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

namespace JsonApiDotNetCore.OpenApi.Client.NSwag;

internal sealed class UnreachableCodeException() : Exception("This code should not be reachable.");
internal sealed class UnreachableCodeException()
: Exception("This code should not be reachable.");
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

namespace JsonApiDotNetCore.OpenApi.Swashbuckle;

internal sealed class UnreachableCodeException() : Exception("This code should not be reachable.");
internal sealed class UnreachableCodeException()
: Exception("This code should not be reachable.");
4 changes: 2 additions & 2 deletions test/OpenApiTests/AtomicOperations/OperationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ namespace OpenApiTests.AtomicOperations;

public sealed class OperationsController(
IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IOperationsProcessor processor, IJsonApiRequest request,
ITargetedFields targetedFields, IAtomicOperationFilter operationFilter) : JsonApiOperationsController(options, resourceGraph, loggerFactory, processor,
request, targetedFields, operationFilter);
ITargetedFields targetedFields, IAtomicOperationFilter operationFilter)
: JsonApiOperationsController(options, resourceGraph, loggerFactory, processor, request, targetedFields, operationFilter);
3 changes: 2 additions & 1 deletion test/OpenApiTests/AtomicOperations/OperationsDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.AtomicOperations;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class OperationsDbContext(ISystemClock systemClock, DbContextOptions<OperationsDbContext> options) : TestableDbContext(options)
public sealed class OperationsDbContext(ISystemClock systemClock, DbContextOptions<OperationsDbContext> options)
: TestableDbContext(options)
{
internal ISystemClock SystemClock { get; } = systemClock;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.ClientIdGenerationModes;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class ClientIdGenerationDbContext(DbContextOptions<ClientIdGenerationDbContext> options) : TestableDbContext(options)
public sealed class ClientIdGenerationDbContext(DbContextOptions<ClientIdGenerationDbContext> options)
: TestableDbContext(options)
{
public DbSet<Player> Players => Set<Player>();
public DbSet<Game> Games => Set<Game>();
Expand Down
3 changes: 2 additions & 1 deletion test/OpenApiTests/Documentation/DocumentationDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
namespace OpenApiTests.Documentation;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class DocumentationDbContext(DbContextOptions<DocumentationDbContext> options) : TestableDbContext(options)
public sealed class DocumentationDbContext(DbContextOptions<DocumentationDbContext> options)
: TestableDbContext(options)
{
public DbSet<Skyscraper> Skyscrapers => Set<Skyscraper>();
public DbSet<Elevator> Elevators => Set<Elevator>();
Expand Down
4 changes: 2 additions & 2 deletions test/OpenApiTests/Documentation/OperationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ namespace OpenApiTests.Documentation;

public sealed class OperationsController(
IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IOperationsProcessor processor, IJsonApiRequest request,
ITargetedFields targetedFields, IAtomicOperationFilter operationFilter) : JsonApiOperationsController(options, resourceGraph, loggerFactory, processor,
request, targetedFields, operationFilter);
ITargetedFields targetedFields, IAtomicOperationFilter operationFilter)
: JsonApiOperationsController(options, resourceGraph, loggerFactory, processor, request, targetedFields, operationFilter);
3 changes: 2 additions & 1 deletion test/OpenApiTests/Headers/HeaderDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.Headers;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class HeaderDbContext(DbContextOptions<HeaderDbContext> options) : TestableDbContext(options)
public sealed class HeaderDbContext(DbContextOptions<HeaderDbContext> options)
: TestableDbContext(options)
{
public DbSet<Country> Countries => Set<Country>();
public DbSet<Language> Languages => Set<Language>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
namespace OpenApiTests.LegacyOpenApi;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class LegacyIntegrationDbContext(DbContextOptions<LegacyIntegrationDbContext> options) : TestableDbContext(options)
public sealed class LegacyIntegrationDbContext(DbContextOptions<LegacyIntegrationDbContext> options)
: TestableDbContext(options)
{
public DbSet<Airplane> Airplanes => Set<Airplane>();
public DbSet<Flight> Flights => Set<Flight>();
Expand Down
3 changes: 2 additions & 1 deletion test/OpenApiTests/Links/LinkDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.Links;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class LinkDbContext(DbContextOptions<LinkDbContext> options) : TestableDbContext(options)
public sealed class LinkDbContext(DbContextOptions<LinkDbContext> options)
: TestableDbContext(options)
{
public DbSet<Vacation> Vacations => Set<Vacation>();
public DbSet<Accommodation> Accommodations => Set<Accommodation>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.ModelStateValidation;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class ModelStateValidationDbContext(DbContextOptions<ModelStateValidationDbContext> options) : TestableDbContext(options)
public sealed class ModelStateValidationDbContext(DbContextOptions<ModelStateValidationDbContext> options)
: TestableDbContext(options)
{
public DbSet<SocialMediaAccount> SocialMediaAccounts => Set<SocialMediaAccount>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.NamingConventions;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class NamingConventionDbContext(DbContextOptions<NamingConventionDbContext> options) : TestableDbContext(options)
public sealed class NamingConventionDbContext(DbContextOptions<NamingConventionDbContext> options)
: TestableDbContext(options)
{
public DbSet<Supermarket> Supermarkets => Set<Supermarket>();
}
4 changes: 2 additions & 2 deletions test/OpenApiTests/NamingConventions/OperationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ namespace OpenApiTests.NamingConventions;

public sealed class OperationsController(
IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IOperationsProcessor processor, IJsonApiRequest request,
ITargetedFields targetedFields, IAtomicOperationFilter operationFilter) : JsonApiOperationsController(options, resourceGraph, loggerFactory, processor,
request, targetedFields, operationFilter);
ITargetedFields targetedFields, IAtomicOperationFilter operationFilter)
: JsonApiOperationsController(options, resourceGraph, loggerFactory, processor, request, targetedFields, operationFilter);
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.OpenApiGenerationFailures.MissingFromBody;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class MissingFromBodyDbContext(DbContextOptions<MissingFromBodyDbContext> options) : TestableDbContext(options)
public sealed class MissingFromBodyDbContext(DbContextOptions<MissingFromBodyDbContext> options)
: TestableDbContext(options)
{
public DbSet<RecycleBin> RecycleBins => Set<RecycleBin>();
}
3 changes: 2 additions & 1 deletion test/OpenApiTests/QueryStrings/QueryStringDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.QueryStrings;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class QueryStringDbContext(DbContextOptions<QueryStringDbContext> options) : TestableDbContext(options)
public sealed class QueryStringDbContext(DbContextOptions<QueryStringDbContext> options)
: TestableDbContext(options)
{
public DbSet<Node> Nodes => Set<Node>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace OpenApiTests.ResourceFieldValidation.NullableReferenceTypesOff;
// @formatter:wrap_chained_method_calls chop_always

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class NrtOffDbContext(DbContextOptions<NrtOffDbContext> options) : TestableDbContext(options)
public sealed class NrtOffDbContext(DbContextOptions<NrtOffDbContext> options)
: TestableDbContext(options)
{
public DbSet<NrtOffResource> Resources => Set<NrtOffResource>();
public DbSet<NrtOffEmpty> Empties => Set<NrtOffEmpty>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ namespace OpenApiTests.ResourceFieldValidation.NullableReferenceTypesOn;
// @formatter:wrap_chained_method_calls chop_always

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class NrtOnDbContext(DbContextOptions<NrtOnDbContext> options) : TestableDbContext(options)
public sealed class NrtOnDbContext(DbContextOptions<NrtOnDbContext> options)
: TestableDbContext(options)
{
public DbSet<NrtOnResource> Resources => Set<NrtOnResource>();
public DbSet<NrtOnEmpty> Empties => Set<NrtOnEmpty>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace OpenApiTests.RestrictedControllers;

[UsedImplicitly(ImplicitUseTargetFlags.Members)]
public sealed class RestrictionDbContext(DbContextOptions<RestrictionDbContext> options) : TestableDbContext(options)
public sealed class RestrictionDbContext(DbContextOptions<RestrictionDbContext> options)
: TestableDbContext(options)
{
public DbSet<DataStream> DataStreams => Set<DataStream>();
public DbSet<ReadOnlyChannel> ReadOnlyChannels => Set<ReadOnlyChannel>();
Expand Down

0 comments on commit abfc8c8

Please sign in to comment.