-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from HLTech/feature/vaunt-serializer-usage
Use VauntSerializer from vaunt-core instead of own mapper
- Loading branch information
Showing
8 changed files
with
23 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...main/kotlin/com/hltech/judged/contracts/publisher/capabilities/VauntCapabilitiesReader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
package com.hltech.judged.contracts.publisher.capabilities | ||
|
||
import com.hltech.judged.contracts.publisher.vaunt.VauntFileReader | ||
import com.hltech.judged.contracts.publisher.vaunt.vauntObjectMapper | ||
import com.hltech.vaunt.core.VauntSerializer | ||
import org.gradle.api.Project | ||
|
||
class VauntCapabilitiesReader : CapabilitiesReader { | ||
|
||
private val fileReader = VauntFileReader() | ||
private val mapper = vauntObjectMapper() | ||
private val serializer = VauntSerializer() | ||
|
||
override fun read(project: Project): Capabilities { | ||
val contracts = fileReader.read(project) | ||
.flatMap { it.capabilities.contracts } | ||
.toList() | ||
|
||
return Capabilities("jms", mapper.writeValueAsString(contracts), "application/json") | ||
return Capabilities("jms", serializer.serialize(contracts), "application/json") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
src/main/kotlin/com/hltech/judged/contracts/publisher/vaunt/VauntObjectMapper.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters