Commit afcbc94
committed
annotate_schema: resolve branch $refs for oneOf/anyOf source and title
Previously each oneOf/anyOf branch's ResolvedProperty was always stamped
with sources=[from_schema.location] (the schema containing the oneOf)
and fell back to a bare letter title (a/b/c), even when the branch was
itself a plain $ref to another schema. This made it impossible to tell,
from resolvedProperties.json, which schema/bblock each branch actually
corresponds to.
Now, when a branch is (or starts with) a $ref, resolve it up front and
use the referenced schema's location as the branch's source, falling
back to its title when the branch itself doesn't declare one.1 parent 4f7b75c commit afcbc94
1 file changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
| 1187 | + | |
1187 | 1188 | | |
1188 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1189 | 1205 | | |
1190 | 1206 | | |
1191 | 1207 | | |
1192 | 1208 | | |
1193 | 1209 | | |
1194 | 1210 | | |
1195 | 1211 | | |
1196 | | - | |
| 1212 | + | |
1197 | 1213 | | |
1198 | 1214 | | |
1199 | 1215 | | |
| |||
0 commit comments