Add object that represents an endpoint in the hierarchy.

This is an attempt to address wordnik/swagger.js/#36 and
part of wordnik/swagger-ui/#232