Schemathesis

Latest version: v3.38.9

Safety actively analyzes 685670 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 51

3.24.3

:bug: Fixed

- Incorrect base URL handling for GraphQL schemas. 1987

3.24.2

:tada: Another small release that makes Schemathesis' Python API easier to use.

:rocket: Added

- **Python**: Shortcut to create strategies for all operations or a subset of them via `schema.as_strategy()` and `schema["/path/"].as_strategy()`. 1982

:wrench: Changed

- **Python**: Cleaner `repr` for GraphQL & Open API schemas.
- **GraphQL**: Show suggestion when a field is not found in `schema["Query"][field_name]`.

:bug: Fixed

- Filter out test cases that can not be serialized when the API operation requires `application/x-www-form-urlencoded`. 1306

3.24.1

A small follow-up patch release that addresses missing `override` on lazy-loaded schemas and a few GraphQL-related bugs.

:wrench: Changed

- Cleanup SSL error messages.

:bug: Fixed

- Internal error when an unresolvable pointer occurs during data generation.
- Internal errors when references lead to non-objects.
- Missing `schema.override` on schemas created via the `from_pytest_fixture` loader.
- Not calling hooks for `query` / `cookies` / `headers` in GraphQL schemas. 1978
- Inability to access individual operations in GraphQL schema objects. 1976

3.24.0

In this update, I've focused on significantly improving configuration flexibility and testing explicit examples from the spec. Key highlights include:

Open API parameter overrides

Introducing an easier and more efficient way to override Open API parameters directly in CLI or Python tests:

shell
$ st run --set-query apiKey=secret --set-path user_id=42 ...


and

python
schema.parametrize()
schema.override(path_parameters={"user_id": "42"}, query={"apiKey": "secret"})
def test_api(case):
...


This way, parameter overrides will only be applied to API operations that use the overridden parameters and won't take time during data generation.

Reworked schema examples testing

A nearly full rewrite of how Schemathesis handles explicit example testing. It fixes a couple of bugs and allows for testing all `examples` keywords, including ones inside individual properties, or different media types.

:rocket: Added

- CLI options for overriding Open API parameters in test cases. 1676
- A way to override Open API parameters in the `pytest` integration with the `override` decorator. 8
- **Open API**: Support for the `examples` keyword inside individual property schemas. 1730, 1320
- **Open API**: Extract explicit examples from all defined media types. 921

:wrench: Changed

- Raise an error if it is not possible to generate explicit examples. 1771
- Avoid using the deprecated `cgi` module. 1962

:bug: Fixed

- **Open API**: Properly combine multiple explicit examples extracted from `examples` and `example` fields. 1360
- **Open API**: Ignoring examples referenced via the `$ref` keyword. 1692

3.23.1

:wrench: Changed

- Do not auto-detect spec if the `--force-schema-version` CLI option is present.
- Do not assume GraphQL when trying to auto-detect spec in an empty input file.

:bug: Fixed

- Internal error when the schema file is empty.

3.23.0

:tada: This release offers a better example testing and aids Dredd users transitioning to Schemathesis.

:rocket: Added

- New CLI option `--contrib-openapi-fill-missing-examples` to automatically generate random examples for API operations that lack explicit examples. 1728, 1376
- New CLI option `--request-proxy` to set HTTP(s) proxies for network calls. 1723

:wrench: Changed

- Validate `--generation-codec` values in CLI.
- Do not deepcopy responses before passing to checks. They are not supposed to be mutated inside checks.
- Pin `anyio` to `<4` due to incompatibility with `starlette-testclient`.

:bug: Fixed

- Internal error when the configured proxy is not available.
- Not using `examples` from shared `parameters`. 1729, 1513

Page 11 of 51

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.