Slight refactor for raml resource