Skip to content

Commit

Permalink
Merge pull request #82 from OpSecId/pstlouis/add_service_type_array_u…
Browse files Browse the repository at this point in the history
…secase

Allow list or string as service type + test cases
  • Loading branch information
dbluhm authored Jan 5, 2024
2 parents 9fe696f + 7fb4932 commit 0bed560
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pydid/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Service(Resource):
"""Representation of DID Document Services."""

id: DIDUrl
type: str
type: Union[str, List[str]]
service_endpoint: Union[
EndpointStrings,
List[Union[EndpointStrings, Mapping[str, Any]]],
Expand Down
5 changes: 5 additions & 0 deletions tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
"routingKeys": ["did:example:somemediator#somekey"],
},
},
{
"id": "did:web:example.com#linked-domain",
"type": ["LinkedDomains"],
"serviceEndpoint": "https://example.com",
},
]

INVALID_SERVICES = [
Expand Down

0 comments on commit 0bed560

Please sign in to comment.