diff --git a/github_app_geo_project/module/tests/__init__.py b/github_app_geo_project/module/tests/__init__.py index 775ebaa6d3..8d23e5354f 100644 --- a/github_app_geo_project/module/tests/__init__.py +++ b/github_app_geo_project/module/tests/__init__.py @@ -139,7 +139,7 @@ async def process( with open("/results/test-result.yaml", "w", encoding="utf-8") as file: file.write(yaml.dump(result)) - def get_json_schema(self) -> dict[str, Any]: + async def get_json_schema(self) -> dict[str, Any]: """Get the JSON schema of the module configuration.""" return { "type": "object", diff --git a/github_app_geo_project/views/schema.py b/github_app_geo_project/views/schema.py index d345014c51..9c9d3560a2 100644 --- a/github_app_geo_project/views/schema.py +++ b/github_app_geo_project/views/schema.py @@ -1,5 +1,6 @@ """Output view.""" +import asyncio import json import logging from pathlib import Path @@ -41,7 +42,7 @@ def schema_view(request: pyramid.request.Request) -> dict[str, Any]: "description": modules.MODULES[module_name].description(), "allOf": [ {"$ref": "#/$defs/module-configuration"}, - modules.MODULES[module_name].get_json_schema(), + asyncio.run(modules.MODULES[module_name].get_json_schema()), ], }