Skip to content

way to create mixed xml\non-xml models #282

@hellozyemlya

Description

@hellozyemlya

First of all, many thanks for good library.
Question is - is there a way to create mixed model like

class MyModel(BaseModel):
    a: int
    b: str


class XmlModel(BaseXmlModel):
    b: MyModel = Field()
    a: str = attr()

where XmlModel.b is ignored when deserializing\serializing to xml?

Clarification - to be used with model_dump to dict, but ignored for xml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions