summaryrefslogtreecommitdiff
path: root/src/hydrilla
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla')
-rw-r--r--src/hydrilla/server/serve.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/hydrilla/server/serve.py b/src/hydrilla/server/serve.py
index 6cfceaa..8a2b3a5 100644
--- a/src/hydrilla/server/serve.py
+++ b/src/hydrilla/server/serve.py
@@ -42,9 +42,15 @@ from werkzeug import Response
from .. import util
from . import config
+from . import _version
here = Path(__file__).resolve().parent
+generated_by = {
+ 'name': 'hydrilla.server',
+ 'version': _version.version
+}
+
class ItemInfo(ABC):
"""Shortened data of a resource/mapping."""
def __init__(self, item_obj: dict):
@@ -532,10 +538,8 @@ def query():
mapping_refs = [i.as_query_result() for i in malcontent().query(url)]
result = {
'api_schema_version': [1],
- 'generated_by': {
- 'name': 'hydrilla'
- },
- 'mappings': mapping_refs
+ 'mappings': mapping_refs,
+ 'generated_by': generated_by
}
return json.dumps(result)