Skip to content

Commit

Permalink
⬆️♻️ Fixes openapi generators for web-api and drops openapi-core de…
Browse files Browse the repository at this point in the history
…pendencies (#6787)
  • Loading branch information
pcrespov authored Nov 22, 2024
1 parent ca228c3 commit 28a54d6
Show file tree
Hide file tree
Showing 44 changed files with 6,965 additions and 7,407 deletions.
1 change: 1 addition & 0 deletions .vscode/launch.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"--log-cli-level=INFO",
"--pdb",
"--setup-show",
"--durations=5",
"-sx",
"-vv",
"${file}"
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ auto-doc: .stack-simcore-version.yml ## Auto generates diagrams for README.md
# Updating docs/img
@mv --verbose $<.png docs/img/

.PHONY: services.md
services.md: ## Auto generates service.md
.PHONY: services.ignore.md
services.ignore.md: ## Auto generates service.md
# Making $@
scripts/echo_services_markdown.py > $@

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DEFAULT_GOAL := all

.PHONY: _check_venv_active
_check_venv_active:
Expand All @@ -6,13 +7,12 @@ _check_venv_active:


.PHONY: install
install: _check_venv_active
@cd ./../../../../services/storage && make install-dev && cd -
install-dev install: _check_venv_active
# installing storage and requirements.txt
@cd ./../../../services/storage && make install-dev && cd -
@uv pip install -r requirements.txt


.PHONY: all
all: _check_venv_active
@for file in *.py; do \
python $$file; \
done
all: _check_venv_active install
python openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from models_library.projects_nodes_io import LocationID, StorageFileID
from models_library.users import UserID
from pydantic import AnyUrl, ByteSize
from servicelib.fastapi.openapi import create_openapi_specs
from servicelib.long_running_tasks._models import TaskGet, TaskId, TaskStatus
from settings_library.s3 import S3Settings
from simcore_service_storage._meta import API_VTAG
Expand All @@ -35,6 +36,7 @@
FileMetaData,
SearchFilesQueryParams,
)
from simcore_service_storage.resources import storage_resources

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


if __name__ == "__main__":
from _common import CURRENT_DIR, create_openapi_specs
openapi = create_openapi_specs(app, drop_fastapi_default_422=True)

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

0 comments on commit 28a54d6

Please sign in to comment.