Skip to content

v0.29.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 15:13
· 22 commits to main since this release
869ea19

This release changes generated output in several places to match what protojson actually sends and accepts, and makes the output simpler to read and render. Expect golden-file and generated-client diffs when upgrading.

Highlights

  • Simpler oneof schemas. Oneof members are now ordinary properties. The "at most one" rule (and "exactly one" for required oneofs) is enforced with a not constraint and stated in the message description, e.g. "Exactly one of a, b must be set." Messages go back to additionalProperties: false, and unevaluatedProperties is gone. (#315)
  • New compat=openapi-3.0 option. $ref siblings are no longer wrapped in allOf by default; set compat=openapi-3.0 (or WithCompat in the Go API) for tooling that needs the 3.0-style output. (#314)
  • google.api.http routes always get a google.rpc.Status default error response, and with-google-error-detail now types its details. (#313)

Breaking output changes

  • Oneofs use plain properties plus not, as described above. (#315)

  • $ref siblings aren't wrapped in allOf unless compat=openapi-3.0 is set. (#314)

  • Twirp media types are application/json and application/protobuf (were json and proto). Streaming methods no longer get Twirp routes. (#316)

  • Well-known types:

    • google.protobuf.Any uses @type (required) instead of type/value.
    • Wrapper types accept null, and Int32/UInt32 wrappers are integer.
    • BytesValue is format: byte.
    • Duration uses a pattern instead of format: duration.
    • NullValue is type: "null".

    (#316)

  • Protovalidate rules:

    • Duration and Timestamp values use the protojson form (2000s, RFC 3339).
    • Bytes values are base64-encoded.
    • Bytes length, pattern and IP rules, and range rules on 64-bit integers, are described rather than emitted as schema keywords that can't apply to them.
    • Any in/not_in constrain @type.

    (#308, #316)

  • Connect unary errors and the GET message parameter are JSON-only. (#316)

Fixes

google.api.http

  • Nested path params ({book.id} with body: "*") keep the rest of the parent message in the body and query.
  • {name=*} and patterns containing ** produce proper path params.
  • A field bound through a glob is no longer repeated as a query param.
  • Invalid rules fall back to the Connect route instead of dropping the method.
  • Placeholder parameter descriptions are gone. (#310)

Gnostic

  • $ref request bodies, parameters, links and security schemes no longer crash the plugin.
  • required/explode are only emitted when set.
  • Defaults are typed.
  • Custom operation IDs no longer collide with allow-get or additional bindings.
  • A request body is not applied to GET.
  • request_body keeps query params (#300, thanks @vh), and doesn't add them when body is unset.

Schemas

  • Protovalidate numeric values use protojson types. (#308)
  • ProtoJSON special float values (NaN, Infinity, -Infinity) are allowed. (#292, thanks @AprilNEA)
  • The redundant enum.defined_only description is dropped. (#309)

Visibility

  • Methods whose request or response type is hidden are omitted instead of referencing a missing schema.
  • Hidden fields no longer pull their types into the output.

AsyncAPI

  • Channels from different packages with the same service and method names no longer overwrite each other.

Go API

  • WithOnlyGoogleapiHTTP and WithIgnoreGoogleapiHTTP take effect.
  • Output is deterministic across runs.
  • Overlapping WithFiles/WithSourceFiles registries work.

Plugin

  • Conversion errors are reported to protoc/buf with the actual message.
  • Failing to write the response exits non-zero.

Tooling and docs

  • CI fails on missing golden files, uncommitted test output, and request cases that target undefined routes.
  • Releases run tests and lint first.
  • Actions are pinned by commit SHA, and Dependabot covers Actions and the demo.
  • Vacuum is installed via mise.
  • The demo harness adds Mintlify, groups its index page, and pins its CDN scripts.
  • README uses the current remote plugin version, and the devcontainer uses Go 1.26.
  • Dependencies updated, including libopenapi v0.42.3, libopenapi-validator v0.16.2, connect v2.0.2 and cel-go v0.33.2. (#311, #326 and others)

Full changelog: v0.28.0...v0.29.0