2021-01-12 12:52:22 +03:00
|
|
|
package hep.dataforge.vision.examples
|
2020-12-06 19:16:48 +03:00
|
|
|
|
|
|
|
import com.github.ricky12awesome.jss.encodeToSchema
|
2021-01-12 12:52:22 +03:00
|
|
|
import hep.dataforge.vision.solid.SolidGroup
|
2021-02-27 21:40:58 +03:00
|
|
|
import hep.dataforge.vision.solid.Solids
|
2021-02-24 22:48:17 +03:00
|
|
|
import kotlinx.serialization.ExperimentalSerializationApi
|
2020-12-06 19:16:48 +03:00
|
|
|
import kotlinx.serialization.json.Json
|
|
|
|
|
2021-02-24 22:48:17 +03:00
|
|
|
@ExperimentalSerializationApi
|
2020-12-06 19:16:48 +03:00
|
|
|
fun main() {
|
|
|
|
val schema = Json {
|
2021-02-27 21:40:58 +03:00
|
|
|
serializersModule = Solids.serializersModuleForSolids
|
2020-12-06 19:16:48 +03:00
|
|
|
prettyPrintIndent = " "
|
|
|
|
prettyPrint = true
|
|
|
|
ignoreUnknownKeys = true
|
|
|
|
isLenient = true
|
|
|
|
coerceInputValues = true
|
|
|
|
encodeDefaults = true
|
|
|
|
}.encodeToSchema(SolidGroup.serializer(), generateDefinitions = false)
|
|
|
|
println(schema)
|
2021-02-24 22:48:17 +03:00
|
|
|
}
|