Skip to content

Commit 6090d5e

Browse files
authored
fix: revert oapi to v2.6.0 (#209)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **Medium Risk** > Regenerates large portions of `lib/oapi/oapi.go`, including request parameter encoding and server parameter binding helpers, which could subtly change runtime behavior. Main risk is mismatched query/path parsing or validation differences after the codegen upgrade. > > **Overview** > Regenerates `lib/oapi/oapi.go` with `oapi-codegen` v2.6.0, updating the embedded swagger payload, adding `Valid()` helpers for multiple enums, and switching generated request/handler parameter styling/binding to the newer `runtime.*WithOptions` APIs (with explicit `Type`/`Format`, e.g. UUIDs and booleans). > > Simplifies the `oapi-generate` Makefile target by dropping the `patch_strict_optional_json` step and deletes `scripts/oapi/patch_strict_optional_json`, leaving only the SSE methods patch as a post-processing step. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit e270add. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent e39b5c2 commit 6090d5e

3 files changed

Lines changed: 381 additions & 352 deletions

File tree

server/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ oapi-generate: $(OAPI_CODEGEN)
2424
$(OAPI_CODEGEN) -config ./oapi-codegen.yaml ./openapi-3.0.yaml
2525
@echo "Fixing oapi-codegen issue https://github.com/oapi-codegen/oapi-codegen/issues/1764..."
2626
go run ./scripts/oapi/patch_sse_methods -file ./lib/oapi/oapi.go -expected-replacements 3
27-
@echo "Patching strict JSON optional bodies (io.EOF) + response omitempty tags..."
28-
go run ./scripts/oapi/patch_strict_optional_json -file ./lib/oapi/oapi.go
2927
go fmt ./lib/oapi/oapi.go
3028
go mod tidy
3129

0 commit comments

Comments
 (0)