mountaineer 0.4.1.dev2__tar.gz → 0.4.1.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/Cargo.lock +1 -1
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/Cargo.toml +1 -1
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/PKG-INFO +1 -1
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/client_builder/test_build_actions.py +60 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/client_builder/test_build_links.py +45 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/build_actions.py +15 -4
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/build_links.py +3 -1
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/build_schemas.py +4 -25
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/openapi.py +20 -27
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/typescript.py +58 -4
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/pyproject.toml +1 -1
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.git-blame-ignore-revs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.gitattributes +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/README_SCRIPTS.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/poetry.lock +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/pyproject.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/scripts/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/scripts/__tests__/test_update_version.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/scripts/check_dependencies.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/scripts/update_version.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/workflows/publish_docs.yml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/workflows/test.yml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/workflows/validate.yml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.gitignore +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/Dockerfile +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/LICENSE +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/Makefile +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/README.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/benchmarking/README.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/benchmarking/benchmarking/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/benchmarking/benchmarking/simple_render.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/benchmarking/poetry.lock +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/benchmarking/pyproject.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/README.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/app.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/config.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/complex.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/detail.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/home.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/stream.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/main.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/complex/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/detail/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/home/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/main.css +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/stream/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/package-lock.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/package.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/postcss.config.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/tailwind.config.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/poetry.lock +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/pyproject.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/README.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/__tests__/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/__tests__/common.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/__tests__/test_builder.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/__tests__/test_cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/__tests__/test_generation.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/builder.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/environments/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/environments/base.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/environments/poetry.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/environments/venv.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/external.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/generation.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/io.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/.zed/settings.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/editor_configs/vim/.vimrc +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/editor_configs/vscode/.vscode/settings.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/editor_configs/zed/pyrightconfig.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/.env +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/.gitignore +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/README.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/app.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/config.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/controllers/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/controllers/detail.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/controllers/home.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/main.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/models/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/models/detail.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/app/detail/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/app/home/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/app/main.css +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/package.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/postcss.config.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/[project_name]/views/tailwind.config.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/docker-compose.yml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/create_mountaineer_app/templates/project/pyproject.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/poetry.lock +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/create_mountaineer_app/pyproject.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/.zed/settings.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/README.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/CNAME +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/actions.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/api_exception.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/app-controller.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/build_plugins/base.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/build_plugins/javascript.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/build_plugins/postcss.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/cli.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/config.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/controller.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/core_dependencies.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/database/config.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/database/dependencies.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/logging.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/render.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/ssr.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/api/watch_server.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/client_actions.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/cma.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/database.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/deploy.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/error_handling.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/index.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/internal/core_library.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/links.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/media/final_todo_list.png +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/media/ide_typehints.png +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/media/network_debug.png +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/media/server_side_rendering.png +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/metadata.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/postcss.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/quickstart.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/static_analysis.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/structure.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/stylesheets/extra.css +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/docs/views.md +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/mkdocs.yml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/overrides/partials/footer.html +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/poetry.lock +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/docs_website/pyproject.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/media/header.png +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/actions/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/actions/test_fields.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/actions/test_passthrough.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/actions/test_sideeffect.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/client_builder/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/client_builder/test_build_schemas.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/client_builder/test_builder.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/client_builder/test_typescript.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/common.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/conftest.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/database/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/database/dependencies/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/database/dependencies/conftest.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/database/dependencies/test_core.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/database/test_config.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/database/test_sqlmodel.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/dependencies/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/dependencies/test_base.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/fixtures/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/fixtures/complex_controller_ssr_with_react.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/fixtures/home_controller_source_map.js.map +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/fixtures/home_controller_ssr_with_react.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/js_compiler/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/js_compiler/test_javascript.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/js_compiler/test_postcss.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/js_compiler/test_source_maps.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_annotation_helpers.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_app.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_cache.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_config.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_controller.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_cropper.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_exceptions.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_logging.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_paths.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_ssr.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/__tests__/test_watch.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/actions/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/actions/fields.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/actions/passthrough.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/actions/sideeffect.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/annotation_helpers.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/app.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/cache.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/builder.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/config.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/constants.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/controller.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/controllers/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/controllers/exception_controller.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/cropper.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/cli.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/config.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/dependencies/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/dependencies/core.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/sqlmodel.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/database/validator.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/dependencies/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/dependencies/base.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/dependencies/core/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/dependencies/core/core.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/exceptions.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/io.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/js_compiler/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/js_compiler/base.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/js_compiler/exceptions.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/js_compiler/javascript.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/js_compiler/postcss.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/js_compiler/source_maps.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/logging.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/paths.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/py.typed +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/render.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/ssr.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/static/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/static/api.ts +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/static/live_reload.ts +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/static/ssr_polyfills.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/test_utilities.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/__init__.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/core/exception/page.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/core/layout.tsx +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/core/main.css +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/package-lock.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/package.json +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/postcss.config.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/views/tailwind.config.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/watch.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/watch_server.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/webservice.py +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/poetry.lock +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/benches/fixtures/complex_sourcemap_mapping.txt +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/benches/fixtures/home_controller_ssr_with_react.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/benches/fixtures/ssr_polyfill_archive.js +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/benches/lexers_benchmark.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/benches/source_map_benchmark.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/benches/ssr_benchmark.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/errors.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/lexers.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/lib.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/logging.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/source_map.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/ssr.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src/timeout.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src_go/Cargo.toml +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src_go/build.rs +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src_go/go/js_build.go +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src_go/go.mod +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src_go/go.sum +0 -0
- {mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/src_go/src/lib.rs +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
from datetime import datetime
|
|
1
2
|
from re import sub as re_sub
|
|
3
|
+
from uuid import UUID
|
|
2
4
|
|
|
3
5
|
import pytest
|
|
4
6
|
from fastapi import APIRouter
|
|
@@ -125,6 +127,37 @@ EXAMPLE_RESPONSE_400 = ContentBodyDefinition(
|
|
|
125
127
|
"ExampleResponseModel",
|
|
126
128
|
],
|
|
127
129
|
),
|
|
130
|
+
# No request body parameter
|
|
131
|
+
(
|
|
132
|
+
"my_method_fn",
|
|
133
|
+
"/testing/url",
|
|
134
|
+
ActionDefinition(
|
|
135
|
+
action_type=ActionType.POST,
|
|
136
|
+
summary="",
|
|
137
|
+
operationId="",
|
|
138
|
+
requestBody=None,
|
|
139
|
+
responses={
|
|
140
|
+
"200": EXAMPLE_RESPONSE_200,
|
|
141
|
+
"422": EXAMPLE_RESPONSE_400,
|
|
142
|
+
},
|
|
143
|
+
),
|
|
144
|
+
(
|
|
145
|
+
"""
|
|
146
|
+
export const my_method_fn = (): Promise<ExampleResponseModel> => {
|
|
147
|
+
return __request({
|
|
148
|
+
'method': 'POST',
|
|
149
|
+
'url': '/testing/url',
|
|
150
|
+
'errors': {
|
|
151
|
+
422: HTTPValidationErrorException
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
"""
|
|
156
|
+
),
|
|
157
|
+
[
|
|
158
|
+
"ExampleResponseModel",
|
|
159
|
+
],
|
|
160
|
+
),
|
|
128
161
|
# Path and query parameters
|
|
129
162
|
(
|
|
130
163
|
"my_method_fn",
|
|
@@ -363,3 +396,30 @@ def test_build_raw_response_action(
|
|
|
363
396
|
built_function, build_imports = builder.build_action(url, definition, method_name)
|
|
364
397
|
assert re_sub(r"\s+", "", built_function) == re_sub(r"\s+", "", expected_function)
|
|
365
398
|
assert set(build_imports) == set(expected_imports)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
AnyType = None | bool | str | int | datetime | UUID
|
|
402
|
+
DictParamItem = dict[str, AnyType]
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
def test_build_invalid_action_api():
|
|
406
|
+
"""
|
|
407
|
+
Ensure that we throw an error if the user has provided a schema payload
|
|
408
|
+
that is technically valid, but doesn't allow typehinting with pydantic. All non-raw
|
|
409
|
+
JSON requests should be Pydantic methods.
|
|
410
|
+
|
|
411
|
+
https://github.com/piercefreeman/mountaineer/issues/94
|
|
412
|
+
|
|
413
|
+
"""
|
|
414
|
+
|
|
415
|
+
def fn1(payload: DictParamItem, item_id: str, other_id: str) -> None:
|
|
416
|
+
pass
|
|
417
|
+
|
|
418
|
+
router = APIRouter()
|
|
419
|
+
router.post("/fn1")(fn1)
|
|
420
|
+
|
|
421
|
+
builder = OpenAPIToTypescriptActionConverter()
|
|
422
|
+
openapi_spec = get_openapi(title="", version="", routes=router.routes)
|
|
423
|
+
|
|
424
|
+
with pytest.raises(ValueError):
|
|
425
|
+
builder.convert(openapi_spec)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
from enum import StrEnum
|
|
1
2
|
from re import sub as re_sub
|
|
2
3
|
from typing import Callable
|
|
4
|
+
from uuid import UUID
|
|
3
5
|
|
|
4
6
|
import pytest
|
|
5
7
|
from fastapi import APIRouter
|
|
@@ -20,6 +22,20 @@ def view_endpoint_query_params(query_a: str, query_b: int | None = None):
|
|
|
20
22
|
pass
|
|
21
23
|
|
|
22
24
|
|
|
25
|
+
class RouteType(StrEnum):
|
|
26
|
+
ROUTE_A = "route_a"
|
|
27
|
+
ROUTE_B = "route_b"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def enum_view_url(model_type: RouteType, model_id: UUID):
|
|
31
|
+
"""
|
|
32
|
+
Model view paths like /{model_type}/{model_id} where we want a flexible
|
|
33
|
+
string to be captured in the model_type path.
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
|
|
23
39
|
@pytest.mark.parametrize(
|
|
24
40
|
"url, endpoint, expected_link",
|
|
25
41
|
[
|
|
@@ -98,6 +114,35 @@ def view_endpoint_query_params(query_a: str, query_b: int | None = None):
|
|
|
98
114
|
"""
|
|
99
115
|
),
|
|
100
116
|
),
|
|
117
|
+
# Path with enum path variables - we should typehint explicitly
|
|
118
|
+
# as the enum based values
|
|
119
|
+
(
|
|
120
|
+
"/enum_view/{model_type}/{model_id}",
|
|
121
|
+
enum_view_url,
|
|
122
|
+
(
|
|
123
|
+
"""
|
|
124
|
+
export const getLink = ({
|
|
125
|
+
model_type,
|
|
126
|
+
model_id
|
|
127
|
+
}:{
|
|
128
|
+
model_type: 'route_a' | 'route_b',
|
|
129
|
+
model_id: string
|
|
130
|
+
}) => {
|
|
131
|
+
const url = `/enum_view/{model_type}/{model_id}`;
|
|
132
|
+
const queryParameters: Record<string,any> = {};
|
|
133
|
+
const pathParameters: Record<string,any> = {
|
|
134
|
+
model_type,
|
|
135
|
+
model_id
|
|
136
|
+
};
|
|
137
|
+
return __getLink({
|
|
138
|
+
rawUrl: url,
|
|
139
|
+
queryParameters,
|
|
140
|
+
pathParameters
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
"""
|
|
144
|
+
),
|
|
145
|
+
),
|
|
101
146
|
],
|
|
102
147
|
)
|
|
103
148
|
def test_convert(url: str, endpoint: Callable, expected_link: str):
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/build_actions.py
RENAMED
|
@@ -204,12 +204,16 @@ class OpenAPIToTypescriptActionConverter:
|
|
|
204
204
|
if not action.is_raw_response:
|
|
205
205
|
response_types.append(
|
|
206
206
|
self.get_typescript_name_from_content_definition(
|
|
207
|
-
response_definition.content_schema
|
|
207
|
+
response_definition.content_schema,
|
|
208
|
+
url=url,
|
|
209
|
+
status_code=status_int,
|
|
208
210
|
)
|
|
209
211
|
)
|
|
210
212
|
else:
|
|
211
213
|
error_typehint = self.get_typescript_name_from_content_definition(
|
|
212
|
-
response_definition.content_schema
|
|
214
|
+
response_definition.content_schema,
|
|
215
|
+
url=url,
|
|
216
|
+
status_code=status_int,
|
|
213
217
|
)
|
|
214
218
|
common_params["errors"][status_int] = TSLiteral(
|
|
215
219
|
# Provide a mapping to the error class
|
|
@@ -253,11 +257,18 @@ class OpenAPIToTypescriptActionConverter:
|
|
|
253
257
|
return method_names
|
|
254
258
|
|
|
255
259
|
def get_typescript_name_from_content_definition(
|
|
256
|
-
self,
|
|
260
|
+
self,
|
|
261
|
+
definition: ContentDefinition,
|
|
262
|
+
# Url and status are provided for more context about where the error
|
|
263
|
+
# is being thrown. Can pass None if not available.
|
|
264
|
+
url: str | None = None,
|
|
265
|
+
status_code: int | None = None,
|
|
257
266
|
):
|
|
258
267
|
if not definition.schema_ref.ref:
|
|
259
268
|
raise ValueError(
|
|
260
|
-
f"Content definition {definition} does not have a schema reference"
|
|
269
|
+
f"Content definition {definition} does not have a schema reference.\n"
|
|
270
|
+
f"Double check your action definition for {url} with response code {status_code}.\n"
|
|
271
|
+
"Are you typehinting your response with a Pydantic BaseModel?"
|
|
261
272
|
)
|
|
262
273
|
return definition.schema_ref.ref.split("/")[-1]
|
|
263
274
|
|
|
@@ -58,7 +58,9 @@ class OpenAPIToTypescriptLinkConverter:
|
|
|
58
58
|
}:
|
|
59
59
|
continue
|
|
60
60
|
|
|
61
|
-
typehint_key, typehint_value = get_typehint_for_parameter(
|
|
61
|
+
typehint_key, typehint_value = get_typehint_for_parameter(
|
|
62
|
+
parameter, openapi_spec
|
|
63
|
+
)
|
|
62
64
|
input_parameters[TSLiteral(parameter.name)] = TSLiteral(parameter.name)
|
|
63
65
|
typehint_parameters[typehint_key] = typehint_value
|
|
64
66
|
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/mountaineer/client_builder/build_schemas.py
RENAMED
|
@@ -6,12 +6,13 @@ from typing import Any, Dict, Iterator, Type, get_args, get_origin
|
|
|
6
6
|
from inflection import camelize
|
|
7
7
|
from pydantic import BaseModel, create_model
|
|
8
8
|
|
|
9
|
-
from mountaineer.annotation_helpers import
|
|
9
|
+
from mountaineer.annotation_helpers import yield_all_subtypes
|
|
10
10
|
from mountaineer.client_builder.openapi import (
|
|
11
11
|
EmptyAPIProperty,
|
|
12
12
|
OpenAPIProperty,
|
|
13
13
|
OpenAPISchema,
|
|
14
14
|
OpenAPISchemaType,
|
|
15
|
+
resolve_ref,
|
|
15
16
|
)
|
|
16
17
|
from mountaineer.client_builder.typescript import (
|
|
17
18
|
TSLiteral,
|
|
@@ -103,7 +104,7 @@ class OpenAPIToTypescriptSchemaConverter:
|
|
|
103
104
|
):
|
|
104
105
|
yield property
|
|
105
106
|
if property.ref is not None:
|
|
106
|
-
yield from walk_models(
|
|
107
|
+
yield from walk_models(resolve_ref(property.ref, base))
|
|
107
108
|
if property.items:
|
|
108
109
|
yield from walk_models(property.items)
|
|
109
110
|
if property.anyOf:
|
|
@@ -116,28 +117,6 @@ class OpenAPIToTypescriptSchemaConverter:
|
|
|
116
117
|
|
|
117
118
|
return list(set(walk_models(base)))
|
|
118
119
|
|
|
119
|
-
def resolve_ref(self, ref: str, base: BaseModel) -> OpenAPIProperty:
|
|
120
|
-
"""
|
|
121
|
-
Resolve a $ref that points to a propery-compliant schema in the same document. If this
|
|
122
|
-
ref points somewhere else in the document (that is valid but not a data model) than we
|
|
123
|
-
raise a ValueError.
|
|
124
|
-
|
|
125
|
-
"""
|
|
126
|
-
current_obj = base
|
|
127
|
-
for part in ref.split("/"):
|
|
128
|
-
if part == "#":
|
|
129
|
-
current_obj = base
|
|
130
|
-
else:
|
|
131
|
-
try:
|
|
132
|
-
current_obj = get_value_by_alias(current_obj, part)
|
|
133
|
-
except AttributeError as e:
|
|
134
|
-
raise AttributeError(
|
|
135
|
-
f"Invalid $ref, couldn't resolve path: {ref}"
|
|
136
|
-
) from e
|
|
137
|
-
if not isinstance(current_obj, OpenAPIProperty):
|
|
138
|
-
raise ValueError(f"Resolved $ref is not a valid OpenAPIProperty: {ref}")
|
|
139
|
-
return current_obj
|
|
140
|
-
|
|
141
120
|
def convert_schema_to_interface(
|
|
142
121
|
self,
|
|
143
122
|
model: OpenAPIProperty,
|
|
@@ -188,7 +167,7 @@ class OpenAPIToTypescriptSchemaConverter:
|
|
|
188
167
|
yield f"Array<{' | '.join(array_types)}>"
|
|
189
168
|
elif prop.ref:
|
|
190
169
|
yield self.get_typescript_interface_name(
|
|
191
|
-
|
|
170
|
+
resolve_ref(prop.ref, base=base)
|
|
192
171
|
)
|
|
193
172
|
elif prop.items:
|
|
194
173
|
yield from walk_array_types(prop.items)
|
|
@@ -4,6 +4,8 @@ from typing import Any, Optional, Union
|
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, ConfigDict, Field, model_validator
|
|
6
6
|
|
|
7
|
+
from mountaineer.annotation_helpers import get_value_by_alias
|
|
8
|
+
|
|
7
9
|
#
|
|
8
10
|
# Enum definitions
|
|
9
11
|
#
|
|
@@ -324,33 +326,24 @@ class OpenAPIDefinition(BaseModel):
|
|
|
324
326
|
#
|
|
325
327
|
|
|
326
328
|
|
|
327
|
-
def
|
|
329
|
+
def resolve_ref(ref: str, base: BaseModel) -> OpenAPIProperty:
|
|
328
330
|
"""
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
Resolve a $ref that points to a propery-compliant schema in the same document. If this
|
|
332
|
+
ref points somewhere else in the document (that is valid but not a data model) than we
|
|
333
|
+
raise a ValueError.
|
|
331
334
|
|
|
332
335
|
"""
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
yield from get_types_from_parameters(schema.items)
|
|
348
|
-
|
|
349
|
-
if schema.anyOf:
|
|
350
|
-
for one_of in schema.anyOf:
|
|
351
|
-
yield from get_types_from_parameters(one_of)
|
|
352
|
-
|
|
353
|
-
# We don't expect $ref values in the URL schema, if we do then the parsing
|
|
354
|
-
# is likely incorrect
|
|
355
|
-
if schema.ref:
|
|
356
|
-
raise ValueError(f"Unexpected $ref in URL schema: {schema.ref}")
|
|
336
|
+
current_obj = base
|
|
337
|
+
for part in ref.split("/"):
|
|
338
|
+
if part == "#":
|
|
339
|
+
current_obj = base
|
|
340
|
+
else:
|
|
341
|
+
try:
|
|
342
|
+
current_obj = get_value_by_alias(current_obj, part)
|
|
343
|
+
except AttributeError as e:
|
|
344
|
+
raise AttributeError(
|
|
345
|
+
f"Invalid $ref, couldn't resolve path: {ref}"
|
|
346
|
+
) from e
|
|
347
|
+
if not isinstance(current_obj, OpenAPIProperty):
|
|
348
|
+
raise ValueError(f"Resolved $ref is not a valid OpenAPIProperty: {ref}")
|
|
349
|
+
return current_obj
|
|
@@ -5,10 +5,14 @@ Python definitions.
|
|
|
5
5
|
"""
|
|
6
6
|
from typing import Any
|
|
7
7
|
|
|
8
|
+
from pydantic import BaseModel
|
|
9
|
+
|
|
8
10
|
from mountaineer.client_builder.openapi import (
|
|
11
|
+
EmptyAPIProperty,
|
|
12
|
+
OpenAPIProperty,
|
|
9
13
|
OpenAPISchemaType,
|
|
10
14
|
URLParameterDefinition,
|
|
11
|
-
|
|
15
|
+
resolve_ref,
|
|
12
16
|
)
|
|
13
17
|
|
|
14
18
|
|
|
@@ -85,12 +89,62 @@ def map_openapi_type_to_ts(openapi_type: OpenAPISchemaType):
|
|
|
85
89
|
return mapping[openapi_type]
|
|
86
90
|
|
|
87
91
|
|
|
88
|
-
def
|
|
92
|
+
def get_types_from_parameters(
|
|
93
|
+
schema: OpenAPIProperty | EmptyAPIProperty, base_openapi_spec: BaseModel | None
|
|
94
|
+
):
|
|
95
|
+
"""
|
|
96
|
+
Handle potentially complex types from the parameter schema, like the case
|
|
97
|
+
of optional fields.
|
|
98
|
+
|
|
99
|
+
"""
|
|
100
|
+
if isinstance(schema, EmptyAPIProperty):
|
|
101
|
+
return "any"
|
|
102
|
+
|
|
103
|
+
# Recursively gather all of the types that might be nested
|
|
104
|
+
for property in schema.properties.values():
|
|
105
|
+
yield from get_types_from_parameters(property, base_openapi_spec)
|
|
106
|
+
|
|
107
|
+
if schema.additionalProperties:
|
|
108
|
+
yield from get_types_from_parameters(
|
|
109
|
+
schema.additionalProperties, base_openapi_spec
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
if schema.items:
|
|
113
|
+
yield from get_types_from_parameters(schema.items, base_openapi_spec)
|
|
114
|
+
|
|
115
|
+
if schema.anyOf:
|
|
116
|
+
for one_of in schema.anyOf:
|
|
117
|
+
yield from get_types_from_parameters(one_of, base_openapi_spec)
|
|
118
|
+
|
|
119
|
+
# Mutually exclusive definitions
|
|
120
|
+
if schema.enum:
|
|
121
|
+
yield " | ".join([f"'{enum_value}'" for enum_value in schema.enum])
|
|
122
|
+
elif schema.variable_type:
|
|
123
|
+
yield map_openapi_type_to_ts(schema.variable_type)
|
|
124
|
+
|
|
125
|
+
# If we're able to resolve the ref, do so. Some clients call this to get a limited
|
|
126
|
+
# scope of known parameters, so this value is optional.
|
|
127
|
+
if schema.ref:
|
|
128
|
+
if base_openapi_spec:
|
|
129
|
+
ref = resolve_ref(schema.ref, base_openapi_spec)
|
|
130
|
+
yield from get_types_from_parameters(ref, base_openapi_spec)
|
|
131
|
+
else:
|
|
132
|
+
raise ValueError(
|
|
133
|
+
f"Unexpected $ref in schema: {schema.ref}, no base schema passed for resolution"
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def get_typehint_for_parameter(
|
|
138
|
+
parameter: URLParameterDefinition, base: BaseModel | None = None
|
|
139
|
+
):
|
|
89
140
|
"""
|
|
90
141
|
Get the typehint for a parameter, which may be a single type or a union of types.
|
|
91
142
|
|
|
143
|
+
Providing the "base" OpenAPI schema allows us to resolve refs. Otherwise we will just
|
|
144
|
+
parse the types directly from the parameter and throw an error on ref resolution.
|
|
145
|
+
|
|
92
146
|
"""
|
|
93
|
-
parameter_types = set(get_types_from_parameters(parameter.schema_ref))
|
|
147
|
+
parameter_types = set(get_types_from_parameters(parameter.schema_ref, base))
|
|
94
148
|
|
|
95
149
|
key = TSLiteral(parameter.name) + (
|
|
96
150
|
TSLiteral("?") if not parameter.required else TSLiteral("")
|
|
@@ -98,7 +152,7 @@ def get_typehint_for_parameter(parameter: URLParameterDefinition):
|
|
|
98
152
|
value = TSLiteral(
|
|
99
153
|
" | ".join(
|
|
100
154
|
# Sort helps with consistency of generated code
|
|
101
|
-
sorted(
|
|
155
|
+
sorted(parameter_types)
|
|
102
156
|
)
|
|
103
157
|
)
|
|
104
158
|
|
|
@@ -9,7 +9,7 @@ exclude = [ "fixtures", "ci_webapp", "create_mountaineer_app", "media", "docs_we
|
|
|
9
9
|
|
|
10
10
|
[tool.poetry]
|
|
11
11
|
name = "mountaineer"
|
|
12
|
-
version = "0.4.1.
|
|
12
|
+
version = "0.4.1.dev3"
|
|
13
13
|
description = ""
|
|
14
14
|
authors = [ "Pierce Freeman <pierce@freeman.vc>",]
|
|
15
15
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/.github/scripts/__tests__/test_update_version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/benchmarking/benchmarking/simple_render.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/__init__.py
RENAMED
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/controllers/complex.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/complex/page.tsx
RENAMED
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/detail/page.tsx
RENAMED
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/home/page.tsx
RENAMED
|
File without changes
|
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/app/stream/page.tsx
RENAMED
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/package-lock.json
RENAMED
|
File without changes
|
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/postcss.config.js
RENAMED
|
File without changes
|
{mountaineer-0.4.1.dev2 → mountaineer-0.4.1.dev3}/ci_webapp/ci_webapp/views/tailwind.config.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|