add the function type when building a schema