Skip to content

Assigning reference values in the config throws a warning #1095

@MatthewPaskin

Description

@MatthewPaskin

When assigning the reference values in the config using a dictionary, pydantic throws a serialization warning when assigning the data:

PydanticSerializationUnexpectedValue(Expected Reference - serialized value may not be as expected [field_name='ref', input_value={'DOI': 'example'}, input_type=dict])

A solution with an alternative to explicitly assigning a Reference object is needed to assign data through code, rather than in the YAML directly. The most intuitive way I see this happening is through a dictionary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1-bugSomething isn't working2-infra:data-modelPydantic data models & validation3-P2Medium priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions