openapi: Fix minor assertion in curl examples.

Now, include and exclude configuration
are fetched from openapi data, and only
one type can be encoded for every example.

This removes the need for the assertion to
test if both include and exclude are present
since at a time, only one can be present.
This commit is contained in:
Suyash Vardhan Mathur 2021-06-21 16:31:29 +05:30 committed by Tim Abbott
parent a2be9a0e2d
commit 6bd11285c1
1 changed files with 0 additions and 2 deletions

View File

@ -259,8 +259,6 @@ def generate_curl_example(
exclude: Optional[List[str]] = None, exclude: Optional[List[str]] = None,
include: Optional[List[str]] = None, include: Optional[List[str]] = None,
) -> List[str]: ) -> List[str]:
if exclude is not None and include is not None:
raise AssertionError("exclude and include cannot be set at the same time.")
lines = ["```curl"] lines = ["```curl"]
operation = endpoint + ":" + method.lower() operation = endpoint + ":" + method.lower()