Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Nov 8, 2022
1 parent 591418b commit 629f363
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bentoml/_internal/service/openapi/specification.py
Expand Up @@ -104,7 +104,7 @@ class Schema:
anyOf: t.Optional[t.List[Schema]] = None
not_: t.Optional[Schema] = None
items: t.Optional[t.Union[Schema, t.List[Schema]]] = None
properties: t.Optional[t.Dict[str, Schema | Reference]] = None
properties: t.Optional[t.Dict[str, t.Union[Schema, Reference]]] = None
additionalProperties: t.Optional[t.Union[Schema, Reference, bool]] = None
description: t.Optional[str] = None
format: t.Optional[str] = None
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/_internal/io/test_numpy.py
Expand Up @@ -85,6 +85,8 @@ def test_numpy_openapi_request_body():

nparray = NumpyNdarray(dtype="float")
nparray.sample_input = ExampleGeneric("asdf") # type: ignore (test exception)
with pytest.raises(BadInput):
nparray.openapi_example()


def test_numpy_openapi_responses():
Expand Down

0 comments on commit 629f363

Please sign in to comment.