WordPress allows registering meta values in the REST API through register_meta().
One can add a schema to the meta like so: