From 98d7e535a090e2d959debfcf33bad6db877cbb49 Mon Sep 17 00:00:00 2001 From: Lukas Plank Date: Tue, 3 Dec 2024 14:29:10 +0100 Subject: [PATCH] docs: adapt readme and examples to model field grouping --- README.md | 4 ++-- examples/full_static_fastapi_example.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d8940c0..b63f5a1 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,13 @@ from pydantic import BaseModel, ConfigDict from rdfproxy import Page, QueryParameters, SPARQLBinding, SPARQLModelAdapter class Work(BaseModel): - model_config = ConfigDict(group_by="workName") + model_config = ConfigDict(group_by="name") name: Annotated[str, SPARQLBinding("workName")] viafs: Annotated[list[str], SPARQLBinding("viaf")] class Author(BaseModel): - model_config = ConfigDict(group_by="authorName") + model_config = ConfigDict(group_by="surname") gnd: str surname: Annotated[str, SPARQLBinding("authorName")] diff --git a/examples/full_static_fastapi_example.py b/examples/full_static_fastapi_example.py index 5210238..38203ea 100644 --- a/examples/full_static_fastapi_example.py +++ b/examples/full_static_fastapi_example.py @@ -23,14 +23,14 @@ class Work(BaseModel): - model_config = ConfigDict(group_by="workName") + model_config = ConfigDict(group_by="name") name: Annotated[str, SPARQLBinding("workName")] viafs: Annotated[list[str], SPARQLBinding("viaf")] class Author(BaseModel): - model_config = ConfigDict(group_by="authorName") + model_config = ConfigDict(group_by="surname") gnd: str surname: Annotated[str, SPARQLBinding("authorName")]