Skip to content

Commit

Permalink
docs: Minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed Mar 30, 2021
1 parent 5307af4 commit 9010191
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/how.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Schemathesis converts Open API schemas to compatible JSON Schemas and passes the
If the API schema is complex or deeply nested, data generation may be slow or produce data without much variance.
It is a known behavior and caused by the way Hypothesis works internally.
There are many tradeoffs in this process, and Hypothesis tries to give reasonable defaults for a typical case
and not be too slow for corner cases.
and not be too slow for pathological cases.

Payload serialization
---------------------
Expand All @@ -32,7 +32,7 @@ In Open API 3.0, you may write something like this:
type: object
required: true
In this example, operation ```POST /pet`` expects ``application/json`` payload. For each defined media type Schemathesis
In this example, operation ``POST /pet`` expects ``application/json`` payload. For each defined media type Schemathesis
generates data according to the relevant schema (``{"type": "object"}`` in the example).

.. note:: This data is stored in the ``case`` fixture you use in tests when you use our ``pytest`` integration.
Expand All @@ -44,8 +44,8 @@ media types via the ``serializers`` mechanism.
Schemathesis uses ``requests`` to send API requests over network and ``werkzeug.Client`` for direct WSGI integration.
Serializers define the process of transforming generated Python objects into structures that can be sent by these tools.

If Schemathesis is unable to serialize data for a media type, the generated samples will be rejected. If you do not have
a different media type for the tested operation that Schemathesis can serialize, you will see a ``Unsatisfiable`` error.
If Schemathesis is unable to serialize data for a media type, the generated samples will be rejected.
If an API operation does not define media types that Schemathesis can serialize, you will see a ``Unsatisfiable`` error.

If the operation under tests considers payload to be optional, these cases are still generated by Schemathesis, but
not passed to serializers.
Expand Down Expand Up @@ -121,7 +121,7 @@ First, let's define a function that will transform lists of dictionaries to CSV
Second, register a serializer class via the ``schemathesis.serializers.register`` decorator:

.. code-block:: python
:emphasize-lines: 3
:emphasize-lines: 4
import schemathesis
Expand Down

0 comments on commit 9010191

Please sign in to comment.