Skip to content

Commit 16a0026

Browse files
committed
Merge branch 'master' into openapi
2 parents 12c08a8 + 8082765 commit 16a0026

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
]
2222
},
2323
"docfx": {
24-
"version": "2.70.4",
24+
"version": "2.71.0",
2525
"commands": [
2626
"docfx"
2727
]

run-docker-postgres.ps1

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#Requires -Version 7.0
22

3-
# This script starts a docker container with postgres database, used for running tests.
3+
# This script starts a PostgreSQL database in a docker container, which is required for running tests locally.
4+
# When the -UI switch is passed, pgAdmin (a web-based PostgreSQL management tool) is started in a second container, which lets you query the database.
5+
# To connect to pgAdmin, open http://localhost:5050 and login with user "admin@admin.com", password "postgres". Use hostname "db" when registering the server.
46

5-
docker container stop jsonapi-dotnet-core-testing
7+
param(
8+
[switch] $UI=$False
9+
)
610

7-
docker run --rm --name jsonapi-dotnet-core-testing `
8-
-e POSTGRES_DB=JsonApiDotNetCoreExample `
9-
-e POSTGRES_USER=postgres `
10-
-e POSTGRES_PASSWORD=postgres `
11-
-p 5432:5432 `
12-
postgres:15
11+
docker container stop jsonapi-postgresql-db
12+
docker container stop jsonapi-postgresql-management
13+
14+
docker run --pull always --rm --detach --name jsonapi-postgresql-db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:latest
15+
16+
if ($UI) {
17+
docker run --pull always --rm --detach --name jsonapi-postgresql-management --link jsonapi-postgresql-db:db -e PGADMIN_DEFAULT_EMAIL=admin@admin.com -e PGADMIN_DEFAULT_PASSWORD=postgres -p 5050:80 dpage/pgadmin4:latest
18+
}

src/JsonApiDotNetCore.SourceGenerators/ControllerSourceGenerator.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
using Microsoft.CodeAnalysis.CSharp.Syntax;
77
using Microsoft.CodeAnalysis.Text;
88

9-
#pragma warning disable RS2008 // Enable analyzer release tracking
10-
119
namespace JsonApiDotNetCore.SourceGenerators;
1210
// To debug in Visual Studio (requires v17.2 or higher):
1311
// - Set JsonApiDotNetCore.SourceGenerators as startup project

test/JsonApiDotNetCoreTests/UnitTests/Links/LinkInclusionTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ public ResourceType GetResourceTypeForController(Type? controllerType)
403403

404404
private sealed class FakeLinkGenerator : LinkGenerator
405405
{
406-
#pragma warning disable AV1553 // Do not use optional parameters with default value null for strings, collections or tasks
407406
public override string GetPathByAddress<TAddress>(HttpContext httpContext, TAddress address, RouteValueDictionary values,
408407
RouteValueDictionary? ambientValues = null, PathString? pathBase = null, FragmentString fragment = new(), LinkOptions? options = null)
409408
{
@@ -428,6 +427,5 @@ public override string GetUriByAddress<TAddress>(TAddress address, RouteValueDic
428427
{
429428
throw new NotImplementedException();
430429
}
431-
#pragma warning restore AV1553 // Do not use optional parameters with default value null for strings, collections or tasks
432430
}
433431
}

0 commit comments

Comments
 (0)