Skip to content

Commit 28a54d6

Browse files
authored
⬆️♻️ Fixes openapi generators for web-api and drops openapi-core dependencies (#6787)
1 parent ca228c3 commit 28a54d6

File tree

44 files changed

+6965
-7407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+6965
-7407
lines changed

.vscode/launch.template.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"--log-cli-level=INFO",
1616
"--pdb",
1717
"--setup-show",
18+
"--durations=5",
1819
"-sx",
1920
"-vv",
2021
"${file}"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ auto-doc: .stack-simcore-version.yml ## Auto generates diagrams for README.md
601601
# Updating docs/img
602602
@mv --verbose $<.png docs/img/
603603

604-
.PHONY: services.md
605-
services.md: ## Auto generates service.md
604+
.PHONY: services.ignore.md
605+
services.ignore.md: ## Auto generates service.md
606606
# Making $@
607607
scripts/echo_services_markdown.py > $@
608608

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DEFAULT_GOAL := all
12

23
.PHONY: _check_venv_active
34
_check_venv_active:
@@ -6,13 +7,12 @@ _check_venv_active:
67

78

89
.PHONY: install
9-
install: _check_venv_active
10-
@cd ./../../../../services/storage && make install-dev && cd -
10+
install-dev install: _check_venv_active
11+
# installing storage and requirements.txt
12+
@cd ./../../../services/storage && make install-dev && cd -
1113
@uv pip install -r requirements.txt
1214

1315

1416
.PHONY: all
15-
all: _check_venv_active
16-
@for file in *.py; do \
17-
python $$file; \
18-
done
17+
all: _check_venv_active install
18+
python openapi.py

api/specs/storage/scripts/storage.py renamed to api/specs/storage/openapi.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from models_library.projects_nodes_io import LocationID, StorageFileID
2828
from models_library.users import UserID
2929
from pydantic import AnyUrl, ByteSize
30+
from servicelib.fastapi.openapi import create_openapi_specs
3031
from servicelib.long_running_tasks._models import TaskGet, TaskId, TaskStatus
3132
from settings_library.s3 import S3Settings
3233
from simcore_service_storage._meta import API_VTAG
@@ -35,6 +36,7 @@
3536
FileMetaData,
3637
SearchFilesQueryParams,
3738
)
39+
from simcore_service_storage.resources import storage_resources
3840

3941
TAGS_DATASETS: list[str | Enum] = ["datasets"]
4042
TAGS_FILES: list[str | Enum] = ["files"]
@@ -401,6 +403,7 @@ async def cancel_and_delete_task(task_id: TaskId):
401403

402404

403405
if __name__ == "__main__":
404-
from _common import CURRENT_DIR, create_openapi_specs
406+
openapi = create_openapi_specs(app, drop_fastapi_default_422=True)
405407

406-
create_openapi_specs(app, CURRENT_DIR.parent / "openapi.yaml")
408+
oas_path = storage_resources.get_path("api/v0/openapi.yaml").resolve()
409+
print(f"Writing {oas_path}...", end=None)

0 commit comments

Comments
 (0)