matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
171 stars 91 forks source link

Use `OneTimeKeys` schema #1800

Closed zecakeh closed 2 months ago

zecakeh commented 2 months ago

This was commented prior to the port to OpenAPI 3.1 for technical reasons (#1127). Now we can use it just fine.

I am wondering if the oneOf: [string, KeyObject] is right, since the section about one-time and fallback keys clearly says that only signed_curve25519 is used in this case.

This adds the KeyObject definition in several places:

image

Preview: https://pr1800--matrix-spec-previews.netlify.app

richvdh commented 2 months ago

This isn't really rendering right in the preview - it's referring to a OneTimeKeys type which is then not defined. Is that something that is fixed by one of the other PRs in flight?

image

I am wondering if the oneOf: [string, KeyObject] is right, since the section about one-time and fallback keys clearly says that only signed_curve25519 is used in this case.

Yeah. I think the problem is that, previously, curve25519 was used here, where the type is just string. I think it's fair to say that nobody should be using unsigned curve25519 keys here, but maybe that is a separate change?

zecakeh commented 2 months ago

This isn't really rendering right in the preview - it's referring to a OneTimeKeys type which is then not defined. Is that something that is fixed by one of the other PRs in flight?

Yes, that is fixed by #1801. Or an alternative is to remove the title.