Skip to content

Commit

Permalink
Add compat for openapi-core 0.15 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Jun 8, 2022
1 parent 0d9d027 commit 9629592
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jupyterlab_server/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

def get_openapi_spec():
"""Get the OpenAPI spec object."""
from openapi_core import create_spec
try:
from openapi_core import OpenAPISpec as Spec

create_spec = Spec.create
except ImportError:
from openapi_core import create_spec

openapi_spec_dict = get_openapi_spec_dict()
return create_spec(openapi_spec_dict)
Expand Down

0 comments on commit 9629592

Please sign in to comment.