Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Ensure external refs are propagated to generated code
As noted in oapi-codegen#1378, there are cases where a complex set of `$ref`s between multiple files can lead to broken generated code, which does not correctly import the package that has been prepared for the external reference. We can handle this by looking up any references, where there is a `.Ref` passed into the type, and then iterate through relevant children. This requires we handle the updating in-place for these by using a bit of pointer + indexing fun. This also adds a relevant test case to validate the fix. Closes oapi-codegen#1378.
- Loading branch information