Skip to content

Commit 9629592

Browse files
authored
Add compat for openapi-core 0.15 (#281)
1 parent 0d9d027 commit 9629592

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jupyterlab_server/spec.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66

77
def get_openapi_spec():
88
"""Get the OpenAPI spec object."""
9-
from openapi_core import create_spec
9+
try:
10+
from openapi_core import OpenAPISpec as Spec
11+
12+
create_spec = Spec.create
13+
except ImportError:
14+
from openapi_core import create_spec
1015

1116
openapi_spec_dict = get_openapi_spec_dict()
1217
return create_spec(openapi_spec_dict)

0 commit comments

Comments
 (0)