From 50a6c717bd07164f86e1d0391bb07241f1d55f45 Mon Sep 17 00:00:00 2001 From: Berislav Lopac Date: Fri, 10 Mar 2023 10:38:55 +0000 Subject: [PATCH] another loading fix --- pyapi/server/__init__.py | 2 +- pyproject.toml | 2 +- release-notes/0.3.3.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 release-notes/0.3.3.md diff --git a/pyapi/server/__init__.py b/pyapi/server/__init__.py index 0793773..2118481 100644 --- a/pyapi/server/__init__.py +++ b/pyapi/server/__init__.py @@ -42,7 +42,7 @@ def __init__( super().__init__(**kwargs) if isinstance(spec, dict): extra_kwargs: dict[str, Any] = {} - if validate_schema: + if not validate_schema: extra_kwargs["validator"] = None spec = Spec.from_dict(spec, spec_url=spec_url, **extra_kwargs) self.spec: Spec = spec diff --git a/pyproject.toml b/pyproject.toml index 2b24674..d3aa95e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pyapi-server" -version = "0.3.2" +version = "0.3.3" description = "Lightweight API framework using an OpenAPI spec for routing and validation." readme = "README.md" license = {text = "MIT"} diff --git a/release-notes/0.3.3.md b/release-notes/0.3.3.md new file mode 100644 index 0000000..76ddc30 --- /dev/null +++ b/release-notes/0.3.3.md @@ -0,0 +1 @@ +* minor fix with loading from file \ No newline at end of file