generalize resource loading for raml parser and schema validator