Skip to content

Commit 7ec5989

Browse files
committed
Fix #60
1 parent 224982f commit 7ec5989

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/py_semantic_taxonomy/adapters/routers/response_dto.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,5 @@ class Association(BaseModel):
254254
description="https://rdf-vocabulary.ddialliance.org/xkos.html#correspondences",
255255
example=[{"@id": "http://data.europa.eu/xsp/cn2024/010011000090"}],
256256
)
257+
258+
model_config = ConfigDict(extra="allow")

tests/unit/domain/test_association_entities.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,9 @@ def test_association_from_json_ld(cn):
108108

109109

110110
def test_association_to_json_ld(cn):
111+
cn.association_top["foo"] = "bar"
112+
113+
assert Association.from_json_ld(cn.association_top).extra["foo"] == "bar"
111114
given = Association.from_json_ld(cn.association_top).to_json_ld()
115+
assert given["foo"] == "bar"
112116
assert given == cn.association_top, "Conversion to JSON-LD failed"

0 commit comments

Comments
 (0)