Skip to content

Commit

Permalink
Merge pull request #712 from camptocamp/fix-async
Browse files Browse the repository at this point in the history
Fix get JSON schema
  • Loading branch information
sbrunner authored Feb 24, 2025
2 parents 079392e + b7c76f9 commit 950ed7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion github_app_geo_project/module/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion github_app_geo_project/views/schema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Output view."""

import asyncio
import json
import logging
from pathlib import Path
Expand Down Expand Up @@ -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()),
],
}

Expand Down

0 comments on commit 950ed7c

Please sign in to comment.