Skip to content

v1.25.0

Latest

Choose a tag to compare

@ernado ernado released this 13 Nov 20:25
88ec4c1

Swagger UI out of the box, Go 1.27.2 support, and a dozen generator fixes. Release post: https://ogen.dev/blog/v1.25.0

Highlights

  • server/spec and server/swagger_ui features: the generated server embeds the OpenAPI document and serves it with Swagger UI via WithDocs (#1775).
  • schema/embed_struct_aliases feature: aliases of object schemas embed the original struct and keep its methods. Opt-in, since it changes the generated API (#1789).
  • Go 1.27.2 with JSON v2 is supported, GOEXPERIMENT=nojsonv2 is no longer needed (#1774).

Possibly breaking

  • When a webhook declares security, NewWebhookServer takes a SecurityHandler and NewWebhookClient takes a SecuritySource. Before this, such specs produced code that did not compile (#1771).
  • The client no longer sends an empty value for unset optional parameters with structured content (#1741).
  • A default next to a $ref now applies only to that use of the schema (#1758).

What's Changed

  • chore: bump github.com/yuin/goldmark from 1.8.2 to 1.8.5 by @dependabot[bot] in #1721
  • feat(gen): embed OpenAPI document and serve it with Swagger UI by @ya-makariy in #1775
  • Fix Go 1.27.2 and JSONv2 compatibility by @dzsibi in #1774
  • fix(uri): check escape sequence bounds on NormalizeEscapedPath slow path by @shuvamk in #1732
  • fix(jsonschema): report real keyword names in min/max conflict errors by @shuvamk in #1733
  • chore: bump github/codeql-action from 4.37.4 to 4.39.2 by @dependabot[bot] in #1786
  • chore: bump docker/login-action from 4.5.2 to 4.7.0 by @dependabot[bot] in #1780
  • chore: bump github.com/yuin/goldmark from 1.8.5 to 1.8.6 by @dependabot[bot] in #1754
  • fix(gen): keep x-ogen-time-format when merging allOf property schemas by @AAkira in #1778
  • fix(gen): generate valid code for object-level x-ogen-validate by @belomaxorka in #1772
  • fix(gen): encode const URI/string formats with e.Str by @BetterAndBetterII in #1752
  • chore: bump github.com/valyala/fasthttp from 1.73.0 to 1.78.0 by @dependabot[bot] in #1756
  • chore: bump github.com/stretchr/testify from 1.11.1 to 1.12.1 by @dependabot[bot] in #1743
  • chore: bump the opentelemetry group across 1 directory with 5 updates by @dependabot[bot] in #1749
  • Fix/security requirement rollback by @b-sn in #1760
  • fix(gen): generate security handling for webhook server and client by @SahilRajputdotexe in #1771
  • fix(gen): don't emit unset optional parameters by @strager in #1741
  • fix(gen): validate unique MAC address arrays by @ViktorBystrov72 in #1788
  • fix(gen): Responses with same inline header schema fails to build by @shyouhei in #1769
  • fix: $ref siblings like default affecting all ref instances by @infastin in #1758
  • feat(gen): add schema/embed_struct_aliases feature by @ernado in #1789

New Contributors

Full Changelog: v1.24.0...v1.25.0