| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The review of oapi-codegen#2522 asked for the untested union positions to be committed. Three surfaces had no conformance coverage: - array items: a named array component whose items are a union lowers to a []any alias and round-trips mixed member values - a union as a oneOf branch: the outer schema keeps the standard union machinery with the branch accessor typed any, whose As... conversion can never fail, so branch discrimination falls to the caller - response headers: ResponseHeaderDefinition.SchemaTypes() feeds the Types list the generated ClientWithResponses passes when binding declared response headers, previously exercised by no test The allOf position is already pinned by the spec added in oapi-codegen#2526 (both member orderings), so it is deliberately not duplicated here.
Greptile SummaryThe PR expands OpenAPI 3.1 multi-type union conformance coverage without changing generator implementation.
Confidence Score: 5/5The test-only PR appears safe to merge, with no concrete correctness or generated-API failures identified. The added specifications, generated fixtures, and tests consistently exercise the intended OpenAPI 3.1 union behavior, and the generated diffs contain no unrelated API drift. Important Files Changed
Reviews (1): Last reviewed commit: "Cover remaining OpenAPI 3.1 union positi..." | Re-trigger Greptile |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Adds conformance tests for the multi-type union positions the #2522 review found missing.
A union in array-items position lowers to a []any alias and round-trips mixed member values. A union as a oneOf branch keeps the outer schema's union machinery with an any-typed accessor, so As... never fails and branch discrimination falls to the caller. A union-typed response header exercises the Types list that ClientWithResponses passes when binding declared headers, which had no test. The allOf position is skipped because #2526 already covers both member orderings.
Test-only. Repo-wide make generate changes nothing outside the two openapi31 suites.