Tags: oapi-codegen/oapi-codegen
Tags
build: relax patch version pinning on `go` directive Originally added in f77bd7b, we wanted to pin the version to ensure that we were targeting the latest version of Go 1.21. However, there's no real value here, and as noted in [0] it can be causing issues for some users. There's nothing explicitly in Go 1.21.x that we need to pin to, just that we need support for Go 1.21, so we can use Speakeasy's `openapi-overlay` library. Therefore we can relax the patch-version requirement, which will alleviate issues for consumers. This makes sure that we have _at a minimum_ a version of Go 1.21, and makes `go mod tidy` happy. [0]: osbuild/image-builder-crc#1352
Fix: Ensure external refs are propagated to generated code As noted in #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 #1378.
PreviousNext