Skip to content

Commit

Permalink
add pattern for normalized_id
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Sep 13, 2023
1 parent a7e21eb commit 65f4daf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions disease/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Dict, List, Literal, Optional, Union

from ga4gh.core import core_models
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr, constr

from disease.version import __version__

Expand Down Expand Up @@ -295,7 +295,9 @@ class NormalizationService(BaseModel):
query: StrictStr
warnings: Optional[Dict] = None
match_type: MatchType
normalized_id: Optional[str] = None
normalized_id: Optional[
constr(pattern=r"^normalize.disease.\w[^:]*:.+$") # noqa: F722
] = None
disease: Optional[core_models.Disease] = None
source_meta_: Optional[Dict[SourceName, SourceMeta]] = None
service_meta_: ServiceMeta
Expand Down

0 comments on commit 65f4daf

Please sign in to comment.