pre resolve $ref