diff --git a/.azuredevops/pipelines/build-v2.yml b/.azuredevops/pipelines/build-v2.yml
index 1b6a910..1f13d9e 100644
--- a/.azuredevops/pipelines/build-v2.yml
+++ b/.azuredevops/pipelines/build-v2.yml
@@ -22,11 +22,16 @@ resources:
- develop
- main
-
trigger:
- develop
- main
+parameters:
+ # https://github.com/microsoft/azure-pipelines-yaml/blob/master/design/runtime-parameters.md#syntax
+ - name: MockRegisterOverrideDependentImageTag
+ type: string
+ default: ' ' # default value; if no default, then the parameter MUST be given by the user at runtime
+
variables:
- group: artifacts
- name: baseSourceDirectory
@@ -41,44 +46,6 @@ jobs:
timeoutInMinutes: 120
steps:
- ###################################################################################################
- # Set obligation date container tags
- ###################################################################################################
- - task: PowerShell@2
- displayName: Update Obligation dates banking and energy
- inputs:
- targetType: 'inline'
- script: |
- $DataHolderObligationDate = "$(ObligationDate)"
- if (-not [string]::IsNullOrWhiteSpace( $DataHolderObligationDate )) {
- Write-Host "##vso[task.setvariable variable=ObligationDateTag]$DataHolderObligationDate"
- }
- else {
- Write-Host "##vso[task.setvariable variable=ObligationDateTag]23-3"
- }
- $EnergyDataHolderObligationDate = "$(EnergyObligationDate)"
- if (-not [string]::IsNullOrWhiteSpace( $EnergyDataHolderObligationDate )) {
- Write-Host "##vso[task.setvariable variable=EnergyObligationDateTag]$EnergyDataHolderObligationDate"
- }
- else {
- Write-Host "##vso[task.setvariable variable=EnergyObligationDateTag]23-3"
- }
- # Set release version variables for release tags
- - task: PowerShell@2
- displayName: 'Split release branch name'
- condition: eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/'), 'True')
- inputs:
- targetType: 'inline'
- script: |
- $branchParts = "$(Build.SourceBranchName)" -split '\.'
- # Write-Host "Branch Name: $branchParts"
- $majorVersion = $branchParts[0]
- $minorVersion = $branchParts[1]
- # Write-Host "Major Name: $majorVersion"
- Write-Host "##vso[task.setvariable variable=majorVersion]$majorVersion"
- Write-Host "##vso[task.setvariable variable=minorVersion]$minorVersion"
- Write-Host "##vso[task.setvariable variable=majorMinorVersion]$majorVersion.$minorVersion"
-
###################################################################################################
# Checkout repositories
###################################################################################################
@@ -87,6 +54,15 @@ jobs:
- checkout: git://cdr-auth-server@refs/heads/develop
persistCredentials: true
+ ###################################################################################################
+ # set the register tag to use based on the logic in the template file
+ ###################################################################################################
+ - template: set-tag-name.yml
+ parameters:
+ name: RegisterTag
+ input: ${{ parameters.MockRegisterOverrideDependentImageTag }}
+ context: $[replace(variables['Build.SourceBranch'], 'refs/heads/', '')]
+
###################################################################################################
# Unit tests
###################################################################################################
@@ -123,25 +99,34 @@ jobs:
condition: always()
################################################################################################
- # Swith AuthServer to required branch.
+ # Switch AuthServer to required branch.
################################################################################################
- powershell: |
cd cdr-auth-server
$branchRef = ""
$authServerBranch = ""
+ $AuthServerFeatureBranch = "$(AuthServerFeatureBranch)"
$SourcebranchName = "$(Build.SourceBranch)" -replace 'refs/heads/', ''
if ($SourcebranchName -match "releases/") {
$authServerBranch = "$(AuthServerReleaseBranchName)"
$branchRef = "refs/heads/$authServerBranch"
+ echo "Release Branch detected. Using $branchRef."
}
elseif ($SourcebranchName -eq "main" -or $branchName -eq "develop") {
$authServerBranch = $branchName
$branchRef = "$(Build.SourceBranch)"
+ echo "Main or Develop Branch detected. Using $branchRef."
}
+ elseif ($AuthServerFeatureBranch -ne "") {
+ $authServerBranch = $AuthServerFeatureBranch
+ $branchRef = "refs/heads/$authServerBranch"
+ echo "Feature Branch variable exists. Using $branchRef."
+ }
else {
$authServerBranch = "develop"
$branchRef = "refs/heads/develop"
+ echo "Using default branch $branchRef."
}
echo "authServerBranch - $authServerBranch and branchRef - $branchRef"
if ( git ls-remote origin $branchRef)
@@ -184,14 +169,6 @@ jobs:
###################################################################################################
# Login to ACR and pull mock solution containers
###################################################################################################
-
- # Login to ACR
- - task: Docker@2
- displayName: Login to ACR
- condition: always()
- inputs:
- command: login
- containerRegistry: $(AcrBaseUrl)
# Login to Shared ACR
- task: Docker@2
@@ -206,18 +183,11 @@ jobs:
inputs:
targetType: inline
script: |
- if [[ "$(Build.SourceBranchName)" = 'main' ]]; then
- mockRegisterContainerTag='main'
- elif [[ "$(Build.SourceBranch)" == "refs/heads/releases/"* ]]; then
- mockRegisterContainerTag=$(MockRegisterReleaseContainerTag)
- else
- mockRegisterContainerTag='develop'
- fi
- echo "SourceBranchName = $(Build.SourceBranchName) mockRegisterContainerTag=$mockRegisterContainerTag"
+ echo "SourceBranchName = $(Build.SourceBranchName) mockRegisterContainerTag=$(RegisterTag)"
- docker pull $(AcrBaseUrl).azurecr.io/mock-register:$mockRegisterContainerTag
- docker tag $(AcrBaseUrl).azurecr.io/mock-register:$mockRegisterContainerTag mock-register:latest
+ docker pull $(SharedAcrBaseUrl).azurecr.io/mock-register:$(RegisterTag)
+ docker tag $(SharedAcrBaseUrl).azurecr.io/mock-register:$(RegisterTag) mock-register:latest
# List docker images
- task: Docker@2
@@ -356,7 +326,7 @@ jobs:
docker run \
-v=$(baseSourceDirectory)/DockerCompose/_temp/mock-data-holder-banking-integration-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(baseSourceDirectory)/DockerCompose/_temp/mock-data-holder-banking-integration-tests/testresults/formatted/:/app/out/:rw \
- $(AcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MDH" --outputprefix "MDH" -o out/
+ $(SharedAcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MDH" --outputprefix "MDH" -o out/
displayName: "Run trx-formatter for Banking Integration Tests"
condition: always()
@@ -385,7 +355,7 @@ jobs:
docker run \
-v=$(baseSourceDirectory)/DockerCompose/_temp/mock-data-holder-energy-integration-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(baseSourceDirectory)/DockerCompose/_temp/mock-data-holder-energy-integration-tests/testresults/formatted/:/app/out/:rw \
- $(AcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MDHE" --outputprefix "MDHE" -o out/
+ $(SharedAcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MDHE" --outputprefix "MDHE" -o out/
displayName: "Run trx-formatter for Energy Integration Tests"
condition: always()
@@ -472,238 +442,62 @@ jobs:
###################################################################################################
# Tag images and push to ACR
###################################################################################################
-
- # mock-data-holder
- - task: Docker@2
- displayName: 'Re-Tag Mock Data Holder image with :branch-name'
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: 'mock-data-holder'
- command: tag
- arguments: 'mock-data-holder $(AcrBaseUrl).azurecr.io/mock-data-holder:$(Build.SourceBranchName)'
-
- - task: Docker@2
- displayName: 'Re-Tag Mock Data Holder image with :latest (for develop branch only)'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: 'mock-data-holder'
- command: tag
- arguments: 'mock-data-holder $(AcrBaseUrl).azurecr.io/mock-data-holder:latest'
-
- - task: Docker@2
- displayName: 'Push MDH image with :branch-name tag to ACR'
+ - task: Bash@3
+ displayName: 'Tag and push MDH images with Source Branch Name for any successful builds.'
+ condition: succeeded()
inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: mock-data-holder
- command: 'push'
- tags: |
- $(Build.SourceBranchName)
+ targetType: inline
+ script: |
+ echo Tagging mock-data-holder with Source Branch Name: $(Build.SourceBranchName)
+ docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.SourceBranchName)
- - task: Docker@2
- displayName: 'Push MDH image with :latest tag to ACR (develop branch only)'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: mock-data-holder
- command: 'push'
- tags: |
- latest
-
- # mock-data-holder-energy
- - task: Docker@2
- displayName: 'Re-Tag Mock Data Holder Energy image with :branch-name'
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: 'mock-data-holder-energy'
- command: tag
- arguments: 'mock-data-holder-energy $(AcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.SourceBranchName)'
+ echo Tagging mock-data-holder-energy with Source Branch Name: $(Build.SourceBranchName)
+ docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.SourceBranchName)
- - task: Docker@2
- displayName: 'Re-Tag Mock Data Holder Energy image with :latest (for develop branch only)'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: 'mock-data-holder-energy'
- command: tag
- arguments: 'mock-data-holder-energy $(AcrBaseUrl).azurecr.io/mock-data-holder-energy:latest'
-
- - task: Docker@2
- displayName: 'Push MDH Energy image with :branch-name tag to ACR'
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: mock-data-holder-energy
- command: 'push'
- tags: |
- $(Build.SourceBranchName)
+ echo Pushing all mock-data-holder tags to $(SharedAcrBaseUrl).azurecr.io/mock-data-holder
+ docker image push --all-tags $(SharedAcrBaseUrl).azurecr.io/mock-data-holder
- - task: Docker@2
- displayName: 'Push MDH Energy image with :latest tag to ACR (develop branch only)'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- containerRegistry: $(AcrBaseUrl)
- repository: mock-data-holder-energy
- command: 'push'
- tags: |
- latest
+ echo Pushing all mock-data-holder tags to $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy
+ docker image push --all-tags $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy
- ###################################################################################################
- # Tag images and push to Shared ACR
- ###################################################################################################
- # Pipeline variables are required : SharedAcrBaseUrl and SpSharedAcr
-
- ################################# MDH Banking tags starts ##########################################
- # mdh develop tags: latest, latest-obligationdate, buildnumber
- - task: Bash@3
- displayName: 'Re-Tags MDH image with develop tags for shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- targetType: inline
- script: |
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:develop-latest
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:develop-latest-$(ObligationDateTag)
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.BuildId)
-
- # mdh main tags: latest, latest-obligationdate, buildnumber
- - task: Bash@3
- displayName: 'Re-Tags MDH image with main tags for shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- inputs:
- targetType: inline
- script: |
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:main-latest
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:main-latest-$(ObligationDateTag)
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.BuildId)
-
- # mdh release tags
- task: Bash@3
- displayName: 'Re-Tags MDH image with release in tags for shared ACR'
- condition: eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/'), 'True')
+ displayName: 'Tag and Push MDH images for develop, main and release branches.'
+ condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/develop'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/')))
inputs:
targetType: inline
script: |
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.SourceBranchName)
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.SourceBranchName)-$(ObligationDateTag)
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(majorMinorVersion)
- docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(majorVersion)
- ################################# MDH Banking tags ends ##########################################
-
- ################################# MDH Energy tags starts ##########################################
- # mdh energy develop tags: latest, latest-obligationdate, buildnumber
- - task: Bash@3
- displayName: 'Re-Tags MDH energy image with develop tags for shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- targetType: inline
- script: |
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:develop-latest
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:develop-latest-$(EnergyObligationDateTag)
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.BuildId)
-
- # mdh energy main tags: latest, latest-obligationdate, buildnumber
- - task: Bash@3
- displayName: 'Re-Tags MDH energy image with main tags for shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- inputs:
- targetType: inline
- script: |
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:main-latest
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:main-latest-$(EnergyObligationDateTag)
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.BuildId)
-
- # mdh energy release tags
- - task: Bash@3
- displayName: 'Re-Tags MDH energy image with release tags for shared ACR'
- condition: eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/'), 'True')
- inputs:
- targetType: inline
- script: |
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.SourceBranchName)
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.SourceBranchName)-$(EnergyObligationDateTag)
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(majorMinorVersion)
- docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(majorVersion)
- ################################# MDH Energy tags ends ##########################################
-
- ########################### MDH Banking tags push starts ##########################################
- # Push banking image develop tags to Shared ACR
- - task: Docker@2
- displayName: 'Push banking develop tags to Shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- containerRegistry: $(SpSharedAcr)
- repository: mock-data-holder
- command: 'push'
- tags: |
- develop-latest
- develop-latest-$(ObligationDateTag)
- $(Build.BuildId)
+ echo Tagging mock-data-holder with latest tag
+ docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:latest
- # Push banking image main tags to Shared ACR
- - task: Docker@2
- displayName: 'Push banking main tags to Shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- inputs:
- containerRegistry: $(SpSharedAcr)
- repository: mock-data-holder
- command: 'push'
- tags: |
- main-latest
- main-latest-$(ObligationDateTag)
- $(Build.BuildId)
-
- # Push banking image release tags to Shared ACR
- - task: Docker@2
- displayName: 'Push banking release tags to Shared ACR'
- condition: eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/'), 'True')
- inputs:
- containerRegistry: $(SpSharedAcr)
- repository: mock-data-holder
- command: 'push'
- tags: |
- $(Build.SourceBranchName)
- $(Build.SourceBranchName)-$(ObligationDateTag)
- $(majorMinorVersion)
- $(majorVersion)
- ########################### MDH Banking tags push ends ##########################################
-
- ########################### MDH Energy tags push starts ##########################################
- # Push energy image develop tags to Shared ACR
- - task: Docker@2
- displayName: 'Push energy develop tags to Shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
- inputs:
- containerRegistry: $(SpSharedAcr)
- repository: mock-data-holder-energy
- command: 'push'
- tags: |
- develop-latest
- develop-latest-$(EnergyObligationDateTag)
- $(Build.BuildId)
-
- # Push energy image main tags to Shared ACR
- - task: Docker@2
- displayName: 'Push energy main tags to Shared ACR'
- condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
- inputs:
- containerRegistry: $(SpSharedAcr)
- repository: mock-data-holder-energy
- command: 'push'
- tags: |
- main-latest
- main-latest-$(EnergyObligationDateTag)
- $(Build.BuildId)
-
- # Push energy image release tags to Shared ACR
- - task: Docker@2
- displayName: 'Push energy release tags to Shared ACR'
- condition: eq(startsWith(variables['Build.SourceBranch'], 'refs/heads/releases/'), 'True')
- inputs:
- containerRegistry: $(SpSharedAcr)
- repository: mock-data-holder-energy
- command: 'push'
- tags: |
- $(Build.SourceBranchName)
- $(Build.SourceBranchName)-$(EnergyObligationDateTag)
- $(majorMinorVersion)
- $(majorVersion)
- ########################### MDH Energy tags push ends ##########################################
\ No newline at end of file
+ echo Tagging mock-data-holder-energy with latest tag
+ docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:latest
+
+ echo Tagging mock-data-holder with Source Branch Name-latest: $(Build.SourceBranchName)-latest
+ docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.SourceBranchName)-latest
+
+ echo Tagging mock-data-holder-energy with Source Branch Name-latest: $(Build.SourceBranchName)-latest
+ docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.SourceBranchName)-latest
+
+
+ if [ -n "$(ObligationDate)" ]; then
+ echo Tagging mock-data-holder with obligation date: $(Build.SourceBranchName)-$(ObligationDate)
+ docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.SourceBranchName)-$(ObligationDate)
+ fi
+
+ if [ -n "$(EnergyObligationDate)" ]; then
+ echo Tagging mock-data-holder-energy with obligation date: $(Build.SourceBranchName)-$(EnergyObligationDate)
+ docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.SourceBranchName)-$(EnergyObligationDate)
+ fi
+
+ echo Tagging mock-data-holder with build id: $(Build.BuildId)
+ docker tag mock-data-holder $(SharedAcrBaseUrl).azurecr.io/mock-data-holder:$(Build.BuildId)
+
+ echo Tagging mock-data-holder-energy with build id: $(Build.BuildId)
+ docker tag mock-data-holder-energy $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy:$(Build.BuildId)
+
+
+ echo Pushing all mock-data-holder tags to $(SharedAcrBaseUrl).azurecr.io/mock-data-holder
+ docker image push --all-tags $(SharedAcrBaseUrl).azurecr.io/mock-data-holder
+
+ echo Pushing all mock-data-holder tags to $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy
+ docker image push --all-tags $(SharedAcrBaseUrl).azurecr.io/mock-data-holder-energy
\ No newline at end of file
diff --git a/.azuredevops/pipelines/code-scanning.yml b/.azuredevops/pipelines/code-scanning.yml
new file mode 100644
index 0000000..ea3fe11
--- /dev/null
+++ b/.azuredevops/pipelines/code-scanning.yml
@@ -0,0 +1,24 @@
+resources:
+ repositories:
+ - repository: shared-code-scanning
+ type: git
+ name: Common/shared-code-scanning
+ ref: refs/heads/main
+ trigger: none
+
+schedules:
+- cron: '0 17 * * 0' # Run at 17:00 Sunday night UTC (03:00+10:00 Monday Morning)
+ displayName: 'Weekly code scan'
+ branches:
+ include:
+ - develop
+ always: true
+
+# Disable standard CI build
+trigger: none
+
+pool:
+ vmImage: 'ubuntu-latest'
+
+extends:
+ template: pipeline-templates/code-scanning.yml@shared-code-scanning
\ No newline at end of file
diff --git a/.azuredevops/pipelines/set-tag-name.yml b/.azuredevops/pipelines/set-tag-name.yml
new file mode 100644
index 0000000..2d7fcab
--- /dev/null
+++ b/.azuredevops/pipelines/set-tag-name.yml
@@ -0,0 +1,33 @@
+parameters:
+ - name: name # Name of the variable to set
+ type: string
+ - name: input
+ type: string
+ default: ''
+ - name: context
+ type: string # e.g., $(Build.SourceBranchName)
+
+steps:
+- powershell: |
+ $input = "${{ parameters.input }}"
+ $context = "${{ parameters.context }}"
+ $varName = "${{ parameters.name }}"
+
+ Write-Host "Setting variable: $varName"
+ Write-Host "Input provided: $input"
+ Write-Host "Context: $context"
+
+ if (-not [string]::IsNullOrWhiteSpace($input)) {
+ Write-Host "##vso[task.setvariable variable=$varName]$input"
+ Write-Host "Used provided value for ${varName}: ${input}"
+ } else {
+ switch -Wildcard ($context) {
+ "main" { $value = "main-latest" }
+ "develop" { $value = "develop-latest" }
+ "*release*" { $value = "main-latest" }
+ default { $value = "develop-latest" }
+ }
+ Write-Host "Resolved ${varName} to: ${value}"
+ Write-Host "##vso[task.setvariable variable=$varName]$value"
+ }
+ displayName: 'Set ${{ parameters.name }} variable'
diff --git a/.azuredevops/pull_request_template.md b/.azuredevops/pull_request_template.md
index 0c8d12c..0b62ba5 100644
--- a/.azuredevops/pull_request_template.md
+++ b/.azuredevops/pull_request_template.md
@@ -1,27 +1,16 @@
-**Checklist:** (Put an `x` in all the boxes that apply)
-- [ ] My code follows the code style of this project.
-- [ ] I have set this Pull Request to Auto Complete with the delete source branch option selected.
-- [ ] Commented out code has been removed or will be removed.
-- [ ] I have updated the documentation accordingly.
-- [ ] I have added tests to cover my changes.
-- [ ] All new and existing tests passed.
-- [ ] I have updated the `CHANGELOG.md` file as appropriate.
-
-
-**What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
-
-
+**What is the new behaviour?**
-**What is the current behavior?** (You can also link to an open issue here)
+(if this is a feature change)
+**Does this PR introduce a breaking change?**
-**What is the new behavior?** (if this is a feature change)
-
-
-
-**Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
+(What changes might users need to make in their application due to this PR?)
**Other information**:
+
+**Checklist:** (Put an `x` in all the boxes that apply)
+- [ ] I have set this Pull Request to auto complete with the delete source branch option selected.
+- [ ] I have updated the documentation in confluence or relevant readme.md text accordingly.
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3b8d6a0..a4dad78 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [4.0.1] - 2025-06-19
+
+### Changed
+- Fixed multiple build warnings to improve code quality and maintainability
+
## [4.0.0] - 2025-03-19
### Changed
- Updated NuGet packages.
diff --git a/Help/container/HELP.md b/Help/container/HELP.md
index 51b1c5a..11d5f6b 100644
--- a/Help/container/HELP.md
+++ b/Help/container/HELP.md
@@ -136,7 +136,7 @@ docker build -f Dockerfile --target Energy -t mock-data-holder-energy .
Run the SQL Server image.
```
-docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2022-latest
+docker run -d -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Pa{}w0rd2019" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2022-latest
```
Run a new Banking docker container.
```
diff --git a/README.md b/README.md
index 945aec0..7d3966e 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@

-[](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#introduction)
+[](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction)
[](https://www.cdr.gov.au/for-providers/conformance-test-suite-data-holders)
[](https://openid.net/specs/openid-financial-api-part-2-1_0.html)
[](https://dotnet.microsoft.com/)
@@ -17,7 +17,7 @@ The Mock Data Holder solution can be configured for Banking or Energy industries
## Mock Data Holder - Alignment
The Mock Data Holder:
-* aligns to [v1.33.0](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#introduction) of the [Consumer Data Standards](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#introduction) in particular [FAPI 1.0 Migration Phase 3](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#introduction) with backwards compatibility to Migration Phase 2;
+* aligns to [v1.34.0](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) of the [Consumer Data Standards](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) in particular [FAPI 1.0 Migration Phase 3](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) with backwards compatibility to Migration Phase 2;
* has passed v5.2.0 of the [Conformance Test Suite for Data Holders](https://www.cdr.gov.au/for-providers/conformance-test-suite-data-holders); and
* is compliant with the [FAPI 1.0 Advanced Profile](https://openid.net/specs/openid-financial-api-part-2-1_0.html).
@@ -138,16 +138,16 @@ The [docker compose file](./Source/DockerCompose/docker-compose.yml) can be used
To get help on launching and debugging the solutions as containers and switching out your solution(s), see the [help guide](./Help/container/HELP.md).
## Mock Data Holder - Requirements
-Data Holders require these core functions defined in the [Consumer Data Standards](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#introduction) to operate in the [Consumer Data Right](https://www.cdr.gov.au/):
-- Identity Provider for [authentication and authorisation](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#security-profile). Compliant with OAuth and [FAPI 1.0 Advanced Profile](https://openid.net/specs/openid-financial-api-part-2-1_0.html).
-- [Dynamic Client Registration](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#dcr-apis) to allow clients to register their Software Products.
-- Data Recipient and Software Product metadata updates using the [Register APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#register-apis).
+Data Holders require these core functions defined in the [Consumer Data Standards](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#introduction) to operate in the [Consumer Data Right](https://www.cdr.gov.au/):
+- Identity Provider for [authentication and authorisation](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#security-profile). Compliant with OAuth and [FAPI 1.0 Advanced Profile](https://openid.net/specs/openid-financial-api-part-2-1_0.html).
+- [Dynamic Client Registration](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#dcr-apis) to allow clients to register their Software Products.
+- Data Recipient and Software Product metadata updates using the [Register APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#register-apis).
- Industry specific data (one of)
- - [Banking APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#banking-apis).
- - [Energy APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#energy-apis)
+ - [Banking APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#banking-apis).
+ - [Energy APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#energy-apis)
- Industry agnostic data
- - [Common APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#common-apis).
-- [Metrics and metadata update requests](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.33.0/#admin-apis).
+ - [Common APIs](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#common-apis).
+- [Metrics and metadata update requests](https://consumerdatastandardsaustralia.github.io/standards-archives/standards-1.34.0/#admin-apis).
The Mock Data Holder combined with the [Authorisation Server](https://github.com/ConsumerDataRight/authorisation-server) provides all of these functions for the Banking and Energy industries. The below diagram provides a view of the Mock Data Holder and and Authorisation Server when opened in an integrated development environment.
diff --git a/Source/.editorconfig b/Source/.editorconfig
index b4471e6..b499927 100644
--- a/Source/.editorconfig
+++ b/Source/.editorconfig
@@ -202,87 +202,12 @@ dotnet_diagnostic.SA1208.severity = none
# field should not follow class
dotnet_diagnostic.SA1201.severity = none
-#Maintainability
-
-# S2325: Methods and properties that don't access instance data should be static
+######################################################
+# Any project specific rules must go in this section #
+######################################################
+[Startup.cs]
+# Make Configure and ConfigureServices static method
dotnet_diagnostic.S2325.severity = none
-
-[*.cs]
-# Disable xUnit1013 warning
-dotnet_diagnostic.xUnit1013.severity = none
-csharp_prefer_system_threading_lock = true:suggestion
-#region should not be located within a code element
-dotnet_diagnostic.SA1123.severity = none
-dotnet_diagnostic.SA1601.severity = none
-dotnet_diagnostic.SA1616.severity = none
-dotnet_diagnostic.SA1108.severity = none
-
-# A multi-line initializer in a C# code file should use a comma on the last line.
-dotnet_diagnostic.SA1413.severity = none
-
-[Meta.cs]
-# Remove this empty class, write its code or make it an "interface".
-dotnet_diagnostic.S2094.severity = none
-
-[US15350_MDH_BankingAPI_GetTransactions.cs]
-# Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)
-dotnet_diagnostic.S1135.severity = none
-
-[Account.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[Customer.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[Person.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[EnergyAccount.cs]
-# Classes should not be empty
-dotnet_diagnostic.S2094.severity = none
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[EnergyConcession.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[EnergyAccountConcession.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[EnergyAccountPlan.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[US27571_MDH_EnergyAPI_GetAccounts.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[US12975_MDH_BankingAPI_GetAccounts.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-[CommonPerson.cs]
-# A closing square bracket within a C# statement is not spaced correctly.(There is an issue with identifying nullable array properties.)
-dotnet_diagnostic.SA1011.severity = none
-
-
-[AesEncryptor.cs]
-# A closing parenthesis within a C# statement is not spaced correctly.
-dotnet_diagnostic.SA1009.severity = none
-# Some cryptographic factory methods are obsolete
-dotnet_diagnostic.SYSLIB0045.severity = none
-
-# These are Auth Server files that needs removing once they are fixed. The issue happens when the Auth Server is copied to MDH for building.
-[ClientClaims.{cs}]
-dotnet_diagnostic.CS8618.severity = silent
-[SoftwareProductConfiguration.{cs}]
-dotnet_diagnostic.S1075.severity = silent
-[ClientRepository.{cs}]
-dotnet_diagnostic.S2139.severity = silent
-[GrantRepository.{cs}]
-dotnet_diagnostic.S2139.severity = silent
\ No newline at end of file
+[*Tests.cs]
+# Make Configure and ConfigureServices static method
+dotnet_diagnostic.S2325.severity = none
\ No newline at end of file
diff --git a/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj b/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj
index 0cf9cd1..d0c432c 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj
+++ b/Source/Banking/CDR.DataHolder.Banking.Domain/CDR.DataHolder.Banking.Domain.csproj
@@ -17,7 +17,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Banking/CDR.DataHolder.Banking.Domain/Entities/Account.cs b/Source/Banking/CDR.DataHolder.Banking.Domain/Entities/Account.cs
index 15a68cd..ca4aa12 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Domain/Entities/Account.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Domain/Entities/Account.cs
@@ -1,4 +1,6 @@
-namespace CDR.DataHolder.Banking.Domain.Entities
+using System;
+
+namespace CDR.DataHolder.Banking.Domain.Entities
{
public class Account : Shared.Domain.Entities.Account
{
diff --git a/Source/Banking/CDR.DataHolder.Banking.Domain/ValueObjects/AccountProductCategory.cs b/Source/Banking/CDR.DataHolder.Banking.Domain/ValueObjects/AccountProductCategory.cs
index 2895c62..a997bb4 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Domain/ValueObjects/AccountProductCategory.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Domain/ValueObjects/AccountProductCategory.cs
@@ -46,6 +46,6 @@ public enum ProductCategory
TermDeposits = 9,
TradeFinance = 10,
TransAndSavingsAccounts = 11,
- TravelCards = 12
+ TravelCards = 12,
}
}
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/BankingResourceRepository.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/BankingResourceRepository.cs
index f2796c0..6bf186b 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/BankingResourceRepository.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/BankingResourceRepository.cs
@@ -140,7 +140,6 @@ public async Task CanAccessAccount(string accountId)
/// Query filter.
/// Page number.
/// Page size.
- ///
public async Task> GetAccountTransactions(AccountTransactionsFilter transactionsFilter, int page, int pageSize)
{
if (!transactionsFilter.NewestTime.HasValue)
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj b/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj
index 5ff6f5f..0f20338 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/CDR.DataHolder.Banking.Repository.csproj
@@ -9,19 +9,19 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20211014000617_InitSqlDb.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20211014000617_InitSqlDb.cs
index 0d728db..5c10375 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20211014000617_InitSqlDb.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20211014000617_InitSqlDb.cs
@@ -3,6 +3,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Initial database creation migration script.
+ ///
public partial class InitSqlDb : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -15,7 +18,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
LegalEntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Industry = table.Column(type: "nvarchar(10)", maxLength: 4, nullable: false),
Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
- LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true)
+ LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
},
constraints: table =>
{
@@ -41,7 +44,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
OrganisationType = table.Column(type: "nvarchar(max)", nullable: true),
RegisteredCountry = table.Column(type: "nvarchar(3)", maxLength: 3, nullable: true),
EstablishmentDate = table.Column(type: "datetime2", nullable: true),
- LastUpdateTime = table.Column(type: "datetime2", nullable: true)
+ LastUpdateTime = table.Column(type: "datetime2", nullable: true),
},
constraints: table =>
{
@@ -60,7 +63,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
Suffix = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
OccupationCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true),
OccupationCodeVersion = table.Column(type: "nvarchar(max)", nullable: true),
- LastUpdateTime = table.Column(type: "datetime2", nullable: true)
+ LastUpdateTime = table.Column(type: "datetime2", nullable: true),
},
constraints: table =>
{
@@ -75,7 +78,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
BrandName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
- LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false)
+ LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false),
},
constraints: table =>
{
@@ -96,7 +99,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
LoginId = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false),
CustomerUType = table.Column(type: "nvarchar(max)", nullable: true),
PersonId = table.Column(type: "uniqueidentifier", nullable: true),
- OrganisationId = table.Column(type: "uniqueidentifier", nullable: true)
+ OrganisationId = table.Column(type: "uniqueidentifier", nullable: true),
},
constraints: table =>
{
@@ -124,7 +127,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
SoftwareProductDescription = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
- BrandId = table.Column(type: "uniqueidentifier", nullable: false)
+ BrandId = table.Column(type: "uniqueidentifier", nullable: false),
},
constraints: table =>
{
@@ -149,7 +152,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
CustomerId = table.Column(type: "uniqueidentifier", nullable: false),
MaskedName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
ProductCategory = table.Column(type: "nvarchar(max)", nullable: true),
- ProductName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ ProductName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
},
constraints: table =>
{
@@ -182,7 +185,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
BillerName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
Crn = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
ApcaNumber = table.Column(type: "nvarchar(6)", maxLength: 6, nullable: true),
- AccountId = table.Column(type: "nvarchar(100)", nullable: true)
+ AccountId = table.Column(type: "nvarchar(100)", nullable: true),
},
constraints: table =>
{
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220217233128_RemoveIndustry.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220217233128_RemoveIndustry.cs
index ac08ec0..ab68b30 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220217233128_RemoveIndustry.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220217233128_RemoveIndustry.cs
@@ -4,6 +4,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Remove industry column migration script.
+ ///
public partial class RemoveIndustry : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220422001112_LogEventsManageAPI.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220422001112_LogEventsManageAPI.cs
index 5f09996..d13cf5c 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220422001112_LogEventsManageAPI.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220422001112_LogEventsManageAPI.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// LogEventsManageAPI creation migration script.
+ ///
public partial class LogEventsManageAPI : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -23,7 +26,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
ProcessName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
ThreadId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
MethodName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true)
+ SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
},
constraints: table =>
{
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220504032535_LogEventsDrService.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220504032535_LogEventsDrService.cs
index 41fe5ee..dcd764b 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220504032535_LogEventsDrService.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20220504032535_LogEventsDrService.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// LogEventsDrService creation migration script.
+ ///
public partial class LogEventsDrService : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -23,7 +26,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
ProcessName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
ThreadId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
MethodName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true)
+ SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
},
constraints: table =>
{
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230130223325_RemoveSoftwareProduct.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230130223325_RemoveSoftwareProduct.cs
index 995e692..6fcf5e7 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230130223325_RemoveSoftwareProduct.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230130223325_RemoveSoftwareProduct.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Remove SoftwareProduct table migration script.
+ ///
public partial class RemoveSoftwareProduct : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -24,7 +27,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
SoftwareProductDescription = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
SoftwareProductName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false)
+ Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
},
constraints: table =>
{
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230131005002_RemoveLegalEntityAndBrand.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230131005002_RemoveLegalEntityAndBrand.cs
index 25d39d8..be63a54 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230131005002_RemoveLegalEntityAndBrand.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20230131005002_RemoveLegalEntityAndBrand.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Remove LegalEntity and Brand tables migration script.
+ ///
public partial class RemoveLegalEntityAndBrand : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -25,7 +28,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false),
LegalEntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
- Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false)
+ Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
},
constraints: table =>
{
@@ -40,7 +43,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false),
BrandName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
- Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false)
+ Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
},
constraints: table =>
{
diff --git a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20231101075114_SetOpenStatusLength.cs b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20231101075114_SetOpenStatusLength.cs
index 3fb3153..2de2115 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20231101075114_SetOpenStatusLength.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Repository/Migrations/20231101075114_SetOpenStatusLength.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Set OpenStatus length migration script.
+ ///
public partial class SetOpenStatusLength : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/AccountTransactionsTests.cs b/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/AccountTransactionsTests.cs
index f471fbb..cff54da 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/AccountTransactionsTests.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/AccountTransactionsTests.cs
@@ -81,7 +81,7 @@ public async Task GetTransactions_TimeFilter_Success()
new Claim(ClaimTypes.NameIdentifier, customerId),
new Claim("software_id", softwareProductId),
new Claim("client_id", Guid.NewGuid().ToString()),
- new Claim("account_id", accountId)
+ new Claim("account_id", accountId),
},
"mock"));
@@ -89,7 +89,7 @@ public async Task GetTransactions_TimeFilter_Success()
var controllerContext = new ControllerContext(actionContext)
{
- HttpContext = httpContext
+ HttpContext = httpContext,
};
var controller = new ResourceController(resourceRepository, config, It.IsAny(), logger, transactionsService, idPermanenceManager);
@@ -103,7 +103,7 @@ public async Task GetTransactions_TimeFilter_Success()
OldestTime = new DateTime(2021, 4, 01, 0, 0, 0, DateTimeKind.Utc),
NewestTime = new DateTime(2021, 4, 30, 0, 0, 0, DateTimeKind.Utc),
Page = "1",
- PageSize = "10"
+ PageSize = "10",
}) as OkObjectResult;
var response = result?.Value as PageModel;
@@ -159,7 +159,7 @@ public async Task GetTransactions_AmountFilter_Success()
new Claim(ClaimTypes.NameIdentifier, "4EE1A8DB-13AF-44D7-B54B-E94DFF3DF548"),
new Claim("software_id", "c6327f87-687a-4369-99a4-eaacd3bb8210"),
new Claim("client_id", Guid.NewGuid().ToString()),
- new Claim("account_id", accountId)
+ new Claim("account_id", accountId),
},
"mock"));
@@ -167,7 +167,7 @@ public async Task GetTransactions_AmountFilter_Success()
var controllerContext = new ControllerContext(actionContext)
{
- HttpContext = httpContext
+ HttpContext = httpContext,
};
var controller = new ResourceController(resourceRepository, config, It.IsAny(), logger, transactionsService, idPermanenceManager);
@@ -183,7 +183,7 @@ public async Task GetTransactions_AmountFilter_Success()
OldestTime = new DateTime(2021, 4, 01, 0, 0, 0, DateTimeKind.Utc),
NewestTime = new DateTime(2021, 6, 01, 0, 0, 0, DateTimeKind.Utc),
Page = "1",
- PageSize = "10"
+ PageSize = "10",
}) as OkObjectResult;
var response = result?.Value as PageModel;
diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj b/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj
index 8c3c832..e584fe7 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj
+++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API.UnitTests/CDR.DataHolder.Banking.Resource.API.UnitTests.csproj
@@ -54,13 +54,13 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj b/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj
index 81992a1..c6edcc9 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj
+++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API/CDR.DataHolder.Banking.Resource.API.csproj
@@ -35,12 +35,12 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API/Controllers/ResourceController.cs b/Source/Banking/CDR.DataHolder.Banking.Resource.API/Controllers/ResourceController.cs
index 835212a..a18dea9 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Resource.API/Controllers/ResourceController.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API/Controllers/ResourceController.cs
@@ -99,7 +99,7 @@ public async Task GetAccountsV2(
var idParameters = new IdPermanenceParameters
{
SoftwareProductId = softwareProductId ?? string.Empty,
- CustomerId = loginId
+ CustomerId = loginId,
};
_idPermanenceManager.EncryptIds(response.Data.Accounts, idParameters, a => a.AccountId);
@@ -135,7 +135,7 @@ public async Task GetTransactions([FromQuery] RequestAccountTrans
var idParameters = new IdPermanenceParameters
{
SoftwareProductId = softwareProductId ?? string.Empty,
- CustomerId = loginId
+ CustomerId = loginId,
};
request.AccountId = DecryptAccountId(request.AccountId, idParameters);
diff --git a/Source/Banking/CDR.DataHolder.Banking.Resource.API/Startup.cs b/Source/Banking/CDR.DataHolder.Banking.Resource.API/Startup.cs
index 814c5b4..1dded76 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Resource.API/Startup.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Resource.API/Startup.cs
@@ -170,17 +170,17 @@ private static void AddAuthenticationAuthorization(IServiceCollection services,
In = ParameterLocation.Header,
Scheme = "Bearer",
Type = SecuritySchemeType.ApiKey,
- BearerFormat = "JWT"
+ BearerFormat = "JWT",
});
c.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
- Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
+ Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" },
},
new List()
- }
+ },
});
});
}
diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj
index af93149..6c0e0a5 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj
+++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/CDR.DataHolder.Banking.Tests.IntegrationTests.csproj
@@ -56,13 +56,13 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Helpers.cs b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Helpers.cs
index 83b90b2..5d8ddc6 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Helpers.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Helpers.cs
@@ -26,7 +26,7 @@ public static void ExtractClaimsFromToken(string? accessToken, out string loginI
new SubPermanenceParameters
{
SoftwareProductId = softwareProductId,
- SectorIdentifierUri = Constants.SoftwareProducts.SoftwareProductSectorIdentifierUri
+ SectorIdentifierUri = Constants.SoftwareProducts.SoftwareProductSectorIdentifierUri,
},
Constants.IdPermanence.IdPermanencePrivateKey);
}
diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Initializer.cs b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Initializer.cs
index 74b80c5..0667053 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Initializer.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/Initializer.cs
@@ -37,4 +37,4 @@ public Initializer(IMessageSink messageSink)
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs
index dbc9670..c2539ca 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs
@@ -88,7 +88,7 @@ private static string GetExpectedResponse(string? accessToken, string dhMtlsGate
prefix = customer.Person?.Prefix,
suffix = customer.Person?.Suffix,
occupationCode = customer.Person?.OccupationCode,
- occupationCodeVersion = customer.Person?.OccupationCodeVersion
+ occupationCodeVersion = customer.Person?.OccupationCodeVersion,
}
: null,
organisation = customer.CustomerUType?.ToLower() == "organisation" ? new
@@ -107,16 +107,16 @@ private static string GetExpectedResponse(string? accessToken, string dhMtlsGate
industryCodeVersion = customer.Organisation?.IndustryCodeVersion,
organisationType = customer.Organisation?.OrganisationType,
registeredCountry = customer.Organisation?.RegisteredCountry,
- establishmentDate = customer.Organisation?.EstablishmentDate.GetValueOrDefault().ToString("yyyy-MM-dd")
+ establishmentDate = customer.Organisation?.EstablishmentDate.GetValueOrDefault().ToString("yyyy-MM-dd"),
}
: null,
})
.FirstOrDefault(),
links = new
{
- self = $"{dhMtlsGatewayUrl}/cds-au/v1/common/customer"
+ self = $"{dhMtlsGatewayUrl}/cds-au/v1/common/customer",
},
- meta = new { }
+ meta = new { },
};
return JsonConvert.SerializeObject(
@@ -124,7 +124,7 @@ private static string GetExpectedResponse(string? accessToken, string dhMtlsGate
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
- Formatting = Formatting.Indented
+ Formatting = Formatting.Indented,
});
}
diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12975_MDH_BankingAPI_GetAccounts.cs b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12975_MDH_BankingAPI_GetAccounts.cs
index 89cb3d1..aafe028 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12975_MDH_BankingAPI_GetAccounts.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US12975_MDH_BankingAPI_GetAccounts.cs
@@ -486,7 +486,7 @@ public async Task ACX02_GetAccountsMultipleTimes_ShouldRespondWith_SameEncrypted
}
}
- private static (string, int) GetExpectedResponse(
+ private static (string ExpectedResponse, int TotalRecords) GetExpectedResponse(
string? accessToken,
string baseUrl,
string selfUrl,
@@ -520,7 +520,7 @@ private static (string, int) GetExpectedResponse(
maskedNumber = account.MaskedName,
productCategory = account.ProductCategory,
productName = account.ProductName,
- accountOwnership = account.AccountOwnership
+ accountOwnership = account.AccountOwnership,
})
.ToList();
@@ -559,15 +559,15 @@ private static (string, int) GetExpectedResponse(
meta = new
{
totalRecords,
- totalPages
- }
+ totalPages,
+ },
};
return (
JsonConvert.SerializeObject(expectedResponse, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
- Formatting = Formatting.Indented
+ Formatting = Formatting.Indented,
}),
totalRecords);
}
diff --git a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US15350_MDH_BankingAPI_GetTransactions.cs b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US15350_MDH_BankingAPI_GetTransactions.cs
index 3a5f3cc..7e1fc7b 100644
--- a/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US15350_MDH_BankingAPI_GetTransactions.cs
+++ b/Source/Banking/CDR.DataHolder.Banking.Tests.IntegrationTests/US15350_MDH_BankingAPI_GetTransactions.cs
@@ -284,12 +284,11 @@ public async Task AC20_Get_WithNoAccessToken_ShouldRespondWith_401Unauthorised(T
}
#pragma warning disable xUnit1004
- [Theory(Skip = "This test is accurate but is failing due to a bug. Prefer to skip it for now rather than test for incorrect behaviour")]
+ [Theory(Skip = "This test is accurate but is failing due to a bug (Bug 63702). Prefer to skip it for now rather than test for incorrect behaviour")]
[InlineData(SoftwareProductStatus.INACTIVE)]
[InlineData(SoftwareProductStatus.REMOVED)]
public async Task AC21_Get_WithADRSoftwareProductNotActive_ShouldRespondWith_403Forbidden_NotActiveErrorResponse(SoftwareProductStatus status)
{
- // TODO: This is failing, but the test is correct. The old test checked for a 200Ok and we may need to do that in the short term to get the test passing (or skip it). Bug 63702
var saveStatus = _sqlQueryService.GetStatus(EntityType.SOFTWAREPRODUCT, Constants.SoftwareProducts.SoftwareProductId);
_sqlQueryService.SetStatus(EntityType.SOFTWAREPRODUCT, Constants.SoftwareProducts.SoftwareProductId, status.ToEnumMemberAttrValue());
try
@@ -303,7 +302,6 @@ public async Task AC21_Get_WithADRSoftwareProductNotActive_ShouldRespondWith_403
}
#pragma warning restore xUnit1004
- // TODO: AC22 is missing tests
[Theory]
[InlineData(LegalEntityStatus.ACTIVE)]
public async Task AC23_Get_WithADRParticipationActive_Success(LegalEntityStatus status)
@@ -328,7 +326,6 @@ public async Task AC23_Get_WithADRParticipationActive_Success(LegalEntityStatus
[InlineData(LegalEntityStatus.REMOVED)]
public async Task AC23_Get_WithADRParticipationNotActive_ShouldRespondWith_403Forbidden_NotActiveErrorResponse(LegalEntityStatus status)
{
- // TODO: This is failing, but the test is correct. Raise a bug
var saveStatus = _sqlQueryService.GetStatus(EntityType.LEGALENTITY, Constants.LegalEntities.LegalEntityId);
_sqlQueryService.SetStatus(EntityType.LEGALENTITY, Constants.LegalEntities.LegalEntityId, status.ToEnumMemberAttrValue());
try
@@ -472,7 +469,7 @@ public async Task ACX01_Get_WhenConsumerDidGrantConsentToAccount_Success(
}
#pragma warning disable xUnit1004
- [Theory(Skip = "This test case matches current requirements but has identified a bug, so we are skipping it until the bug is resolved")]
+ [Theory(Skip = "This test case matches current requirements but has identified a bug, so we are skipping it until the bug (Bug 63707) is resolved")]
[InlineData(Constants.Users.Banking.UserIdJaneWilson, "98765988", "98765987")] // Retrieving account that has not been consented to, should fail
public async Task ACX01_Get_WhenConsumerDidNotGrantConsentToAccount_ShouldRespondWith_404NotFound(
string userId,
@@ -481,8 +478,6 @@ public async Task ACX01_Get_WhenConsumerDidNotGrantConsentToAccount_ShouldRespon
{
Log.Information("Running test with Params: {P1}={V1}, {P2}={V2}, {P3}={V3}.", nameof(userId), userId, nameof(consentedAccounts), consentedAccounts, nameof(accountToRetrieve), accountToRetrieve);
- // TODO: This is failing but the test is correct. Fails as it gets a 404 Notfound when it shold be a 422 UnprocessableEntity. Bug 63707
-
// Arrange - Get authcode
var authService = await new DataHolderAuthoriseService.DataHolderAuthoriseServiceBuilder(_options, _dataHolderParService, _apiServiceDirector)
.WithUserId(userId)
@@ -536,7 +531,7 @@ private class TransactionFilterParameters
public string? Text { get; init; }
}
- private static (string, int) GetExpectedResponse(
+ private static (string ExpectedResponse, int TotalRecords) GetExpectedResponse(
string accountId,
string? accessToken,
string baseUrl,
@@ -622,15 +617,15 @@ private static (string, int) GetExpectedResponse(
meta = new
{
totalRecords,
- totalPages
- }
+ totalPages,
+ },
};
return (
JsonConvert.SerializeObject(expectedResponse, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
- Formatting = Formatting.Indented
+ Formatting = Formatting.Indented,
}),
totalRecords);
}
diff --git a/Source/Common/CDR.DataHolder.Common.API/Business/Models/Meta.cs b/Source/Common/CDR.DataHolder.Common.API/Business/Models/Meta.cs
index a3ea738..3b5c0ed 100644
--- a/Source/Common/CDR.DataHolder.Common.API/Business/Models/Meta.cs
+++ b/Source/Common/CDR.DataHolder.Common.API/Business/Models/Meta.cs
@@ -1,6 +1,10 @@
namespace CDR.DataHolder.Common.Resource.API.Business.Models
{
- public class Meta
+ ///
+ /// This is an optional class used in responses to send additional data.
+ /// Since there is no additional data, this is kept empty to return empty object in responses.
+ ///
+ public partial class Meta
{
}
}
diff --git a/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj b/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj
index a91b030..7226790 100644
--- a/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj
+++ b/Source/Common/CDR.DataHolder.Common.API/CDR.DataHolder.Common.API.csproj
@@ -22,7 +22,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Common/CDR.DataHolder.Common.API/Infrastructure/CommonRepositoryFactory.cs b/Source/Common/CDR.DataHolder.Common.API/Infrastructure/CommonRepositoryFactory.cs
index 61ce460..cd840f6 100644
--- a/Source/Common/CDR.DataHolder.Common.API/Infrastructure/CommonRepositoryFactory.cs
+++ b/Source/Common/CDR.DataHolder.Common.API/Infrastructure/CommonRepositoryFactory.cs
@@ -21,7 +21,7 @@ public ICommonRepository GetCommonRepository(string industry)
{
Constants.Industry.Banking => _serviceProvider.GetService(),
Constants.Industry.Energy => _serviceProvider.GetService(),
- _ => throw new InvalidIndustryException()
+ _ => throw new InvalidIndustryException(),
};
if (repository == null)
diff --git a/Source/Common/CDR.DataHolder.Common.API/Infrastructure/ServiceCollectionExtension.cs b/Source/Common/CDR.DataHolder.Common.API/Infrastructure/ServiceCollectionExtension.cs
index 5072d7a..ea65b72 100644
--- a/Source/Common/CDR.DataHolder.Common.API/Infrastructure/ServiceCollectionExtension.cs
+++ b/Source/Common/CDR.DataHolder.Common.API/Infrastructure/ServiceCollectionExtension.cs
@@ -132,18 +132,18 @@ public static void AddAuthenticationAuthorization(this IServiceCollection servic
In = ParameterLocation.Header,
Scheme = "Bearer",
Type = SecuritySchemeType.ApiKey,
- BearerFormat = "JWT"
+ BearerFormat = "JWT",
});
c.AddSecurityRequirement(new OpenApiSecurityRequirement
- {
+ {
{
new OpenApiSecurityScheme
{
- Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
+ Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" },
},
new List()
- }
- });
+ },
+ });
});
}
}
diff --git a/Source/Directory.Build.props b/Source/Directory.Build.props
index e8d871a..89d0f76 100644
--- a/Source/Directory.Build.props
+++ b/Source/Directory.Build.props
@@ -1,9 +1,10 @@
net8.0
- 4.0.0
+ 4.0.1
true
true
true
+ NU1901;NU1902
\ No newline at end of file
diff --git a/Source/DockerCompose/docker-compose.IntegrationTests.Base.yml b/Source/DockerCompose/docker-compose.IntegrationTests.Base.yml
index 731a830..f37a511 100644
--- a/Source/DockerCompose/docker-compose.IntegrationTests.Base.yml
+++ b/Source/DockerCompose/docker-compose.IntegrationTests.Base.yml
@@ -58,7 +58,7 @@ services:
- "1433:1433"
environment:
- ACCEPT_EULA=Y
- - SA_PASSWORD=Pa{}w0rd2019
+ - MSSQL_SA_PASSWORD=Pa{}w0rd2019
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S . -U sa -P "Pa{}w0rd2019" -Q "SELECT 1" -No || exit 1
timeout: 5s
diff --git a/Source/DockerCompose/docker-compose.UnitTests.yml b/Source/DockerCompose/docker-compose.UnitTests.yml
index 522dcb7..47b5728 100644
--- a/Source/DockerCompose/docker-compose.UnitTests.yml
+++ b/Source/DockerCompose/docker-compose.UnitTests.yml
@@ -23,7 +23,7 @@ services:
image: 'mcr.microsoft.com/mssql/server:2022-latest'
environment:
- ACCEPT_EULA=Y
- - SA_PASSWORD=Pa{}w0rd2019
+ - MSSQL_SA_PASSWORD=Pa{}w0rd2019
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S . -U sa -P "Pa{}w0rd2019" -Q "SELECT 1" -No || exit 1
timeout: 10s
diff --git a/Source/DockerCompose/docker-compose.yml b/Source/DockerCompose/docker-compose.yml
index 52bb465..5ab5b0a 100644
--- a/Source/DockerCompose/docker-compose.yml
+++ b/Source/DockerCompose/docker-compose.yml
@@ -97,7 +97,7 @@ services:
- '1433:1433'
environment:
- ACCEPT_EULA=Y
- - SA_PASSWORD=Pa{}w0rd2019
+ - MSSQL_SA_PASSWORD=Pa{}w0rd2019
healthcheck:
test: /opt/mssql-tools18/bin/sqlcmd -S . -U sa -P "Pa{}w0rd2019" -Q "SELECT 1" -No || exit 1
timeout: 10s
diff --git a/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj b/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj
index 0cf9cd1..d0c432c 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj
+++ b/Source/Energy/CDR.DataHolder.Energy.Domain/CDR.DataHolder.Energy.Domain.csproj
@@ -17,7 +17,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj b/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj
index d3ae4a4..5c169dc 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/CDR.DataHolder.Energy.Repository.csproj
@@ -10,14 +10,14 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -26,7 +26,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/EnergyResourceRepository.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/EnergyResourceRepository.cs
index 8eb90c5..1d02535 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/EnergyResourceRepository.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/EnergyResourceRepository.cs
@@ -119,7 +119,6 @@ public async Task CanAccessAccount(string accountId)
/// Get a list of all concession for a given account.
///
/// Query filter.
- ///
public async Task GetEnergyAccountConcessions(AccountConcessionsFilter filter)
{
IQueryable accountTransactionsQuery = _dataHolderDatabaseContext.AccountConcessions.AsNoTracking()
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20211216221636_Initial.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20211216221636_Initial.cs
index 0f7e42f..5f3dd19 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20211216221636_Initial.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20211216221636_Initial.cs
@@ -3,6 +3,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Initial database creation migration script.
+ ///
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -15,7 +18,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
LegalEntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
Industry = table.Column(type: "nvarchar(10)", maxLength: 10, nullable: false),
Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
- LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true)
+ LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
},
constraints: table =>
{
@@ -41,7 +44,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
OrganisationType = table.Column(type: "nvarchar(max)", nullable: true),
RegisteredCountry = table.Column(type: "nvarchar(3)", maxLength: 3, nullable: true),
EstablishmentDate = table.Column(type: "datetime2", nullable: true),
- LastUpdateTime = table.Column(type: "datetime2", nullable: true)
+ LastUpdateTime = table.Column(type: "datetime2", nullable: true),
},
constraints: table =>
{
@@ -60,7 +63,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
Suffix = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
OccupationCode = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true),
OccupationCodeVersion = table.Column(type: "nvarchar(max)", nullable: true),
- LastUpdateTime = table.Column(type: "datetime2", nullable: true)
+ LastUpdateTime = table.Column(type: "datetime2", nullable: true),
},
constraints: table =>
{
@@ -82,7 +85,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
CustomerType = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
EffectiveFrom = table.Column(type: "datetime2", nullable: true),
EffectiveTo = table.Column(type: "datetime2", nullable: true),
- LastUpdated = table.Column(type: "datetime2", nullable: false)
+ LastUpdated = table.Column(type: "datetime2", nullable: false),
},
constraints: table =>
{
@@ -97,7 +100,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
BrandName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
- LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false)
+ LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false),
},
constraints: table =>
{
@@ -118,7 +121,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
LoginId = table.Column(type: "nvarchar(8)", maxLength: 8, nullable: false),
CustomerUType = table.Column(type: "nvarchar(max)", nullable: true),
PersonId = table.Column(type: "uniqueidentifier", nullable: true),
- OrganisationId = table.Column(type: "uniqueidentifier", nullable: true)
+ OrganisationId = table.Column(type: "uniqueidentifier", nullable: true),
},
constraints: table =>
{
@@ -146,7 +149,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
SoftwareProductDescription = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
- BrandId = table.Column(type: "uniqueidentifier", nullable: false)
+ BrandId = table.Column(type: "uniqueidentifier", nullable: false),
},
constraints: table =>
{
@@ -167,7 +170,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
AccountNumber = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
DisplayName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
CreationDate = table.Column(type: "datetime2", nullable: false),
- CustomerId = table.Column(type: "uniqueidentifier", nullable: false)
+ CustomerId = table.Column(type: "uniqueidentifier", nullable: false),
},
constraints: table =>
{
@@ -194,7 +197,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
DailyDiscount = table.Column(type: "decimal(18,2)", nullable: true),
MonthlyDiscount = table.Column(type: "decimal(18,2)", nullable: true),
YearlyDiscount = table.Column(type: "decimal(18,2)", nullable: true),
- PercentageDiscount = table.Column(type: "decimal(18,2)", nullable: true)
+ PercentageDiscount = table.Column(type: "decimal(18,2)", nullable: true),
},
constraints: table =>
{
@@ -214,7 +217,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
AccountPlanId = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
AccountId = table.Column(type: "nvarchar(100)", nullable: false),
PlanId = table.Column(type: "nvarchar(100)", nullable: false),
- Nickname = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true)
+ Nickname = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
},
constraints: table =>
{
@@ -253,7 +256,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
BillerName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
Crn = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
ApcaNumber = table.Column(type: "nvarchar(6)", maxLength: 6, nullable: true),
- AccountId = table.Column(type: "nvarchar(100)", nullable: true)
+ AccountId = table.Column(type: "nvarchar(100)", nullable: true),
},
constraints: table =>
{
@@ -274,7 +277,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
DisplayName = table.Column(type: "nvarchar(max)", nullable: true),
StartDate = table.Column(type: "datetime2", nullable: false),
EndDate = table.Column(type: "datetime2", nullable: true),
- AccountPlanId = table.Column(type: "nvarchar(100)", nullable: true)
+ AccountPlanId = table.Column(type: "nvarchar(100)", nullable: true),
},
constraints: table =>
{
@@ -299,7 +302,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
JurisdictionCode = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
IsGenerator = table.Column(type: "bit", nullable: true),
ValidFromDate = table.Column(type: "datetime2", nullable: false),
- LastUpdateDateTime = table.Column(type: "datetime2", nullable: false)
+ LastUpdateDateTime = table.Column(type: "datetime2", nullable: false),
},
constraints: table =>
{
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220218032158_RemoveIndustry.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220218032158_RemoveIndustry.cs
index 5d68e86..19d8ba7 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220218032158_RemoveIndustry.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220218032158_RemoveIndustry.cs
@@ -4,6 +4,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Remove industry column migration script.
+ ///
public partial class RemoveIndustry : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220422014131_LogEventsManageAPI.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220422014131_LogEventsManageAPI.cs
index 5f09996..d13cf5c 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220422014131_LogEventsManageAPI.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220422014131_LogEventsManageAPI.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// LogEventsManageAPI creation migration script.
+ ///
public partial class LogEventsManageAPI : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -23,7 +26,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
ProcessName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
ThreadId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
MethodName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true)
+ SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
},
constraints: table =>
{
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220504053142_LogEventsDrService.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220504053142_LogEventsDrService.cs
index 41fe5ee..dcd764b 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220504053142_LogEventsDrService.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220504053142_LogEventsDrService.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// LogEventsDrService creation migration script.
+ ///
public partial class LogEventsDrService : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -23,7 +26,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
ProcessName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
ThreadId = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
MethodName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true),
- SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true)
+ SourceContext = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true),
},
constraints: table =>
{
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220630000851_UpdateConcessionSchema.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220630000851_UpdateConcessionSchema.cs
index 1419678..ed0fb04 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220630000851_UpdateConcessionSchema.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20220630000851_UpdateConcessionSchema.cs
@@ -4,6 +4,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Update AccountConcession table columns migration script.
+ ///
public partial class UpdateConcessionSchema : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230202045234_RemoveSoftProdLEntityBrand.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230202045234_RemoveSoftProdLEntityBrand.cs
index 8941c8a..81ae2b5 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230202045234_RemoveSoftProdLEntityBrand.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230202045234_RemoveSoftProdLEntityBrand.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Remove SoftwareProduct, Brand and LegalEntity tables migration script.
+ ///
public partial class RemoveSoftProdLEntityBrand : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
@@ -28,7 +31,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false),
LegalEntityName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
- Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false)
+ Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
},
constraints: table =>
{
@@ -43,7 +46,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
LegalEntityId = table.Column(type: "uniqueidentifier", nullable: false),
BrandName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
- Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false)
+ Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
},
constraints: table =>
{
@@ -65,7 +68,7 @@ protected override void Down(MigrationBuilder migrationBuilder)
LogoUri = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
SoftwareProductDescription = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
SoftwareProductName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
- Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false)
+ Status = table.Column(type: "nvarchar(25)", maxLength: 25, nullable: false),
},
constraints: table =>
{
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230220224633_GetAccountV2Changes.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230220224633_GetAccountV2Changes.cs
index cc6a3dd..5fb6b46 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230220224633_GetAccountV2Changes.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20230220224633_GetAccountV2Changes.cs
@@ -4,6 +4,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Update Account table For GetAccountV2 changes migration script.
+ ///
public partial class GetAccountV2Changes : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20231101074053_FixCreationDate.cs b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20231101074053_FixCreationDate.cs
index 1af165c..1397a6e 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20231101074053_FixCreationDate.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Repository/Migrations/20231101074053_FixCreationDate.cs
@@ -5,6 +5,9 @@
namespace CDR.DataHolder.Repository.Migrations
{
+ ///
+ /// Update Account table to fix CreationDate migration script.
+ ///
public partial class FixCreationDate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj b/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj
index 4432906..91101b8 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API.UnitTests/CDR.DataHolder.Energy.Resource.API.UnitTests.csproj
@@ -56,13 +56,13 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/MappingProfile.cs b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/MappingProfile.cs
index da02b20..3f69856 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/MappingProfile.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/MappingProfile.cs
@@ -25,16 +25,13 @@ public MappingProfile()
CreateMap()
.ReverseMap();
- CreateMap()
+ CreateMap()
.ForMember(dest => dest.CreationDate, source => source.MapFrom(source =>
source.CreationDate == null ? string.Empty : source.CreationDate.Value.ToString("yyyy-MM-dd")))
.ForMember(dest => dest.Plans, source => source.MapFrom(source => source.Plans))
.ReverseMap();
- CreateMap()
- .IncludeBase()
- .ReverseMap();
CreateMap()
- .IncludeBase()
+ .IncludeBase()
.ForMember(dest => dest.OpenStatus, source => source.MapFrom(source => source.OpenStatus))
.ReverseMap();
CreateMap, EnergyAccountListResponse>()
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/BaseEnergyAccount.cs b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/BaseEnergyAccount.cs
deleted file mode 100644
index 167744e..0000000
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/BaseEnergyAccount.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Newtonsoft.Json;
-using System;
-
-namespace CDR.DataHolder.Energy.Resource.API.Business.Models
-{
- public class BaseEnergyAccount
- {
- [JsonProperty(Order = 1)]
- public string AccountId { get; set; } = string.Empty;
-
- [JsonProperty(Order = 2)]
- public string? AccountNumber { get; set; }
-
- [JsonProperty(Order = 3)]
- public string? DisplayName { get; set; }
-
- [JsonProperty(Order = 5)]
- public string CreationDate { get; set; } = string.Empty;
-
- [JsonProperty(Order = 6)]
- public EnergyAccountPlan[] Plans { get; set; } = Array.Empty();
- }
-}
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccount.cs b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccount.cs
index e59b9f7..9b0cc6f 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccount.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccount.cs
@@ -3,11 +3,21 @@
namespace CDR.DataHolder.Energy.Resource.API.Business.Models
{
- ///
- /// Energy Account.
- /// Although this is an empty class, this 'represent' the API model to be returned in resource API.
- ///
- public class EnergyAccount : BaseEnergyAccount
+ public class EnergyAccount
{
+ [JsonProperty(Order = 1)]
+ public string AccountId { get; set; } = string.Empty;
+
+ [JsonProperty(Order = 2)]
+ public string? AccountNumber { get; set; }
+
+ [JsonProperty(Order = 3)]
+ public string? DisplayName { get; set; }
+
+ [JsonProperty(Order = 5)]
+ public string CreationDate { get; set; } = string.Empty;
+
+ [JsonProperty(Order = 6)]
+ public EnergyAccountPlan[] Plans { get; set; } = Array.Empty();
}
}
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccountV2.cs b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccountV2.cs
index 9f1ffd3..a441258 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccountV2.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Business/Models/EnergyAccountV2.cs
@@ -2,7 +2,7 @@
namespace CDR.DataHolder.Energy.Resource.API.Business.Models
{
- public class EnergyAccountV2 : BaseEnergyAccount
+ public class EnergyAccountV2 : EnergyAccount
{
[JsonProperty(Order = 4)]
public string OpenStatus { get; set; } = string.Empty;
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj b/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj
index d1ae5da..45a4cda 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/CDR.DataHolder.Energy.Resource.API.csproj
@@ -35,12 +35,12 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Controllers/ResourceController.cs b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Controllers/ResourceController.cs
index a75bf4d..1e276be 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Controllers/ResourceController.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Controllers/ResourceController.cs
@@ -70,7 +70,7 @@ public async Task GetEnergyAccountsXV1(
}
private async Task GetPagedEnergyAccountsForFilter(string? page, string? pageSize, AccountFilter accountFilter)
- where T : BaseEnergyAccount
+ where T : EnergyAccount
{
// Each customer id is different for each ADR based on PPID.
// Therefore we need to look up the CustomerClient table to find the actual customer id.
@@ -97,7 +97,7 @@ private async Task GetPagedEnergyAccountsForFilter(string? pag
var idParameters = new IdPermanenceParameters
{
SoftwareProductId = softwareProductId ?? string.Empty,
- CustomerId = loginId
+ CustomerId = loginId,
};
_idPermanenceManager.EncryptIds(response.Data.Accounts, idParameters, a => a.AccountId);
@@ -124,7 +124,7 @@ public async Task GetEnergyAccountsXV2(
var accountIds = User.GetAccountIds();
var accountFilter = new AccountFilter(accountIds)
{
- OpenStatus = (openStatus != null && openStatus.Equals(OpenStatus.All.ToString(), StringComparison.OrdinalIgnoreCase)) ? null : openStatus
+ OpenStatus = (openStatus != null && openStatus.Equals(OpenStatus.All.ToString(), StringComparison.OrdinalIgnoreCase)) ? null : openStatus,
};
return await GetPagedEnergyAccountsForFilter(page, pageSize, accountFilter);
@@ -146,7 +146,7 @@ public async Task GetConcessions([FromRoute] string accountId)
var request = new RequestAccountConcessions()
{
- AccountId = accountId
+ AccountId = accountId,
};
// Each customer id is different for each ADR based on PPID.
@@ -164,7 +164,7 @@ public async Task GetConcessions([FromRoute] string accountId)
var idParameters = new IdPermanenceParameters
{
SoftwareProductId = softwareProductId ?? string.Empty,
- CustomerId = loginId
+ CustomerId = loginId,
};
request.AccountId = DecryptAccountId(request.AccountId, idParameters);
diff --git a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Startup.cs b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Startup.cs
index e87f534..296c015 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Resource.API/Startup.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Resource.API/Startup.cs
@@ -166,17 +166,17 @@ private static void AddAuthenticationAuthorization(IServiceCollection services,
In = ParameterLocation.Header,
Scheme = "Bearer",
Type = SecuritySchemeType.ApiKey,
- BearerFormat = "JWT"
+ BearerFormat = "JWT",
});
c.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
- Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
+ Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" },
},
new List()
- }
+ },
});
});
}
diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj
index 5892b57..9d601a3 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj
+++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/CDR.DataHolder.Energy.Tests.IntegrationTests.csproj
@@ -48,13 +48,13 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Helpers.cs b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Helpers.cs
index 723e8f6..16ea3ea 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Helpers.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Helpers.cs
@@ -26,7 +26,7 @@ public static void ExtractClaimsFromToken(string? accessToken, out string loginI
new SubPermanenceParameters
{
SoftwareProductId = softwareProductId,
- SectorIdentifierUri = Constants.SoftwareProducts.SoftwareProductSectorIdentifierUri
+ SectorIdentifierUri = Constants.SoftwareProducts.SoftwareProductSectorIdentifierUri,
},
Constants.IdPermanence.IdPermanencePrivateKey);
}
diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Initializer.cs b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Initializer.cs
index 2f07155..37454f7 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Initializer.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/Initializer.cs
@@ -36,4 +36,4 @@ public Initializer(IMessageSink messageSink)
}
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs
index 6db936f..e2f659e 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US12973_MDH_CommonAPI_GetCustomer.cs
@@ -100,16 +100,16 @@ private static string GetExpectedResponse(string dhMtlsGatewayUrl, string loginI
prefix = customer.Person?.Prefix,
suffix = customer.Person?.Suffix,
occupationCode = customer.Person?.OccupationCode,
- occupationCodeVersion = customer.Person?.OccupationCodeVersion
+ occupationCodeVersion = customer.Person?.OccupationCodeVersion,
}
: null,
})
.FirstOrDefault(),
links = new
{
- self = $"{dhMtlsGatewayUrl}/cds-au/v1/common/customer"
+ self = $"{dhMtlsGatewayUrl}/cds-au/v1/common/customer",
},
- meta = new { }
+ meta = new { },
};
return JsonConvert.SerializeObject(
@@ -117,7 +117,7 @@ private static string GetExpectedResponse(string dhMtlsGatewayUrl, string loginI
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
- Formatting = Formatting.Indented
+ Formatting = Formatting.Indented,
});
}
diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US27571_MDH_EnergyAPI_GetAccounts.cs b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US27571_MDH_EnergyAPI_GetAccounts.cs
index 2892e4b..92bbf9c 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US27571_MDH_EnergyAPI_GetAccounts.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US27571_MDH_EnergyAPI_GetAccounts.cs
@@ -185,7 +185,7 @@ public async Task AC03_AC06_AC07_Get_WithInvalidPageSizeOrInvalidPageOrInvalidFi
CdsError.InvalidPageSize => new InvalidPageSizeException("page-size pagination field is greater than the maximum 1000 allowed"),
CdsError.InvalidPage => new InvalidPageException("Page parameter is out of range. Maximum page is 1"),
CdsError.InvalidField => new InvalidFieldException("Page parameter is out of range. Minimum page is 1, maximum page is 1000"),
- _ => throw new InvalidOperationException($"The CdsError parameter is not handled within this test case: {cdsError}").Log()
+ _ => throw new InvalidOperationException($"The CdsError parameter is not handled within this test case: {cdsError}").Log(),
};
var errorList = new ResponseErrorListV2(expectedError, string.Empty);
@@ -720,7 +720,7 @@ private async Task Test_ValidGetAccountsScenario(
return dateTime?.ToString("yyyy-MM-dd");
}
- private static (string, int) GetExpectedResponse(
+ private static (string ExpectedResponse, int TotalRecords) GetExpectedResponse(
string? accessToken,
string baseUrl,
string selfUrl,
@@ -758,8 +758,8 @@ private static (string, int) GetExpectedResponse(
{
displayName = accountPlan.PlanOverview.DisplayName,
startDate = accountPlan.PlanOverview.StartDate.ToString("yyyy-MM-dd"),
- endDate = ToStringOrNull(accountPlan.PlanOverview.EndDate)
- }
+ endDate = ToStringOrNull(accountPlan.PlanOverview.EndDate),
+ },
}),
})
.ToList();
@@ -804,8 +804,8 @@ private static (string, int) GetExpectedResponse(
meta = new
{
totalRecords,
- totalPages
- }
+ totalPages,
+ },
};
return (
diff --git a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US28722_MDH_EnergyAPI_GetConcessions.cs b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US28722_MDH_EnergyAPI_GetConcessions.cs
index b54c212..44fa703 100644
--- a/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US28722_MDH_EnergyAPI_GetConcessions.cs
+++ b/Source/Energy/CDR.DataHolder.Energy.Tests.IntegrationTests/US28722_MDH_EnergyAPI_GetConcessions.cs
@@ -44,7 +44,7 @@ public US28722_Mdh_EnergyApi_GetConcessions(
}
}
- private static (string, int) GetExpectedResponse(
+ private static (string ExpectedResponse, int TotalRecords) GetExpectedResponse(
string? accessToken,
string accountId,
string selfUrl,
@@ -96,16 +96,14 @@ private static (string, int) GetExpectedResponse(
{
self = selfUrl,
},
- meta = new
- {
- }
+ meta = new { },
};
return (
JsonConvert.SerializeObject(expectedResponse, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
- Formatting = Formatting.Indented
+ Formatting = Formatting.Indented,
}),
totalRecords);
}
diff --git a/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj b/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj
index b3468fb..790b043 100644
--- a/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj
+++ b/Source/Shared/CDR.DataHolder.Admin.API/CDR.DataHolder.Admin.API.csproj
@@ -30,7 +30,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Admin.API/Controllers/AdminController.cs b/Source/Shared/CDR.DataHolder.Admin.API/Controllers/AdminController.cs
index 24fcc09..d69b760 100644
--- a/Source/Shared/CDR.DataHolder.Admin.API/Controllers/AdminController.cs
+++ b/Source/Shared/CDR.DataHolder.Admin.API/Controllers/AdminController.cs
@@ -92,7 +92,6 @@ private async Task GetFileContents(string fileLocation)
/// This method supports switching between the two auth methods using
/// configuration, for testing purposes.
///
- ///
private async Task Authorize()
{
// Get the Authorization header value.
diff --git a/Source/Shared/CDR.DataHolder.Admin.API/Models/AuthorizationResult.cs b/Source/Shared/CDR.DataHolder.Admin.API/Models/AuthorizationResult.cs
index 97f19fc..9721750 100644
--- a/Source/Shared/CDR.DataHolder.Admin.API/Models/AuthorizationResult.cs
+++ b/Source/Shared/CDR.DataHolder.Admin.API/Models/AuthorizationResult.cs
@@ -23,7 +23,7 @@ public static AuthorizationResult Fail(string error, string errorDescription)
{
IsAuthorized = false,
Error = error,
- ErrorDescription = errorDescription
+ ErrorDescription = errorDescription,
};
}
@@ -31,7 +31,7 @@ public static AuthorizationResult Pass()
{
return new AuthorizationResult()
{
- IsAuthorized = true
+ IsAuthorized = true,
};
}
}
diff --git a/Source/Shared/CDR.DataHolder.Admin.API/Startup.cs b/Source/Shared/CDR.DataHolder.Admin.API/Startup.cs
index 7b07fb4..6391156 100644
--- a/Source/Shared/CDR.DataHolder.Admin.API/Startup.cs
+++ b/Source/Shared/CDR.DataHolder.Admin.API/Startup.cs
@@ -37,7 +37,7 @@ public void ConfigureServices(IServiceCollection services)
.Split(',')
.Select(x => Convert.ToInt32(x))
.ToArray()
- }
+ },
};
services.AddApiVersioning(options =>
diff --git a/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj b/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj
index 0a1d4c0..9e45ee9 100644
--- a/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj
+++ b/Source/Shared/CDR.DataHolder.Manage.API/CDR.DataHolder.Manage.API.csproj
@@ -18,13 +18,13 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Manage.API/Infrastructure/IndustryDbContextFactory.cs b/Source/Shared/CDR.DataHolder.Manage.API/Infrastructure/IndustryDbContextFactory.cs
index 8e15c2f..0964e29 100644
--- a/Source/Shared/CDR.DataHolder.Manage.API/Infrastructure/IndustryDbContextFactory.cs
+++ b/Source/Shared/CDR.DataHolder.Manage.API/Infrastructure/IndustryDbContextFactory.cs
@@ -25,7 +25,7 @@ public IIndustryDbContext Create(string industry, string connectionStringType)
{
Constants.Industry.Banking => CreateBankingDbContext(connectionStringType),
Constants.Industry.Energy => CreateEnergyDbContext(connectionStringType),
- _ => throw new InvalidIndustryException()
+ _ => throw new InvalidIndustryException(),
};
}
diff --git a/Source/Shared/CDR.DataHolder.Manage.API/Startup.cs b/Source/Shared/CDR.DataHolder.Manage.API/Startup.cs
index 79b7909..211d1dc 100644
--- a/Source/Shared/CDR.DataHolder.Manage.API/Startup.cs
+++ b/Source/Shared/CDR.DataHolder.Manage.API/Startup.cs
@@ -85,7 +85,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger<
app.UseHealthChecks("/health", new HealthCheckOptions()
{
- ResponseWriter = CustomResponseWriter
+ ResponseWriter = CustomResponseWriter,
});
// Ensure the database exists and is up to the latest version.
@@ -150,8 +150,8 @@ private static Task CustomResponseWriter(HttpContext context, HealthReport healt
{
key = e.Key,
value = e.Value.Status.ToString(),
- description = e.Value.Description
- })
+ description = e.Value.Description,
+ }),
});
return context.Response.WriteAsync(result);
}
diff --git a/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj b/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj
index 7e02d61..45eaabe 100644
--- a/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj
+++ b/Source/Shared/CDR.DataHolder.Public.API/CDR.DataHolder.Public.API.csproj
@@ -31,7 +31,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Public.API/Startup.cs b/Source/Shared/CDR.DataHolder.Public.API/Startup.cs
index ef1fef7..352926a 100644
--- a/Source/Shared/CDR.DataHolder.Public.API/Startup.cs
+++ b/Source/Shared/CDR.DataHolder.Public.API/Startup.cs
@@ -1,3 +1,4 @@
+using System;
using CDR.DataHolder.Shared.API.Infrastructure.Filters;
using CDR.DataHolder.Shared.API.Infrastructure.Models;
using Microsoft.AspNetCore.Builder;
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj
index fa9fbf8..bba157c 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/CDR.DataHolder.Shared.API.Gateway.mTLS.csproj
@@ -35,7 +35,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/Startup.cs b/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/Startup.cs
index 9a4599a..536cea0 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/Startup.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Gateway.mTLS/Startup.cs
@@ -57,7 +57,7 @@ public void ConfigureServices(IServiceCollection services)
{
context.Fail("invalid client certificate");
throw context.Exception;
- }
+ },
};
})
@@ -119,7 +119,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
httpContext.Request.Headers["X-Forwarded-Host"] = httpContext.Request.Host.ToString();
await next.Invoke();
- }
+ },
};
app.UseOcelot(pipelineConfiguration).Wait();
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj
index 04b66be..f072617 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/CDR.DataHolder.Shared.API.Infrastructure.UnitTests.csproj
@@ -41,7 +41,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/Extensions/HttpClientHandlerExtensionsTests.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/Extensions/HttpClientHandlerExtensionsTests.cs
index 76c36e3..3b7bd08 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/Extensions/HttpClientHandlerExtensionsTests.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure.UnitTests/Extensions/HttpClientHandlerExtensionsTests.cs
@@ -64,6 +64,10 @@ public async Task ServerCertificates_ValidationEnabled_ShouldValidateSslConnecti
}
}
+ ///
+ /// This is a mock API endpoint.
+ /// This is to spin up new mock API instances during testing.
+ ///
public partial class MockEndpoint : IAsyncDisposable
{
public MockEndpoint(string url, string certificatePath, string certificatePassword)
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj
index 9d30e2a..8b72a09 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/CDR.DataHolder.Shared.API.Infrastructure.csproj
@@ -11,18 +11,18 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/ClaimsPrincipalExtensions.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/ClaimsPrincipalExtensions.cs
index 297c8cd..1eb103f 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/ClaimsPrincipalExtensions.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/ClaimsPrincipalExtensions.cs
@@ -43,7 +43,7 @@ public static string GetSubject(this ClaimsPrincipal claimsPrincipal, IConfigura
var param = new SubPermanenceParameters()
{
SoftwareProductId = claimsPrincipal.GetClaimValue("software_id"),
- SectorIdentifierUri = claimsPrincipal.GetClaimValue("sector_identifier_uri")
+ SectorIdentifierUri = claimsPrincipal.GetClaimValue("sector_identifier_uri"),
};
return IdPermanenceHelper.DecryptSub(sub, param, IdPermanenceHelper.GetPrivateKey(config));
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/HttpClientHandlerExtensions.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/HttpClientHandlerExtensions.cs
index 051ab33..5a2740b 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/HttpClientHandlerExtensions.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Extensions/HttpClientHandlerExtensions.cs
@@ -1,4 +1,4 @@
-using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Configuration;
using System;
using System.Net.Http;
using System.Net.Security;
@@ -33,4 +33,4 @@ public static void SetServerCertificateValidation(this HttpClientHandler httpCli
};
}
}
-}
\ No newline at end of file
+}
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Filters/CheckXVAttribute.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Filters/CheckXVAttribute.cs
index a6cf8ae..b062b13 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Filters/CheckXVAttribute.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Filters/CheckXVAttribute.cs
@@ -37,7 +37,7 @@ public override void OnActionExecuting(ActionExecutingContext context)
// return a 406 Not Accepted as the version is not supported.
context.Result = new ObjectResult(new ResponseErrorList().AddInvalidXVUnsupportedVersion())
{
- StatusCode = (int)HttpStatusCode.NotAcceptable
+ StatusCode = (int)HttpStatusCode.NotAcceptable,
};
}
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/IdPermanence/AesEncryptor.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/IdPermanence/AesEncryptor.cs
index dda494a..b2076db 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/IdPermanence/AesEncryptor.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/IdPermanence/AesEncryptor.cs
@@ -14,7 +14,7 @@ public static byte[] EncryptString(string key, string plainText)
using (var aes = Aes.Create())
{
- var alg = HashAlgorithm.Create("SHA512")!;
+ var alg = SHA512.Create();
var keyHash = alg.ComputeHash(Encoding.UTF8.GetBytes(key));
aes.Key = keyHash.Take(24).ToArray();
aes.IV = iv;
@@ -55,7 +55,7 @@ public static string DecryptString(string key, byte[] cipherText)
{
using (var aes = Aes.Create())
{
- var alg = HashAlgorithm.Create("SHA512")!;
+ var alg = SHA512.Create();
var keyHash = alg.ComputeHash(Encoding.UTF8.GetBytes(key));
aes.Key = keyHash.Take(24).ToArray();
aes.IV = iv;
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/AuthorisationPolicy.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/AuthorisationPolicy.cs
index 9da2019..1f660e6 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/AuthorisationPolicy.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/AuthorisationPolicy.cs
@@ -7,6 +7,6 @@ public enum AuthorisationPolicy
GetTransactionsApi,
GetConcessionsApi,
GetMetricsApi,
- DynamicClientRegistration
+ DynamicClientRegistration,
}
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/ErrorResponseVersion.cs b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/ErrorResponseVersion.cs
index a298a57..534627a 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/ErrorResponseVersion.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Infrastructure/Models/ErrorResponseVersion.cs
@@ -14,7 +14,7 @@ public override IActionResult CreateResponse(ErrorResponseContext context)
{
return new ObjectResult(new ResponseErrorList().AddMissingRequiredHeader("x-v")) // Note: This isn't consistent with the new PT behaviour (or RAAP)
{
- StatusCode = (int)HttpStatusCode.BadRequest
+ StatusCode = (int)HttpStatusCode.BadRequest,
};
}
@@ -32,7 +32,7 @@ public override IActionResult CreateResponse(ErrorResponseContext context)
{
return new ObjectResult(new ResponseErrorList().AddInvalidXVInvalidVersion())
{
- StatusCode = (int)HttpStatusCode.BadRequest
+ StatusCode = (int)HttpStatusCode.BadRequest,
};
}
@@ -40,7 +40,7 @@ public override IActionResult CreateResponse(ErrorResponseContext context)
{
return new ObjectResult(new ResponseErrorList().AddInvalidXVInvalidVersion())
{
- StatusCode = (int)HttpStatusCode.BadRequest
+ StatusCode = (int)HttpStatusCode.BadRequest,
};
}
@@ -48,7 +48,7 @@ public override IActionResult CreateResponse(ErrorResponseContext context)
{
return new ObjectResult(new ResponseErrorList().AddInvalidXVUnsupportedVersion())
{
- StatusCode = (int)HttpStatusCode.NotAcceptable
+ StatusCode = (int)HttpStatusCode.NotAcceptable,
};
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj b/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj
index 399b81a..b5f7eee 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Logger/CDR.DataHolder.Shared.API.Logger.csproj
@@ -18,7 +18,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Logger/IRequestResponseLogger.cs b/Source/Shared/CDR.DataHolder.Shared.API.Logger/IRequestResponseLogger.cs
index 587874f..087ae20 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Logger/IRequestResponseLogger.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Logger/IRequestResponseLogger.cs
@@ -6,4 +6,4 @@ public interface IRequestResponseLogger
{
ILogger Log { get; }
}
-}
\ No newline at end of file
+}
diff --git a/Source/Shared/CDR.DataHolder.Shared.API.Logger/LoggerExtensions.cs b/Source/Shared/CDR.DataHolder.Shared.API.Logger/LoggerExtensions.cs
index 0a5f0fe..bbdd4fc 100644
--- a/Source/Shared/CDR.DataHolder.Shared.API.Logger/LoggerExtensions.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.API.Logger/LoggerExtensions.cs
@@ -10,4 +10,4 @@ public static IServiceCollection AddRequestResponseLogging(this IServiceCollecti
return services;
}
}
-}
\ No newline at end of file
+}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj b/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj
index 6aa774b..332e8db 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.Business/CDR.DataHolder.Shared.Business.csproj
@@ -10,12 +10,12 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.Business/Extensions.cs b/Source/Shared/CDR.DataHolder.Shared.Business/Extensions.cs
index bc051cf..e3c5a35 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Business/Extensions.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Business/Extensions.cs
@@ -41,7 +41,7 @@ public static Shared.Business.Models.Links GetLinks(this ControllerBase controll
{
return new Links()
{
- Self = selfLink
+ Self = selfLink,
};
}
@@ -50,7 +50,7 @@ public static Shared.Business.Models.Links GetLinks(this ControllerBase controll
{
Self = selfLink,
First = controller.GetPageUri(selfLink, 1, pageSize),
- Last = controller.GetPageUri(selfLink, totalPages, pageSize)
+ Last = controller.GetPageUri(selfLink, totalPages, pageSize),
};
if (currentPage <= 1)
diff --git a/Source/Shared/CDR.DataHolder.Shared.Business/Models/Meta.cs b/Source/Shared/CDR.DataHolder.Shared.Business/Models/Meta.cs
index 36033bb..b9ab87e 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Business/Models/Meta.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Business/Models/Meta.cs
@@ -1,6 +1,10 @@
namespace CDR.DataHolder.Shared.Business.Models
{
- public class Meta
+ ///
+ /// This is an optional class used in responses to send additional data.
+ /// Since there is no additional data, this is kept empty to return empty object in responses.
+ ///
+ public partial class Meta
{
}
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Business/Services/TokenTransformService.cs b/Source/Shared/CDR.DataHolder.Shared.Business/Services/TokenTransformService.cs
index 89d02c5..b7bcf94 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Business/Services/TokenTransformService.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Business/Services/TokenTransformService.cs
@@ -34,7 +34,7 @@ public Task TransformAsync(ClaimsPrincipal principal)
var subParam = new SubPermanenceParameters()
{
SectorIdentifierUri = newIdentity.FindFirst(Infra.Constants.TokenClaimTypes.SectorIdentifier)?.Value ?? string.Empty,
- SoftwareProductId = newIdentity.FindFirst(Infra.Constants.TokenClaimTypes.SoftwareId)?.Value ?? string.Empty
+ SoftwareProductId = newIdentity.FindFirst(Infra.Constants.TokenClaimTypes.SoftwareId)?.Value ?? string.Empty,
};
var decryptedSubValue = _idPermanenceManager.DecryptSub(subClaim.Value, subParam);
newIdentity.RemoveClaim(subClaim);
@@ -48,7 +48,7 @@ public Task TransformAsync(ClaimsPrincipal principal)
var idParam = new IdPermanenceParameters()
{
CustomerId = decryptedSubValue,
- SoftwareProductId = newIdentity.FindFirst(Infra.Constants.TokenClaimTypes.SoftwareId)?.Value ?? string.Empty
+ SoftwareProductId = newIdentity.FindFirst(Infra.Constants.TokenClaimTypes.SoftwareId)?.Value ?? string.Empty,
};
foreach (var claim in accountClaims)
{
diff --git a/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj b/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj
index f278ee1..2a3703d 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.Domain/CDR.DataHolder.Shared.Domain.csproj
@@ -17,7 +17,7 @@
-
+
@@ -26,7 +26,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.Domain/Models/Meta.cs b/Source/Shared/CDR.DataHolder.Shared.Domain/Models/Meta.cs
index 6874c64..8e2404b 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Domain/Models/Meta.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Domain/Models/Meta.cs
@@ -1,6 +1,10 @@
namespace CDR.DataHolder.Shared.Domain.Models
{
- public class Meta
+ ///
+ /// This is an optional class used in responses to send additional data.
+ /// Since there is no additional data, this is kept empty to return empty object in responses.
+ ///
+ public partial class Meta
{
}
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Domain/Models/ResponseErrorList.cs b/Source/Shared/CDR.DataHolder.Shared.Domain/Models/ResponseErrorList.cs
index ce0a8b3..bc695c3 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Domain/Models/ResponseErrorList.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Domain/Models/ResponseErrorList.cs
@@ -192,7 +192,7 @@ public ResponseErrorList AddConsentNotFound(string? industry)
{
Code = $"urn:au-cds:error:cds-all:Authorisation/Unavailable{industry}Account",
Title = $"Unavailable {industry} Account",
- Detail = string.Empty
+ Detail = string.Empty,
});
return this;
}
@@ -209,7 +209,7 @@ public ResponseErrorList AddInvalidEnergyAccount(string accountId)
{
Code = "urn:au-cds:error:cds-energy:Authorisation/InvalidEnergyAccount",
Title = "Invalid Energy Account",
- Detail = $"{accountId}"
+ Detail = $"{accountId}",
});
return this;
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Domain/Repositories/IStatusRepository.cs b/Source/Shared/CDR.DataHolder.Shared.Domain/Repositories/IStatusRepository.cs
index a001853..1e1bc1e 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Domain/Repositories/IStatusRepository.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Domain/Repositories/IStatusRepository.cs
@@ -3,4 +3,4 @@
public interface IStatusRepository
{
}
-}
\ No newline at end of file
+}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Domain/ValueObjects/AccountOpenStatus.cs b/Source/Shared/CDR.DataHolder.Shared.Domain/ValueObjects/AccountOpenStatus.cs
index 9066c29..9ea8d1f 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Domain/ValueObjects/AccountOpenStatus.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Domain/ValueObjects/AccountOpenStatus.cs
@@ -14,7 +14,7 @@ public static IDictionary Values
{
{ OpenStatus.All, "ALL" },
{ OpenStatus.Open, "OPEN" },
- { OpenStatus.Closed, "CLOSED" }
+ { OpenStatus.Closed, "CLOSED" },
};
}
}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj b/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj
index 3e789b0..7617a80 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj
+++ b/Source/Shared/CDR.DataHolder.Shared.Repository/CDR.DataHolder.Shared.Repository.csproj
@@ -12,15 +12,15 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Source/Shared/CDR.DataHolder.Shared.Repository/DbConstants.cs b/Source/Shared/CDR.DataHolder.Shared.Repository/DbConstants.cs
index d4b2350..fa189ed 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Repository/DbConstants.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Repository/DbConstants.cs
@@ -14,7 +14,7 @@ public static class Resource
{
{ "Default", Default },
{ "Migrations", Migrations },
- { "Logging", Logging }
+ { "Logging", Logging },
};
public static string? GetConnectionString(string key)
diff --git a/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsDrService.cs b/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsDrService.cs
index 558c7f9..ccfa927 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsDrService.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsDrService.cs
@@ -33,4 +33,4 @@ public class LogEventsDrService
[MaxLength(100)]
public string? SourceContext { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsManageAPI.cs b/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsManageAPI.cs
index b363e82..8d805ff 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsManageAPI.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Repository/Entities/LogEventsManageAPI.cs
@@ -33,4 +33,4 @@ public class LogEventsManageApi
[MaxLength(100)]
public string? SourceContext { get; set; }
}
-}
\ No newline at end of file
+}
diff --git a/Source/Shared/CDR.DataHolder.Shared.Repository/Infrastructure/HealthCheckStatuses.cs b/Source/Shared/CDR.DataHolder.Shared.Repository/Infrastructure/HealthCheckStatuses.cs
index b05d15e..d53c85b 100644
--- a/Source/Shared/CDR.DataHolder.Shared.Repository/Infrastructure/HealthCheckStatuses.cs
+++ b/Source/Shared/CDR.DataHolder.Shared.Repository/Infrastructure/HealthCheckStatuses.cs
@@ -5,14 +5,14 @@ public enum SeedingStatus
NotStarted,
Succeeded,
Failed,
- NotConfigured
+ NotConfigured,
}
public enum AppStatus
{
Started,
Shutdown,
- NotStarted
+ NotStarted,
}
public class HealthCheckStatuses
diff --git a/Source/copy-cdr-auth-server.ps1 b/Source/copy-cdr-auth-server.ps1
index 6fadf18..ddf3526 100644
--- a/Source/copy-cdr-auth-server.ps1
+++ b/Source/copy-cdr-auth-server.ps1
@@ -11,12 +11,12 @@ if ($host.UI.PromptForChoice("Confirm", "Copy files from ..\..\cdr-auth-server i
exit 1
}
-copy-item ..\..\cdr-auth-server\Source\Directory.Build.props cdr-auth-server\Source\Directory.Build.props
-copy-item ..\..\cdr-auth-server\Source\.editorconfig cdr-auth-server\Source\.editorconfig
-
copy-item ..\..\cdr-auth-server\Source\CdrAuthServer\. cdr-auth-server\Source\CdrAuthServer -Recurse
copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.Domain\. cdr-auth-server\Source\CdrAuthServer.Domain -Recurse
copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.Repository\. cdr-auth-server\Source\CdrAuthServer.Repository -Recurse
copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.Infrastructure\. cdr-auth-server\Source\CdrAuthServer.Infrastructure -Recurse
copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.API.Logger\. cdr-auth-server\Source\CdrAuthServer.API.Logger -Recurse
copy-item ..\..\cdr-auth-server\Source\CdrAuthServer.UI\. cdr-auth-server\Source\CdrAuthServer.UI -Recurse
+
+copy-item ..\..\cdr-auth-server\Source\Directory.Build.props cdr-auth-server\Source\Directory.Build.props
+copy-item ..\..\cdr-auth-server\Source\.editorconfig cdr-auth-server\Source\.editorconfig
\ No newline at end of file