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

feat: Create Dialogporten Serviceowner client library #1831

Merged
merged 188 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 187 commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
d33461f
Squash
Fargekritt Nov 7, 2024
afa5316
Workflow test
Fargekritt Nov 25, 2024
d4b96db
Workflow
Fargekritt Nov 25, 2024
64db1f9
Workflow
Fargekritt Nov 25, 2024
cbd3e76
Workflow test
Fargekritt Nov 25, 2024
3689808
Workflow
Fargekritt Nov 25, 2024
7f17006
Nuget push workflow!
Fargekritt Nov 25, 2024
324cf3f
OI
Fargekritt Nov 25, 2024
288175c
Changed file test
Fargekritt Nov 25, 2024
e538c94
Update
Fargekritt Nov 25, 2024
7135268
Upd
Fargekritt Nov 25, 2024
2b9238b
up
Fargekritt Nov 25, 2024
a6e66b5
List all changes
Fargekritt Nov 26, 2024
eb590e1
hm
Fargekritt Nov 26, 2024
b499151
no da
Fargekritt Nov 26, 2024
f8691de
changes
Fargekritt Nov 26, 2024
ed42f73
testing again
Fargekritt Nov 26, 2024
2f613c0
oioi
Fargekritt Nov 26, 2024
71aefc8
no da!
Fargekritt Nov 26, 2024
1fb84e6
Added comments
Fargekritt Nov 26, 2024
60571b6
Workflow testing
Fargekritt Nov 27, 2024
2640a4b
funk
Fargekritt Nov 27, 2024
1f3c8b3
no da
Fargekritt Nov 27, 2024
76b5964
hm
Fargekritt Nov 27, 2024
d3062a2
no da
Fargekritt Nov 27, 2024
b09f6d4
oioi
Fargekritt Nov 27, 2024
fd8907e
Workflow maybe done
Fargekritt Nov 28, 2024
41a2eb5
Comment
Fargekritt Nov 28, 2024
1bdca4d
.NET9 adds its own base64URL, can remove the custom one
Fargekritt Nov 28, 2024
1b7f5a7
Cleaned up test
Fargekritt Nov 28, 2024
c4f5daf
Workflow test
Fargekritt Nov 28, 2024
56a5ebe
no
Fargekritt Nov 28, 2024
af4f6a3
Big finding out
Fargekritt Nov 28, 2024
708b09e
hm
Fargekritt Nov 28, 2024
4a15f4a
Clean up
Fargekritt Nov 28, 2024
3849c42
Arg
Fargekritt Nov 28, 2024
0894c17
hmm
Fargekritt Nov 28, 2024
329e8eb
Updated README.md
Fargekritt Nov 28, 2024
f46deb3
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Nov 28, 2024
2a15b37
Clean up
Fargekritt Nov 29, 2024
431cc85
Workflow cleanup
Fargekritt Nov 29, 2024
4def26a
README updated
Fargekritt Nov 29, 2024
ff1d0f8
Created Basic test structure
Fargekritt Dec 5, 2024
347d729
Added more tests. Now test Create, Path, Get, and Purge
Fargekritt Dec 5, 2024
cdee031
Test fixture
Fargekritt Dec 6, 2024
d75e113
Removed generated file from test proj to not make conflicts
Fargekritt Dec 6, 2024
054c9ce
Updated how base url is set
Fargekritt Dec 6, 2024
b85b008
Created SearchTest
Fargekritt Dec 6, 2024
457e9b7
Created Get test
Fargekritt Dec 6, 2024
81df398
Updated tests to use local nuget
Fargekritt Dec 10, 2024
020e538
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Dec 10, 2024
bf88cdc
Created UpdateTest
Fargekritt Dec 11, 2024
aac7bfa
Added deleteTest
Fargekritt Dec 11, 2024
21c9e87
Test refactor
Fargekritt Dec 11, 2024
4655774
Search multiple test
Fargekritt Dec 12, 2024
40f54fe
Multiple dialog search, and Invalid Patch test
Fargekritt Dec 12, 2024
0c663ee
Invalid Update test
Fargekritt Dec 12, 2024
5a3c578
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Dec 12, 2024
a08e486
Updated tests
Fargekritt Dec 13, 2024
e71db25
Cleanup
Fargekritt Dec 13, 2024
b96fb3b
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Dec 13, 2024
a82f91d
Updated tests
Fargekritt Dec 13, 2024
aba1aec
Cleanup
Fargekritt Dec 13, 2024
2d5dd74
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Dec 13, 2024
075854b
Comments
Fargekritt Dec 13, 2024
b952394
Update src/Digdir.Library.Dialogporten.WebApiClient/Config/Maskinport…
Fargekritt Dec 13, 2024
9fd4304
Clean up
Fargekritt Dec 13, 2024
8d6b5c0
Merge remote-tracking branch 'origin/feat/add-WepApiClient-project' i…
Fargekritt Dec 13, 2024
2b203a1
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Jan 17, 2025
e46f868
Updated Sample and RefitterInterfac
Fargekritt Jan 20, 2025
c5ae633
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Jan 20, 2025
68d65bc
* Updated comments on IDialogportenSettings
Fargekritt Jan 20, 2025
bcba03c
Updated to refitter v1.5.0
Fargekritt Jan 20, 2025
f159e5d
Removed comments
Fargekritt Jan 20, 2025
e1ae100
Clean up
Fargekritt Jan 20, 2025
8588f26
sln broken? possible from earlier merge from main
Fargekritt Jan 20, 2025
a3113dc
Added secrets to test workflow
Fargekritt Jan 20, 2025
1793fd7
hm
Fargekritt Jan 20, 2025
0299d68
test
Fargekritt Jan 20, 2025
8a72bec
Test now uses env variables
Fargekritt Jan 20, 2025
b034ddb
hm
Fargekritt Jan 20, 2025
99ef7ec
testing
Fargekritt Jan 20, 2025
d60ac48
bruh
Fargekritt Jan 20, 2025
5e5778c
oi
Fargekritt Jan 21, 2025
f20e113
Test
Fargekritt Jan 21, 2025
a3496be
nani
Fargekritt Jan 21, 2025
65da398
no da
Fargekritt Jan 21, 2025
8e7ac5b
funk
Fargekritt Jan 21, 2025
480f159
add environemnt for test
arealmaas Jan 21, 2025
40aec95
est
Fargekritt Jan 21, 2025
5b2fca1
oi
Fargekritt Jan 21, 2025
9ca5505
Wth
Fargekritt Jan 21, 2025
f21d71d
oioioi
Fargekritt Jan 21, 2025
810a809
work neow?
arealmaas Jan 21, 2025
e327f47
ay
Fargekritt Jan 21, 2025
837b133
Update tests
Fargekritt Jan 21, 2025
156d3da
Updated tests
Fargekritt Jan 21, 2025
741833a
Updated tests again
Fargekritt Jan 21, 2025
4dfbf76
gm
Fargekritt Jan 21, 2025
0025468
WebApiClient Cleanup
Fargekritt Jan 21, 2025
febc391
Sample cleanup
Fargekritt Jan 21, 2025
377cef1
m
Fargekritt Jan 21, 2025
a680681
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Jan 21, 2025
024e3cb
Updated RefitterInterface
Fargekritt Jan 21, 2025
44842d9
Build testing
Fargekritt Jan 23, 2025
199607c
test
Fargekritt Jan 23, 2025
3c0d18d
test
Fargekritt Jan 23, 2025
3c9762e
added swagger to client
Fargekritt Jan 23, 2025
acba3c3
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Jan 23, 2025
1d5d9ac
Correct configuratuin
Fargekritt Jan 23, 2025
948579b
Is it working?
Fargekritt Jan 23, 2025
fd86499
Updated SwaggerSnapshotTests to use Swaggger.json from the build of W…
Fargekritt Jan 23, 2025
00ddab2
Sorting still needed
Fargekritt Jan 23, 2025
47bfc21
Sorted swagger
Fargekritt Jan 23, 2025
025dadb
Cleanup refitterTests
Fargekritt Jan 23, 2025
a58f912
Is it done?!
Fargekritt Jan 23, 2025
74170c6
Now done probably!
Fargekritt Jan 23, 2025
c6d4a3f
Clean up
Fargekritt Jan 24, 2025
3064ea0
Clean up
Fargekritt Jan 24, 2025
2652f57
Fixes from PR
Fargekritt Jan 27, 2025
ec8fa6c
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Jan 27, 2025
08f69ca
Code rabbit changes
Fargekritt Jan 27, 2025
3f7f561
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Jan 27, 2025
4ef23e5
Removed secrets from settings
Fargekritt Jan 27, 2025
748f2bd
Removed Token
Fargekritt Jan 30, 2025
855fdf2
Updated Refitter.SourceGenerator to 1.5.2
Fargekritt Feb 3, 2025
98dc9f4
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Feb 3, 2025
d5096b9
Merged Main into branch
Fargekritt Feb 3, 2025
4f9928b
Code review
Fargekritt Feb 3, 2025
9d90fc8
PR stuff
Fargekritt Feb 6, 2025
8e41d4d
Removed find
Fargekritt Feb 6, 2025
66e7d76
Source added
Fargekritt Feb 6, 2025
ee0369e
Removed test environment from build and test
Fargekritt Feb 6, 2025
5862f65
Clean up Sample.cdproj
Fargekritt Feb 6, 2025
92fd82c
Clean up
Fargekritt Feb 6, 2025
9b9014c
PR
Fargekritt Feb 6, 2025
bb34c4a
Clean up
Fargekritt Feb 6, 2025
14b8463
Updated SwaggerSnapshotTests
Fargekritt Feb 7, 2025
7a6e048
Updated SwaggerSnapshotTests.cs
Fargekritt Feb 7, 2025
d67c967
Update tests/Digdir.Domain.Dialogporten.WebApi.Unit.Tests/Features/V1…
Fargekritt Feb 7, 2025
1c3760e
Updated DialogTokenVerifier to handle invalid tokens without throwing…
Fargekritt Feb 11, 2025
1821c44
Updated comment
Fargekritt Feb 11, 2025
5c8e550
Fixed If error
Fargekritt Feb 11, 2025
8243cbe
Saved more IL ops!
Fargekritt Feb 11, 2025
ba45bd3
Started Creating proper sample project
Fargekritt Feb 11, 2025
56e3122
public key cache thingy
Fargekritt Feb 11, 2025
41cd154
Added more checks to EdDSA cache thing
Fargekritt Feb 11, 2025
2a968f9
Clean up
Fargekritt Feb 11, 2025
8e2593d
Added Hosting?
Fargekritt Feb 11, 2025
bd9a458
Moved stuff to its own file
Fargekritt Feb 11, 2025
456c677
Now loops through all keys in respons
Fargekritt Feb 11, 2025
3d05c1b
Updated key cache service
Fargekritt Feb 11, 2025
c8cf0a4
Added EdDsaSecurityKeysCacheService as Singleton in IoC
Fargekritt Feb 12, 2025
a02c169
suggestion: Split schema check-for-changes (#1835)
oskogstad Feb 12, 2025
d7e6bd9
Stuff
Fargekritt Feb 13, 2025
a9c2565
Merge remote-tracking branch 'origin/feat/add-WepApiClient-project' i…
Fargekritt Feb 13, 2025
a407317
Merge remote-tracking branch 'origin/main' into feat/add-WepApiClient…
Fargekritt Feb 13, 2025
644ddd1
Fixes
Fargekritt Feb 13, 2025
551ed94
Cleanup
Fargekritt Feb 13, 2025
e1bd63c
CleanUp
Fargekritt Feb 13, 2025
1fb421c
Added check for if any public keys exists
Fargekritt Feb 13, 2025
c43a890
WIP
MagnusSandgren Feb 13, 2025
97bd96f
Fix format issue
MagnusSandgren Feb 13, 2025
3ce164b
WIP
MagnusSandgren Feb 13, 2025
daf7b6b
Comments and UserSecrets
Fargekritt Feb 14, 2025
6575185
WIP
MagnusSandgren Feb 14, 2025
ecbfd3d
Merge remote-tracking branch 'origin/feat/add-WepApiClient-project' i…
MagnusSandgren Feb 14, 2025
ea8a5d0
Add validation result to DialogTokenVerifier
MagnusSandgren Feb 14, 2025
af555a0
WIP
MagnusSandgren Feb 14, 2025
67b5986
Created some tests for DialogTokenValidator
Fargekritt Feb 17, 2025
e96eff3
Added more tests
Fargekritt Feb 17, 2025
18a01ca
Added Test for invalid Token
Fargekritt Feb 17, 2025
b3da291
Added more tests
Fargekritt Feb 17, 2025
948239d
Cleanup tests
Fargekritt Feb 17, 2025
9ce79c0
Remove one of the trys in DialogTokenValidator
MagnusSandgren Feb 17, 2025
a70f4d5
Added more tests
Fargekritt Feb 17, 2025
3290bbf
Added more tests
Fargekritt Feb 17, 2025
1c0e395
Validate that header and body is correctly formated json.
MagnusSandgren Feb 17, 2025
4bc3641
Clean up tests
Fargekritt Feb 17, 2025
184e60b
Removed "Sample" project
Fargekritt Feb 17, 2025
caf4833
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Feb 18, 2025
7560032
Fixed issue with multi line comment. this is a bug in refitter and wi…
Fargekritt Feb 18, 2025
b21246c
Wont push to nuget
Fargekritt Feb 18, 2025
c0e7f34
Cleanup
Fargekritt Feb 19, 2025
a8e8b8d
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Feb 19, 2025
74d4ee9
Merge branch 'main' into feat/add-WepApiClient-project
Fargekritt Feb 20, 2025
7dbd1e5
CleanUP
Fargekritt Feb 20, 2025
21b36db
Fix version thingy
Fargekritt Feb 20, 2025
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
13 changes: 12 additions & 1 deletion .github/workflows/ci-cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,21 @@ jobs:
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }}
runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}

