src/schemathesis/loaders.py
def from_uri(
    uri: str,
    base_url: Optional[str] = None,
    method: Optional[Filter] = None,
    endpoint: Optional[Filter] = None,
    tag: Optional[Filter] = None,
    *,
    app: Any = None,
    **kwargs: Any,
) -> BaseSchema:
    """Load a remote resource and parse to schema instance."""
    kwargs.setdefault("headers", {}).setdefault("User-Agent", USER_AGENT)
    response = requests.get(uri, **kwargs)
    try:
        response.raise_for_status()
    except requests.HTTPError:
        raise HTTPError(response=response, url=uri)
    if base_url is None:
        base_url = get_base_url(uri)
    return from_file(response.text, location=uri, base_url=base_url, method=method, endpoint=endpoint, tag=tag, app=app)
Load a remote resource and parse to schema instance.
Load a remote resource and parse to schema instance.
Load a remote resource and parse to schema instance .
def from_uri(
    uri: str,
    base_url: Optional[str] = None,
    method: Optional[Filter] = None,
    endpoint: Optional[Filter] = None,
    tag: Optional[Filter] = None,
    *,
    app: Any = None,
    **kwargs: Any,
) -> BaseSchema:
    kwargs.setdefault("headers", {}).setdefault("User-Agent", USER_AGENT)
    response = requests.get(uri, **kwargs)
    try:
        response.raise_for_status()
    except requests.HTTPError:
        raise HTTPError(response=response, url=uri)
    if base_url is None:
        base_url = get_base_url(uri)
    return from_file(response.text, location=uri, base_url=base_url, method=method, endpoint=endpoint, tag=tag, app=app)
def from_uri ( uri : str , base_url : Optional [ str ] = None , method : Optional [ Filter ] = None , endpoint : Optional [ Filter ] = None , tag : Optional [ Filter ] = None , * , app : Any = None , ** kwargs : Any , ) -> BaseSchema : kwargs . setdefault ( "headers" , { } ) . setdefault ( "User-Agent" , USER_AGENT ) response = requests . get ( uri , ** kwargs ) try : response . raise_for_status ( ) except requests . HTTPError : raise HTTPError ( response = response , url = uri ) if base_url is None : base_url = get_base_url ( uri ) return from_file ( response . text , location = uri , base_url = base_url , method = method , endpoint = endpoint , tag = tag , app = app )
Load a remote resource and parse to schema instance.
Load a remote resource and parse to schema instance .
"""Load a remote resource and parse to schema instance."""
uri
str
base_url
Optional[str]
method
Optional[Filter]
endpoint
Optional[Filter]
tag
Optional[Filter]
app
Any
kwargs
Any