Add support for pattern formats for patternProperties#1796
Add support for pattern formats for patternProperties#1796richvdh merged 6 commits intomatrix-org:mainfrom
patternProperties#1796Conversation
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
KitsuneRal
left a comment
There was a problem hiding this comment.
It looks really nice but I feel a bit uneasy that we end up with same regexes spelled out two times, in different files. And I might be missing something but you don't seem to actually use pattern defined in custom-formats.yaml?
|
Personally not sure if this change makes sense, given that column is meant to show the data type. |
As said in the docs of the file, the regex is only here as a reference to help for creating new |
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
I realised we didn't reply to this (pro-tip: comments on the diff are more likely to get noticed than comments on the PR itself). Given this is JSON, the only thing that can be used as an object key is a string. I don't think there is any need to specify |
The idea here is to be able to identify more easily what strings represent in the rendered spec.
If this is accepted, then we can chose most
additionalPropertiestopatternPropertiesthroughout the specification. We can even extend the support to the regularformatkey on string properties.Here is what that changes in the rendered specification, for
m.receipt:Before:
After:
Preview: https://pr1796--matrix-spec-previews.netlify.app