# publish-sdk-to-nuget:
# uses: ./.github/workflows/workflow-publish-nuget.yml
# needs: [ get-current-version, generate-git-short-sha, check-for-changes ]
# if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }}
# with:
# version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }}
# path: 'src/Digdir.Library.Dialogporten.WebApiClient.csproj'
# source: 'https://api.nuget.org/v3/index.json'
# secrets:
# NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }}

publish-schema-npm:
name: Deploy schema npm package
needs: [check-for-changes, get-current-version, generate-git-short-sha, deploy-apps]
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSchemaChanges == 'true') }}
if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasGqlSchemaChanges == 'true') }}
uses: ./.github/workflows/workflow-publish-schema.yml
with:
version: ${{ needs.get-current-version.outputs.version }}-${{ needs.generate-git-short-sha.outputs.gitShortSha }}
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci-cd-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

on:
pull_request:
branches: [main]
branches: [ main ]
paths-ignore:
- "tests/k6/**"
- "CHANGELOG.md"

jobs:
generate-git-short-sha:
Expand All @@ -19,23 +18,23 @@ jobs:
check-for-changes:
name: Check for changes
uses: ./.github/workflows/workflow-check-for-changes.yml

build:
uses: ./.github/workflows/workflow-build-and-test.yml
needs: [check-for-changes]
needs: [ check-for-changes ]
if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' || needs.check-for-changes.outputs.hasTestChanges == 'true' }}

