Using Custom Root Types, Pydantic allows for defining models based on a derived Python type. As an extended prefix map is just a list of a records, it can be defined with the following:
class Records(BaseModel):
__root__ = List[Record]
ideally, additional metadata is added such that better JSON schema / FastAPI endpoints can be generated using this
Using Custom Root Types, Pydantic allows for defining models based on a derived Python type. As an extended prefix map is just a list of a records, it can be defined with the following:
ideally, additional metadata is added such that better JSON schema / FastAPI endpoints can be generated using this