Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pygleif/api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@
from datetime import datetime
from typing import Any

from pydantic import Field

from .shared import BaseSchema

DESCRIPTION_VALUES: dict[str, str] = {
"lei": (
"The LEI code is a 20-character, alpha-numeric code that defines the ISO "
"17442 compatible identifier for the legal entity."
),
}


class ValidatedAt(BaseSchema):
"""Represent validated at information."""
Expand All @@ -30,7 +39,7 @@ class Registration(BaseSchema):
class GeneralEntity(BaseSchema):
"""Represent a general entity ."""

lei: str | None
lei: str | None = Field(..., description=DESCRIPTION_VALUES["lei"])
name: str | None


Expand Down Expand Up @@ -105,7 +114,7 @@ class Attributes(BaseSchema):
"""Represent attribute information."""

bic: list[str] | None
lei: str
lei: str = Field(..., description=DESCRIPTION_VALUES["lei"])
entity: Entity
registration: Registration

Expand Down