Implement deriving schema from doc attributes