build-infrastructure:
uses: ./.github/workflows/workflow-build-infrastructure.yml
needs: [check-for-changes]
needs: [ check-for-changes ]
if: ${{ always() && needs.check-for-changes.outputs.hasInfraChanges == 'true' }}
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
with:
environment: "test"

dry-run-deploy-infra:
name: Dry run deploy infrastructure
uses: ./.github/workflows/workflow-deploy-infra.yml
Expand Down Expand Up @@ -93,7 +92,7 @@ jobs:
delete-github-deployments:
name: Delete GitHub deployments
uses: ./.github/workflows/workflow-delete-deployments.yml
needs: [dry-run-deploy-apps, dry-run-deploy-infra]
needs: [ dry-run-deploy-apps, dry-run-deploy-infra ]
if: ${{ always() && !failure() && !cancelled() }}
with:
gitSha: ${{ github.event.pull_request.head.sha }}
gitSha: ${{ github.event.pull_request.head.sha }}
13 changes: 12 additions & 1 deletion .github/workflows/ci-cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ jobs:
runMigration: ${{ needs.check-for-changes.outputs.hasMigrationChanges == 'true' }}
ref: "refs/tags/v${{ github.event.client_payload.version }}"

# publish-sdk-to-nuget:
# uses: ./.github/workflows/workflow-publish-nuget.yml
# needs: [ get-current-version, check-for-changes ]
# if: ${{ needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }}
# with:
# version: ${{ needs.get-current-version.outputs.version }}
# path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj'
# source: 'https://api.nuget.org/v3/index.json'
# secrets:
# NUGET_API_KEY: ${{ secrets.NUGET_API_TEST_KEY }}

store-apps-version:
name: Store Latest Deployed Apps Version as GitHub Variable
needs: [deploy-apps]
Expand All @@ -94,7 +105,7 @@ jobs:
publish-schema-npm:
name: Publish schema npm package
needs: [check-for-changes, deploy-apps]
if: ${{ always() && !failure() && !cancelled() && needs.check-for-changes.outputs.hasSchemaChanges == 'true' }}
if: ${{ always() && !failure() && !cancelled() && needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasGqlSchemaChanges == 'true' }}
uses: ./.github/workflows/workflow-publish-schema.yml
with:
version: ${{ github.event.client_payload.version }}
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/workflow-check-for-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ on:
hasSlackNotifierChanges:
description: "Slack Notifier function related files changed"
value: ${{ jobs.check-for-changes.outputs.hasSlackNotifierChanges }}
hasSchemaChanges:
description: "Schema has changed"
value: ${{ jobs.check-for-changes.outputs.hasSchemaChanges }}
hasSwaggerSchemaChanges:
description: "Swagger schema has changed"
value: ${{ jobs.check-for-changes.outputs.hasSwaggerSchemaChanges }}
hasGqlSchemaChanges:
description: "GraphQL schema has changed"
value: ${{ jobs.check-for-changes.outputs.hasGqlSchemaChanges }}
hasMigrationChanges:
description: "Migration related files changed"
value: ${{ jobs.check-for-changes.outputs.hasMigrationChanges }}
Expand All @@ -42,7 +45,8 @@ jobs:
hasSlackNotifierChanges: ${{ steps.filter.outputs.slackNotifier_any_modified == 'true'}}
hasBackendChanges: ${{ steps.filter-backend.outputs.backend_any_modified == 'true' }}
hasTestChanges: ${{ steps.filter-backend.outputs.tests_any_modified == 'true' }}
hasSchemaChanges: ${{ steps.filter-backend.outputs.schema_any_modified == 'true'}}
hasSwaggerSchemaChanges: ${{ steps.filter-backend.outputs.swagger_schema_any_modified == 'true'}}
hasGqlSchemaChanges: ${{ steps.filter-backend.outputs.gql_schema_any_modified == 'true'}}
hasMigrationChanges: ${{ steps.filter-backend.outputs.migration_any_modified == 'true'}}
steps:
- name: Checkout
Expand Down Expand Up @@ -75,7 +79,9 @@ jobs:
- '.azure/modules/containerApp/**/*'
tests:
- 'tests/**/*'
schema:
- 'docs/schema/V1/**/*'
swagger_schema:
- 'docs/schema/V1/swagger.verified.json'
gql_schema:
- 'docs/schema/V1/schema.verified.graphql'
migration:
- 'src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/**/*'
44 changes: 44 additions & 0 deletions .github/workflows/workflow-publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Publish nuget package"

