-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add kosthi adapter to container credentials moshi
- Loading branch information
1 parent
6f5b2df
commit 77b9de3
Showing
3 changed files
with
11 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
...c/main/kotlin/org/http4k/connect/amazon/containercredentials/ContainerCredentialsMoshi.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,17 +1,24 @@ | ||
package org.http4k.connect.amazon.containercredentials | ||
|
||
import com.squareup.moshi.JsonAdapter | ||
import com.squareup.moshi.Moshi | ||
import org.http4k.format.AwsCoreJsonAdapterFactory | ||
import org.http4k.format.ConfigurableMoshi | ||
import org.http4k.format.asConfigurable | ||
import org.http4k.format.withAwsCoreMappings | ||
import org.http4k.format.withStandardMappings | ||
import se.ansman.kotshi.KotshiJsonAdapterFactory | ||
|
||
object ContainerCredentialsMoshi : ConfigurableMoshi( | ||
Moshi.Builder() | ||
.add(AwsCoreJsonAdapterFactory()) | ||
.add(ContainerCredentialsAdapterFactory) | ||
.asConfigurable() | ||
.withStandardMappings() | ||
.withAwsCoreMappings() | ||
.done() | ||
) | ||
|
||
|
||
@KotshiJsonAdapterFactory | ||
internal object ContainerCredentialsAdapterFactory : JsonAdapter.Factory by KotshiContainerCredentialsAdapterFactory |
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