italia / eudi-wallet-it-python

Python toolchain for building an OpenID4VP RP with a SATOSA backend compliant with the Italian Wallet implementation profile
Apache License 2.0
16 stars 8 forks source link

feat: presentation definition schema Pydantic model #196

Closed salvatorelaiso closed 7 months ago

salvatorelaiso commented 7 months ago

Generated schema with datamodel-codegen tool.

The resulting schema is updated to reflect changes in Pydantic V2.0

The model has been generated starting from the schema Presentation Definition (GitHub).

This json-schema presents a reference to Claim format designations to specify the values allowed in input descriptor's format field (ref).

The values must be matched by one of the following regex:

None of the above matches the value vc+sd-jwt, which is the expected value according to https://openid.github.io/oid4vc-haip-sd-jwt-vc/draft-oid4vc-haip-sd-jwt-vc.html#name-presentation-definition.

@peppelinux What do we do? We can either extend the above matching by including a case which captures the value vc+sd-jwt or simply drop the regular expressions and match exactly this value.

peppelinux commented 7 months ago

please add in the documentation in the repository how you have used datamodel-codegen for producing the pydantic schema, with an example

this will help contributors in aligning the code when future release of the sd-jwt-vc schema will be provided in the official specs

peppelinux commented 7 months ago

What do we do? We can either extend the above matching by including a case which captures the value vc+sd-jwt or simply drop the regular expressions and match exactly this value.

it depends by the format supported, this behaviour is linked to this https://github.com/italia/eudi-wallet-it-python/issues/111

for the current milestone we just have to support sd-jwt, the next will have mdoc cbor as well

salvatorelaiso commented 7 months ago

Closes #193