Skip to content

Commit 16e1ad0

Browse files
committed
feat: add utility to check V2 and V3 compatibility
1 parent eeda50e commit 16e1ad0

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

deepaas/api/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ def get_fastapi_app(
9999
response_model=responses.VersionsAndLinks,
100100
)
101101

102+
# Add a redirect from the old swagger.json to the new openapi.json
103+
APP.add_api_route(
104+
f"{base_path}/swagger.json",
105+
APP.openapi,
106+
methods=["GET"],
107+
summary="Get OpenAPI schema",
108+
tags=["version"],
109+
)
110+
102111
return APP
103112

104113

deepaas/model/v2/wrapper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import contextlib
2020
import functools
2121
import io
22+
2223
# import os
2324
# import tempfile
2425

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ classifiers = [
4141
[tool.poetry.scripts]
4242
deepaas-run = "deepaas.cmd.run:main"
4343
deepaas-cli = "deepaas.cmd.cli:main"
44+
deepaas-test-v2-v3 = "deepaas.cmd.deepaas_test_v2_v3:main"
4445

4546
[tool.poetry.plugins] # Optional super table
4647

0 commit comments

Comments
 (0)