openapi: Convert deprecated Spec.create to Spec.from_dict.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 85681546ce)
This commit is contained in:
Anders Kaseorg
2023-06-11 13:14:07 -07:00
committed by Alex Vandiver
parent 1a4214a488
commit 7bb554d58b

View File

@@ -103,7 +103,7 @@ class OpenAPISpec:
openapi = yaml.load(f, Loader=yaml.CSafeLoader)
spec = Spec.create(openapi)
spec = Spec.from_dict(openapi)
self._spec = spec
self._openapi = naively_merge_allOf_dict(JsonRef.replace_refs(openapi))
self.create_endpoints_dict()