Skip to content

Commit

Permalink
Merge pull request #15 from swisscom/feature/37791-ignore-version-in-…
Browse files Browse the repository at this point in the history
…media-type

#37791 cdr-api no longer requires the version as part of the content …
  • Loading branch information
Lesrac authored Oct 30, 2024
2 parents 9aadde1 + 246b8d3 commit d30e45a
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ client:
base-path: api/documents
customer:
- connector-id: 8000000000000
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: /tmp/download/8000000000000
source-folder: /tmp/source/8000000000000
mode: test
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config/application-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ client:
customer:
# MUST BE SET IN ENVIRONMENT
# - connector-id: 1
# content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
# content-type: application/forumdatenaustausch+xml;charset=UTF-8
# target-folder: /tmp/download
# source-folder: /tmp/upload
# mode: test|production
12 changes: 6 additions & 6 deletions src/main/resources/config/application-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ client:
base-path: documents
customer:
- connector-id: 1
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${cdrClient.targetFolder}/${client.customer[0].connector-id}/test
source-folder: ${cdrClient.sourceFolder}/${client.customer[0].connector-id}/test
mode: test
- connector-id: 1
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${cdrClient.targetFolder}/${client.customer[1].connector-id}
source-folder: ${cdrClient.sourceFolder}/${client.customer[1].connector-id}
mode: production
- connector-id: 1234
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${cdrClient.targetFolder}/${client.customer[2].connector-id}
source-folder: ${cdrClient.sourceFolder}/${client.customer[2].connector-id}
mode: test
- connector-id: 5
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${cdrClient.targetFolder}/${client.customer[3].connector-id}
source-folder: ${cdrClient.sourceFolder}/${client.customer[3].connector-id}
mode: test
- connector-id: 666
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${cdrClient.targetFolder}/${client.customer[4].connector-id}
source-folder: ${cdrClient.sourceFolder}/${client.customer[4].connector-id}
mode: production
- connector-id: 2345
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${cdrClient.targetFolder}/${client.customer[5].connector-id}
source-folder: ${cdrClient.sourceFolder}/${client.customer[5].connector-id}
mode: production
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ internal class PullDocumentDownloadSchedulerAndFileHandlerMultipleConnectorTest
private val connectorId1 = "1234"
private val connectorId2 = "3456"

private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5")
private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8")

@BeforeEach
fun setup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class CdrClientConfigTest {
const val FUNCTION_KEY = "functionKey123"

@JvmStatic
val FORUM_DATENAUSTAUSCH_MEDIA_TYPE = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5")
val FORUM_DATENAUSTAUSCH_MEDIA_TYPE = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8")

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal class EventPushFileHandlingTest {

private val targetDirectory = "customer"
private val sourceDirectory = "source"
private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5")
private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8")

private lateinit var cdrServiceMock: MockWebServer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal class PollingPushFileHandlingTest {
private val inflightFolder = "inflight"
private val targetDirectory = "customer"
private val sourceDirectory = "source"
private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5")
private val forumDatenaustauschMediaType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8")

private lateinit var cdrServiceMock: MockWebServer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ internal class PullFileHandlingTest {
connectorId = connectorId,
targetFolder = targetFolder,
sourceFolder = sourceFolder,
contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5"),
contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8"),
mode = CdrClientConfig.Mode.PRODUCTION
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ internal class DocumentDownloadSchedulerTest {
connectorId = "1234",
targetFolder = targetDir,
sourceFolder = sourceDir,
contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8;version=4.5"),
contentType = MediaType.parseMediaType("application/forumdatenaustausch+xml;charset=UTF-8"),
mode = CdrClientConfig.Mode.TEST
)
every { config.customer } returns listOf(connector)
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/application-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ client:
base-path: documents
customer:
- connector-id: 1
content-type: application/forumdatenaustausch+xml;charset=UTF-8;version=4.5
content-type: application/forumdatenaustausch+xml;charset=UTF-8
target-folder: ${java.io.tmpdir}
source-folder: ${java.io.tmpdir}/cdr-client-test-source # If you change this, then you need to change com.swisscom.health.des.cdr.clientvm.AlwaysSameTempDirFactory as well
mode: test

0 comments on commit d30e45a

Please sign in to comment.