Skip to content

Alias is being applied to typescript type #2

Closed
@brysgo

Description

@brysgo

Thanks for this utility, it is pretty neat. One thing I noticed was that if we have an alias on the pydantic model (e.g. to map mongodb's _id to an id field on the model):

  id: Optional[PyObjectId] = Field(alias='_id', default_factory=PyObjectId)

The typescript type uses _id instead of id, even though the field name as far as the API is concerned is id.

Since I'm not sure about the internals of this project, I'm not sure if it is possible to fix, but I figured I would leave it here in case it is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions