-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with language strings #23
Comments
We think this should work with pydantic:
We are going create a small example and create an issue with pydantic. |
It seems that replacing LngString with:
It works as expected. I have opened an issue in koxudaxi/datamodel-code-generator#696. |
I will see if it's viable to monkeypatch this fix |
So far attempts at monkeypatching this have failed because of class inheritance - as we are patching in the helper classes as parents of the schema objects, anything they set (in this case |
Decided on the call to edit the skeleton document until this is fixed in pydantic. |
Skeleton edited - I will leave this issue open because it would still be better to find a sustainable fix that doesn't involve editing the skeleton file every time |
I've been looking at language strings particularly with labels e.g.:
The problem is the label is empty. This is due to the LngString class in the skeleton only containing
pass
.The relevant part of the schema is:
from IIIF Schema#L11 and it seems pydantic is struggling with patternProperties and how to convert them into python.
Relevant discussions on pydantics:
Example lngStrings include:
The text was updated successfully, but these errors were encountered: