You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `extends` property allows a type to inherit claim metadata from another type. When present, all claim metadata from the extended type MUST be respected and are inherited by the child type. The child type can extend the claim metadata by adding new claims or properties. If the child type defines claim metadata with the same `path` as in the extended type, the child type's object will override the corresponding object from the extended type.
1018
+
1019
+
Suppose we have a base type metadata document:
1020
+
1021
+
```json
1022
+
{
1023
+
"vct": "https://example.com/base-type-metadata",
1024
+
"claims": [
1025
+
{
1026
+
"path": ["name"],
1027
+
"display": [{"label": "Full Name", "lang": "en"}]
1028
+
},
1029
+
{
1030
+
"path": ["address", "city"],
1031
+
"display": [{"label": "City", "lang": "en"}]
1032
+
}
1033
+
]
1034
+
}
1035
+
```
1036
+
1037
+
And a child type metadata document that extends the base type:
In this example, the child type inherits the `name` claim metadata from the base type, but overrides the `address.city` claim metadata with its own definition. It also adds a new claim metadata for `nationalities`. The final effective claim metadata for the child type is:
0 commit comments