Skip to content

Handle LinkML migration issue of 'pydantic2linkml: Unable to translate the logic contained in the wrap validation function, <function _BaseUrl.__get_pydantic_core_schema__.<locals>.wrap_val  #390

@candleindark

Description

@candleindark

pydantic2linkml has the complains starting with

"pydantic2linkml: Unable to translate the logic contained in the wrap validation function, <function _BaseUrl.__get_pydantic_core_schema__.<locals>.wrap_val"

in generating slot and slot_usage entires.

Cause

All of these arise from the translation of the pydantic.AnyHttpUrl type.

Stats

Total number of such complains: 17

They can be located with regex (?s)Unable to translate the logic contained in the.+wrap.+validation.+function.+function _BaseUrl.__get_pydantic_core_schema__ in Pycharm with filter set to "In String Literals".

Possible solution

The involved slots seem to be already translated to one with range or uri. One can possibly just do without the additional restriction wrapped in the _BaseUrl.__get_pydantic_core_schema__ validator which is packed inside the pydantic.AnyHttpUrl type. In this solution, we can just remove the notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions