-
Notifications
You must be signed in to change notification settings - Fork 275
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
New metadata API: Validate dictionary keys as well as values #1356
Comments
It's validated that During serialization, it's not validated. Maybe there is no sense to add that as Maybe we can validate that the given Validate that This should happen during instance creation when calling
In timestamp, we have generally fixed that problem by removing
I think we should at least validate that it's a non-empty string. as defined by the spec. Maybe we do want to validate that @jku what's your opinion? I ask you as you reviewed other of my prs about validation. |
With keyids I think there's very little we can or should do. root rolenames are now validated in 1516. The additional things we maybe could still do are
I think these make sense, yes
that does not make sense for TARGETPATH but if you meant checking that METAPATH is not in ["root.json", "snapshot.json", "targets.json", "timestamp.json"]... that might make sense as a sanity check. |
Description of issue or feature request:
By resolving issue #1139 we are going to add classes for all complex fields inside the top-level metadata classes e.g.
meta
/targets
(in Timestamp, Snapshot, Targets),delegations
(in Targets),keys
/roles
(in not yet existent Delegation).The problem is, that many of those complex fields are represented by a dictionary and we are adding classes for the values of
the dictionary in order to easily validate them later, but we should make sure to validate the dictionary keys as well.
Current behavior:
We are not validating dictionary keys yet.
Expected behavior:
We should make sure to validate:
The text was updated successfully, but these errors were encountered: