Skip to content

Commit

Permalink
add vocabulary for language
Browse files Browse the repository at this point in the history
  • Loading branch information
rababerladuseladim committed Aug 14, 2023
1 parent f0acba4 commit 8622873
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mex/common/models/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ class Frequency(VocabularyEnum):
__vocabulary__ = "frequency"


class Language(VocabularyEnum):
"""Language type."""

__vocabulary__ = "language"


class License(VocabularyEnum):
"""License type."""

Expand Down Expand Up @@ -82,7 +88,9 @@ class BaseResource(BaseModel):
instrumentToolOrApparatus: list[Text] = []
isPartOf: list[ResourceID] = []
keyword: list[Text] = []
language: list[str] = Field([], enum=["de", "en"])
language: list[Language] = Field(
[], examples=["https://mex.rki.de/item/language-1"]
)
license: list[License] = Field(
[],
examples=["https://mex.rki.de/item/license-1"],
Expand Down

0 comments on commit 8622873

Please sign in to comment.