Skip to content

Commit

Permalink
chore: remove excluded fields workaround from example models
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-pl committed Feb 7, 2025
1 parent bdede63 commit bfa4c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions examples/full_static_fastapi_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Annotated

from fastapi import FastAPI, Query
from pydantic import BaseModel, Field
from pydantic import BaseModel
from rdfproxy import (
ConfigDict,
Page,
Expand Down Expand Up @@ -46,8 +46,6 @@ class Author(BaseModel):
works: list[Work]
education: Annotated[list[str], SPARQLBinding("educatedAt")]

workName: str = Field(exclude=True, description="Excluded field for ordering.")


adapter = SPARQLModelAdapter(
target="https://query.wikidata.org/bigdata/namespace/wdq/sparql",
Expand Down
4 changes: 1 addition & 3 deletions examples/wikidata_ungrouped_person_fastapi_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Annotated

from fastapi import FastAPI, Query
from pydantic import BaseModel, Field
from pydantic import BaseModel
from rdfproxy import Page, QueryParameters, SPARQLBinding, SPARQLModelAdapter


Expand All @@ -26,8 +26,6 @@ class Person(BaseModel):
name: str
work: Work

work_name: Annotated[str, SPARQLBinding("title")] = Field(exclude=True)


adapter = SPARQLModelAdapter(
target="https://query.wikidata.org/bigdata/namespace/wdq/sparql",
Expand Down

0 comments on commit bfa4c8b

Please sign in to comment.