Lint errors

This PR updates the resource descriptors document to include a new top level property called 'descriptor_type'.  It currently may be "resource" or "error" with it defaulting to "resource".  In the future I would like to support "partial" to allow descriptors documents to share descriptor elements.
The two above method calls share same Hash. Please DRY it up so you're only defining Hash once.