diff --git a/CHANGELOG.md b/CHANGELOG.md index 76efc34..6602115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.3 + +* **Add `/check` as the plugin connection-check route**: generated plugin apps now expose `/check` alongside `/precheck` for the v3 plugin contract. + ## 0.1.2 * **Bump locked `certifi` to 2026.10.19.** The release removes the emSign ECC Root CA - G3 root after eight eMudhra intermediate CA private keys were compromised. `requests` and `httpx` trust certifi's bundle and do not check revocation, so with the older bundle they accepted certificates chaining to that root. Only the lockfile changes; the `certifi` requirement for installs is unchanged, so upgrade `certifi` in your own environment. diff --git a/test/api/test_api.py b/test/api/test_api.py index 7ecb1e6..6d817e3 100644 --- a/test/api/test_api.py +++ b/test/api/test_api.py @@ -59,6 +59,15 @@ def generic_validation(self): ] +def test_check_alias_matches_precheck_noop_response(): + from test.assets.empty_input_and_response import SampleClass as TestClass + + test_class = TestClass() + client = TestClient(wrap_in_fastapi(func=test_class.do_nothing, plugin_id="mock_plugin")) + + assert client.get("/check").json() == client.get("/precheck").json() + + @pytest.mark.parametrize( "file_data", mock_file_data, ids=[type(fd).__name__ for fd in mock_file_data] ) diff --git a/unstructured_platform_plugins/__version__.py b/unstructured_platform_plugins/__version__.py index a88d269..506147f 100644 --- a/unstructured_platform_plugins/__version__.py +++ b/unstructured_platform_plugins/__version__.py @@ -1 +1 @@ -__version__ = "0.1.2" # pragma: no cover +__version__ = "0.1.3" # pragma: no cover diff --git a/unstructured_platform_plugins/etl_uvicorn/api_generator.py b/unstructured_platform_plugins/etl_uvicorn/api_generator.py index ab31e3a..5aa7ef1 100644 --- a/unstructured_platform_plugins/etl_uvicorn/api_generator.py +++ b/unstructured_platform_plugins/etl_uvicorn/api_generator.py @@ -475,7 +475,6 @@ async def get_schema() -> SchemaOutputResponse: resp = SchemaOutputResponse(inputs=schema["inputs"], outputs=schema["outputs"]) return resp - @fastapi_app.get("/precheck") async def run_precheck() -> InvokePrecheckResponse: if precheck_func: fn_response = await wrap_fn(func=precheck_func) @@ -489,6 +488,9 @@ async def run_precheck() -> InvokePrecheckResponse: else: return InvokePrecheckResponse(status_code=status.HTTP_200_OK, usage=[]) + fastapi_app.get("/check")(run_precheck) + fastapi_app.get("/precheck")(run_precheck) + @fastapi_app.get("/id") async def get_id() -> str: return plugin_id