Skip to content

Commit

Permalink
add kosthi adapter to container credentials moshi
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Jan 24, 2024
1 parent 6f5b2df commit 77b9de3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
This list is not intended to be all-encompassing - it will document major and breaking API
changes with their rationale when appropriate. Given version `A.B.C.D`, breaking changes are to be expected in version number increments where changes in the `A` or `B` sections:

### v5.6.8.2
- **http4k-connect-amazon-containercredentials*** - Add Kotshi adapter to Moshi instance.

### v5.6.8.1
- **http4k-connect-*** - Fix AutoMarshalledPageAction not recognising arrays with whitespace.

Expand Down
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
1 change: 1 addition & 0 deletions amazon/core/src/main/kotlin/org/http4k/format/CoreMoshi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.squareup.moshi.Moshi
object AwsCoreMoshi : ConfigurableMoshi(
Moshi.Builder()
.add(AwsCoreJsonAdapterFactory())
.add(CoreAdapterFactory)
.add(ListAdapter)
.add(MapAdapter)
.asConfigurable()
Expand Down

0 comments on commit 77b9de3

Please sign in to comment.