def get_namespace_specs(uri, prefix=None):
    """ Get the OpenAPI specifications of a namespace

    Args:
        uri (:obj:`string`): URI
        prefix (:obj:`string`. optional): prefix

    Returns:
        :obj:`dict` with schema `Namespace`
    """
    if prefix:
        return {
            '_type': 'Namespace',
            'prefix': prefix,
            'uri': uri,
        }
    else:
        return {
            '_type': 'Namespace',
            'uri': uri,
        }