That type definition is not allowed at the top level. We could put it in the package object, but I find that confusing.
If you put it in the `mappingType` object, you have to use `MappingType.MappingType` instead of `MappingType.Value`, which is weird.
So in principle I agree, but I don't see an elegant solution.