Skip to content

Commit

Permalink
fix 0.14 support
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Jun 8, 2022
1 parent b747ad0 commit 9b37958
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions jupyterlab_server/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@

def get_openapi_spec():
"""Get the OpenAPI spec object."""
from openapi_core import OpenAPISpec as 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 Spec.create(openapi_spec_dict)
return create_spec(openapi_spec_dict)


def get_openapi_spec_dict():
Expand Down

0 comments on commit 9b37958

Please sign in to comment.