def resolve(self, ref, document=None):
"""Resolve a ref within the schema.
This is just a convenience method, since RefResolver returns both a URI
and the resolved value, and we usually just need the resolved value.
:param str ref: URI to resolve.
:param dict document: Optional schema in which to resolve the URI.
:returns: the portion of the schema that the URI references.
:see: :meth:`SchemaRefResolver.resolve`
"""
_, resolved = self.resolver.resolve(ref, document=document)
return resolved
评论列表
文章目录