Fix mapping serialization

This commit is contained in:
Mikołaj Pich 2024-05-14 21:04:17 +02:00
parent f71903d7f2
commit a60ef809c0
No known key found for this signature in database
2 changed files with 20 additions and 4 deletions

View file

@ -20,10 +20,10 @@ fun generateMappingJson(
vTokenSchemeMap: Map<String, Map<String, String>>, vTokenSchemeMap: Map<String, Map<String, String>>,
): String { ): String {
return json.encodeToString( return json.encodeToString(
mapOf( Mapping(
"endpoints" to endpoints, endpoints = endpoints,
"vTokens" to vTokenMap, vTokens = vTokenMap,
"vTokenScheme" to vTokenSchemeMap, vTokenScheme = vTokenSchemeMap,
) )
) )
} }

View file

@ -1,3 +1,19 @@
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class Mapping(
@SerialName("endpoints")
val endpoints: Map<String, Map<String, Map<String, String>>>,
@SerialName("vTokens")
val vTokens: Map<String, Map<String, Map<String, String>>>,
@SerialName("vTokenScheme")
val vTokenScheme: Map<String, Map<String, String>>,
)
val ApiEndpointsMap = mapOf( val ApiEndpointsMap = mapOf(
"24.04.0002.58666" to mapOf( "24.04.0002.58666" to mapOf(
"uonetplus-uczen" to mapOf( "uonetplus-uczen" to mapOf(