src/schemathesis/loaders.py
def from_dict(
    raw_schema: Dict[str, Any],
    location: Optional[str] = None,
    base_url: Optional[str] = None,
    method: Optional[Filter] = None,
    endpoint: Optional[Filter] = None,
    tag: Optional[Filter] = None,
    *,
    app: Any = None,
) -> BaseSchema:
    """Get a proper abstraction for the given raw schema."""
    if "swagger" in raw_schema:
        return SwaggerV20(
            raw_schema, location=location, base_url=base_url, method=method, endpoint=endpoint, tag=tag, app=app
        )

    if "openapi" in raw_schema:
        return OpenApi30(
            raw_schema, location=location, base_url=base_url, method=method, endpoint=endpoint, tag=tag, app=app
        )
    raise ValueError("Unsupported schema type")
Get a proper abstraction for the given raw schema.
Get a proper abstraction for the given raw schema.
Get a proper abstraction for the given raw schema .
def from_dict(
    raw_schema: Dict[str, Any],
    location: Optional[str] = None,
    base_url: Optional[str] = None,
    method: Optional[Filter] = None,
    endpoint: Optional[Filter] = None,
    tag: Optional[Filter] = None,
    *,
    app: Any = None,
) -> BaseSchema:
    if "swagger" in raw_schema:
        return SwaggerV20(
            raw_schema, location=location, base_url=base_url, method=method, endpoint=endpoint, tag=tag, app=app
        )
    if "openapi" in raw_schema:
        return OpenApi30(
            raw_schema, location=location, base_url=base_url, method=method, endpoint=endpoint, tag=tag, app=app
        )
    raise ValueError("Unsupported schema type")
def from_dict ( raw_schema : Dict [ str , Any ] , location : Optional [ str ] = None , base_url : Optional [ str ] = None , method : Optional [ Filter ] = None , endpoint : Optional [ Filter ] = None , tag : Optional [ Filter ] = None , * , app : Any = None , ) -> BaseSchema : if "swagger" in raw_schema : return SwaggerV20 ( raw_schema , location = location , base_url = base_url , method = method , endpoint = endpoint , tag = tag , app = app ) if "openapi" in raw_schema : return OpenApi30 ( raw_schema , location = location , base_url = base_url , method = method , endpoint = endpoint , tag = tag , app = app ) raise ValueError ( "Unsupported schema type" )
Get a proper abstraction for the given raw schema.
Get a proper abstraction for the given raw schema .
"""Get a proper abstraction for the given raw schema."""
raw_schema
Dict[str, Any]
location
Optional[str]
base_url
Optional[str]
method
Optional[Filter]
endpoint
Optional[Filter]
tag
Optional[Filter]
app
Any