package Ġbr . com . gui ab ol so . hyper loop . schemas Ċ Ċ import Ġbr . com . gui ab ol so . hyper loop . model . Schema Data Ċ import Ġcom . fasterxml . jackson . databind . Deserialization Feature Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġcom . fasterxml . jackson . data format . yaml . YAML Factory Ċ import Ġcom . fasterxml . jackson . module . kotlin . Kotlin Module Ċ import Ġcom . fasterxml . jackson . module . kotlin . readValue Ċ Ċ class ĠSchema Data Repository ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġschema Repository : ĠSchema Repository < String > Ċ ) Ġ: ĠSchema Repository < Schema Data > Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġget ( schema Key : ĠSchema Key ): ĠSchema Data Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġschema Str Ġ= Ġschema Repository . get ( schema Key ) ĊĠĠĠĠĠĠĠ Ġreturn Ġmapper . readValue ( schema Str ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġmapper Ġ= ĠObjectMapper ( YAML Factory ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. register Module ( Kotlin Module ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. configure ( Deserialization Feature . FAIL _ ON _ UNKNOWN _ PROPERTIES , Ġfalse ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. configure ( Deserialization Feature . ACCEPT _ SINGLE _ VALUE _ AS _ ARRAY , Ġtrue ) ĊĠĠĠ Ġ} Ċ }