From d1eda4aaf785d4f1ec69ce4542b59c5ecd01d0b9 Mon Sep 17 00:00:00 2001 From: Pietro Pasotti Date: Mon, 2 Dec 2024 10:19:56 +0100 Subject: [PATCH] source host field type fix --- interfaces/grafana_datasource/v0/schema.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/interfaces/grafana_datasource/v0/schema.py b/interfaces/grafana_datasource/v0/schema.py index ab5007a2..1d35db2e 100644 --- a/interfaces/grafana_datasource/v0/schema.py +++ b/interfaces/grafana_datasource/v0/schema.py @@ -1,8 +1,7 @@ from typing import Dict, Any -from pydantic import Json, BaseModel, Field - from interface_tester.schema_base import DataBagSchema +from pydantic import Json, BaseModel, Field class GrafanaSourceData(BaseModel): @@ -27,7 +26,10 @@ class GrafanaSourceProviderAppData(BaseModel): class GrafanaSourceProviderUnitData(BaseModel): """Application databag model for the requirer side of this interface.""" - grafana_source_host: Json[GrafanaSourceData] + grafana_source_host: str = Field( + description="Hostname of a source server.", + examples=['localhost:80'] + ) class ProviderSchema(DataBagSchema):