on:
workflow_call:
inputs:
version:
description: "Version"
required: true
type: string
path:
description: "Path to project"
required: true
type: string
source:
description: "Nuget Source"
required: true
type: string
secrets:
NUGET_API_KEY:
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json

- name: Pack with debug symbols
run: dotnet pack --configuration Release -p:Version="${{ inputs.version }}" -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output . "${{ inputs.path }}"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: package
path: '*.*nupkg'

- name: Push to NuGet
run: dotnet nuget push *.nupkg --source "${{ inputs.source }}" --api-key ${{secrets.NUGET_API_KEY}}
32 changes: 31 additions & 1 deletion Digdir.Domain.Dialogporten.sln
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Tool.Dialogporten.Ed25519KeyPairGenerator", "src\Digdir.Tool.Dialogporten.Ed25519KeyPairGenerator\Digdir.Tool.Dialogporten.Ed25519KeyPairGenerator.csproj", "{030909AA-5B61-46B4-9B74-0D2D779478FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.WebApi.Integration.Tests", "tests\Digdir.Domain.Dialogporten.WebApi.Integration.Tests\Digdir.Domain.Dialogporten.WebApi.Integration.Tests.csproj", "{42004236-D45C-4A1F-9FF9-CF12B7388389}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.WebApi.Unit.Tests", "tests\Digdir.Domain.Dialogporten.WebApi.Unit.Tests\Digdir.Domain.Dialogporten.WebApi.Unit.Tests.csproj", "{42004236-D45C-4A1F-9FF9-CF12B7388389}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.GraphQL", "src\Digdir.Domain.Dialogporten.GraphQL\Digdir.Domain.Dialogporten.GraphQL.csproj", "{234FE24D-1047-4E29-A625-1EB406C37A2D}"
EndProject
Expand All @@ -61,8 +61,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Domain.Dialogporten.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Utils.AspNet", "src\Digdir.Library.Utils.AspNet\Digdir.Library.Utils.AspNet.csproj", "{6A485C65-3613-4A49-A16F-2789119F6F38}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApiClient", "WebApiClient", "{9B809C3A-B169-4599-A2D3-A25E87C510FC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient", "src\Digdir.Library.Dialogporten.WebApiClient\Digdir.Library.Dialogporten.WebApiClient.csproj", "{714FBB11-ADC0-44E8-A768-D1A59D641D31}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Tool.Dialogporten.LargeDataSetGenerator", "src\Digdir.Tool.Dialogporten.LargeDataSetGenerator\Digdir.Tool.Dialogporten.LargeDataSetGenerator.csproj", "{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.WebApiSample", "src\Digdir.Library.Dialogporten.WebApiClient.WebApiSample\Digdir.Library.Dialogporten.WebApiClient.WebApiSample.csproj", "{FBF19369-21CD-437D-BB88-CCB81EC947CF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{21A54524-CC15-42A7-804B-1E4DEBFAA1F7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApiClient", "WebApiClient", "{020E53CD-4575-44BA-81AC-26CE948EE0E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Digdir.Library.Dialogporten.WebApiClient.Unit.Tests", "tests\Digdir.Library.Dialogporten.WebApiClient.Unit.Tests\Digdir.Library.Dialogporten.WebApiClient.Unit.Tests.csproj", "{E6CBC569-6821-4DBB-A819-AC95AA8A0682}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -149,10 +161,22 @@ Global
{6A485C65-3613-4A49-A16F-2789119F6F38}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A485C65-3613-4A49-A16F-2789119F6F38}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A485C65-3613-4A49-A16F-2789119F6F38}.Release|Any CPU.Build.0 = Release|Any CPU
{714FBB11-ADC0-44E8-A768-D1A59D641D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{714FBB11-ADC0-44E8-A768-D1A59D641D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{714FBB11-ADC0-44E8-A768-D1A59D641D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
{714FBB11-ADC0-44E8-A768-D1A59D641D31}.Release|Any CPU.Build.0 = Release|Any CPU
{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671}.Release|Any CPU.Build.0 = Release|Any CPU
{FBF19369-21CD-437D-BB88-CCB81EC947CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FBF19369-21CD-437D-BB88-CCB81EC947CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBF19369-21CD-437D-BB88-CCB81EC947CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBF19369-21CD-437D-BB88-CCB81EC947CF}.Release|Any CPU.Build.0 = Release|Any CPU
{E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6CBC569-6821-4DBB-A819-AC95AA8A0682}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -181,7 +205,13 @@ Global
{0900E3CF-F9D8-4B29-957F-484B3B028D6D} = {320B47A0-5EB8-4B6E-8C84-90633A1849CA}
{E389C7C8-9610-40AC-86DC-769B1B7DC78E} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7}
{6A485C65-3613-4A49-A16F-2789119F6F38} = {096E9B69-6783-4446-A895-0B6D7729A0D9}
{9B809C3A-B169-4599-A2D3-A25E87C510FC} = {096E9B69-6783-4446-A895-0B6D7729A0D9}
{714FBB11-ADC0-44E8-A768-D1A59D641D31} = {9B809C3A-B169-4599-A2D3-A25E87C510FC}
{B0E0E9EE-AFBE-4013-908C-5F8DF66AB671} = {3C2C775D-F2D1-42A2-B53F-CC6D5FF59633}
{FBF19369-21CD-437D-BB88-CCB81EC947CF} = {9B809C3A-B169-4599-A2D3-A25E87C510FC}
{21A54524-CC15-42A7-804B-1E4DEBFAA1F7} = {CADB8189-4AA1-4732-844A-C41DBF3EC8B7}
{020E53CD-4575-44BA-81AC-26CE948EE0E7} = {21A54524-CC15-42A7-804B-1E4DEBFAA1F7}
{E6CBC569-6821-4DBB-A819-AC95AA8A0682} = {020E53CD-4575-44BA-81AC-26CE948EE0E7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B2FE67FF-7622-4AFB-AD8E-961B6A39D888}
Expand Down
2 changes: 1 addition & 1 deletion docs/schema/V1/swagger.verified.json
Original file line number Diff line number Diff line change
Expand Up @@ -7268,7 +7268,7 @@
},
"servers": [
{
"url": "https://altinn-dev-api.azure-api.net/dialogporten"
"url": "https://localhost:7214/"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public sealed class SearchDialogQuery : SortablePaginationParameter<SearchDialog

private DeletedFilter? _deleted = DeletedFilter.Exclude;
/// <summary>
/// If set to 'include', the result will include both deleted and non-deleted dialogs
/// If set to 'exclude', the result will only include non-deleted dialogs
/// If set to 'only', the result will only include deleted dialogs
/// If set to 'include', the result will include both deleted and non-deleted dialogs. If set to 'exclude', the result will only include non-deleted dialogs. If set to 'only', the result will only include deleted dialogs
/// </summary>
public DeletedFilter? Deleted
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="FastEndpoints.Swagger" Version="5.34.0"/>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
<PackageReference Include="Serilog.Sinks.OpenTelemetry" Version="4.1.1" />
<PackageReference Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="3.0.1" />
<PackageReference Include="FastEndpoints.Swagger" Version="5.34.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1" />
<PackageReference Include="NSwag.MSBuild" Version="14.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand All @@ -25,4 +29,8 @@
<ProjectReference Include="..\Digdir.Tool.Dialogporten.GenerateFakeData\Digdir.Tool.Dialogporten.GenerateFakeData.csproj" />
</ItemGroup>

<Target Name="NSwag" AfterTargets="Build" Condition="$(Configuration)=='Release'">
<Exec WorkingDirectory="$(ProjectDir)" EnvironmentVariables="ASPNETCORE_ENVIRONMENT=Development" Command="$(NSwagExe_net90) aspnetcore2openapi /nobuild:true /project:$(MSBuildProjectFullPath) /configuration:$(Configuration) /output:$(TargetDir)/swagger.json"/>
</Target>

</Project>
42 changes: 21 additions & 21 deletions src/Digdir.Domain.Dialogporten.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@ static void BuildAndRun(string[] args)
x.RemoveEmptyRequestSchema = true;
x.DocumentSettings = s =>
{
s.PostProcess = document =>
{
var dialogportenBaseUri = builder.Configuration
.GetSection(ApplicationSettings.ConfigurationSectionName)
.Get<ApplicationSettings>()!
.Dialogporten
.BaseUri
.ToString();

document.Servers.Clear();
document.Servers.Add(new OpenApiServer
{
Url = dialogportenBaseUri
});
document.Generator = null;
document.ReplaceProblemDetailsDescriptions();
document.MakeCollectionsNullable();
document.FixJwtBearerCasing();
document.RemoveSystemStringHeaderTitles();
};
s.Title = "Dialogporten";
s.DocumentName = "v1";
s.Version = "v1";
Expand Down Expand Up @@ -158,7 +178,6 @@ static void BuildAndRun(string[] args)
}

var app = builder.Build();

app.MapAspNetHealthChecks()
.MapControllers();

Expand Down Expand Up @@ -197,26 +216,7 @@ static void BuildAndRun(string[] args)
x.Errors.ResponseBuilder = ErrorResponseBuilderExtensions.ResponseBuilder;
})
.UseAddSwaggerCorsHeader()
.UseSwaggerGen(config =>
{
config.PostProcess = (document, _) =>
{
var dialogportenBaseUri = builder.Configuration
.GetSection(ApplicationSettings.ConfigurationSectionName)
.Get<ApplicationSettings>()!
.Dialogporten
.BaseUri
.ToString();

document.Servers.Clear();
document.Servers.Add(new OpenApiServer { Url = dialogportenBaseUri });
document.Generator = null;
document.ReplaceProblemDetailsDescriptions();
document.MakeCollectionsNullable();
document.FixJwtBearerCasing();
document.RemoveSystemStringHeaderTitles();
};
}, uiConfig =>
.UseSwaggerGen(uiConfig: uiConfig =>
{
// Hide schemas view
uiConfig.DefaultModelsExpandDepth = -1;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Web">


<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>750256a4-f332-4783-8802-8a7d9566f9cb</UserSecretsId>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Digdir.Library.Dialogporten.WebApiClient\Digdir.Library.Dialogporten.WebApiClient.csproj" />
</ItemGroup>

</Project>
Loading
Loading