Read the specification provided. It can either be a url or a file
        location.

def _get_specification(self, specification):
        """
        Read the specification provided. It can either be a url or a file
        location.
        """
        result = six.moves.urllib.parse.urlparse(specification)

        # If the specification has an http or an https scheme we can
        # retrieve it via an HTTP get request, else we try to open it
        # as a file.
        if result.scheme in ['http', 'https']:
            response = requests.get(specification)
            spec_json = response.json()
        else:
            with open(specification, 'r') as spec_file:
                spec_json = json.load(spec_file)

        return spec_json