-
Notifications
You must be signed in to change notification settings - Fork 516
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
[BUG] did:web
resolution incorrect service type validation
#2677
Comments
Shoot. This is a PyDID issue. This has the potential to be a painful change though; several routines scan through services expecting to find a string. Out of curiosity, do you have an example of this in use? |
The traceability interoperability spec uses a list for the One could just use a string instead however this prevents interoperability with the did core specification. |
Tagging this link to keep breadcrumbs of the work: |
@dbluhm we fixed this in the pydid library and a new version was released. Is there anything we need to do on aca-py side to pull this new version or is it auto-magical? |
I believe we may need to do a poetry.lock update so the images will include the newer version. If pulled via PyPI or github as a dependency of another project, I think the current version constraint will correctly resolve to the new pydid version but the dependent projects would also need to do something like a |
closing as #2737 was merged and addresses this issue |
When resolving a
did:web
with the/resolver/resolve/
endpoint the validation checks if theservice.type
is a string. According to the did core spec, this value can be a string or an array.Having an array for the
service.type
raises this error:500: Response was incorrectly formatted. Failed to deserialize DIDDocumentRoot:. 1 validation error for ParsingModel[DIDDocumentRoot]. __root__ -> service -> 0 -> type. str type expected (type=type_error.str). [ErrorWrapper(exc=ValidationError(model='DIDDocumentRoot', errors=[{'loc': ('service', 0, 'type'), 'msg': 'str type expected', 'type': 'type_error.str'}]), loc=('__root__',))].
Changing the
service.type
to a string instead of an array resolves this error however both should be valid.The text was updated successfully, but these errors were encountered: