Tags: team99/oapi-codegen
Tags
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.
Bump Iris to remove Go 1.21 dependency As part of the upgrade to Go 1.21, the Go toolchain now requires the `go` directive to match the maximum Go version in use in dependencies. This leads to any transitive dependency on Iris to result in a requirement of the consuming project moving to Go 1.21. We can upgrade Iris to a version that has downgraded the Go 1.21 requirement. We will pin to the latest commit on HEAD until v12.2.6 is released. Closes oapi-codegen#1221.
Allow overriding the binary version when VCS not available (oapi-code… …gen#1163) As mentioned in oapi-codegen#1046, for environments, like Nix, that build without a Version Control System (VCS) available, we output `(devel)` as the version of oapi-codegen even when it's building from source from a Git tag. We can therefore provide a `noVCSVersionOverride` build-time flag to allow us to override this with an arbitrary string. Closes oapi-codegen#1046. Co-authored-by: Jamie Tanna <jamie@jamietanna.co.uk>
Fix: Generate models for all JSON media types As highlighted in oapi-codegen#1168, we have some cases where JSON-compatible media types aren't having their respective models generated, as we previously only looked for `application/json`. To resolve this, we can make sure that any media types that are compatible with JSON (via our utility method) can have their types generated. This is a fix for oapi-codegen#1168, which could also be deemed a feature. However, as this has broken in the upgrade from v1.12.x to v1.13.x, this is being treated as a feature. Closes oapi-codegen#1168.
fix: correct marshalling for alternative JSON types (+json) for stric… …t servers (oapi-codegen#1171) Closes oapi-codegen#1168
Bump github.com/go-chi/chi/v5 from 5.0.8 to 5.0.10 (oapi-codegen#1162) Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.0.8 to 5.0.10. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](go-chi/chi@v5.0.8...v5.0.10) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PreviousNext