Commit 6c1426d
openapi3: collapse repeated combinator scope in nested allOf/anyOf/oneOf
SchemaCombinatorElementValidationError wraps each combinator element, so a
deeply nested same-combinator schema (common in the AWS specs) rendered
"invalid allOf element: " once per nesting level. Collapse a run of
same-combinator wrappers in Error() so the scope prints once. The typed chain
is unchanged: Unwrap and errors.As still see every level, only the rendered
message drops the repeats, and a run of a different combinator (e.g. allOf
inside a oneOf) is still shown.
Adds a wrapper test for the collapse and chain preservation, and regenerates
the affected apis-guru goldens.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 8c54fba commit 6c1426d
32 files changed
Lines changed: 72 additions & 31 deletions
File tree
- openapi3
- testdata/apis_guru_openapi_directory
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments