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>>,
): String {
return json.encodeToString(
mapOf(
"endpoints" to endpoints,
"vTokens" to vTokenMap,
"vTokenScheme" to vTokenSchemeMap,
Mapping(
endpoints = endpoints,
vTokens = vTokenMap,
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(
"24.04.0002.58666" to mapOf(
"uonetplus-uczen" to mapOf(