2021-03-07 16:19:43 +03:00
|
|
|
package space.kscience.visionforge.examples
|
2020-12-06 19:16:48 +03:00
|
|
|
|
|
|
|
import com.github.ricky12awesome.jss.encodeToSchema
|
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-03-07 16:19:43 +03:00
|
|
|
import space.kscience.visionforge.solid.SolidGroup
|
|
|
|
import space.kscience.visionforge.solid.Solids
|
2020-12-06 19:16:48 +03:00
|
|
|
|
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
|
|
|
}
|