Issue #233: Fix "resource" for reference fields.
Issue #226: Add allowed values for reference fields.