Skip to content

Releases

v0.30.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 18:50

Changelog

  • 9f17938 Move to the connectrpc organization and remove obsolete options

v0.29.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 15:13
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

v0.28.0

Choose a tag to compare

@github-actions github-actions released this 30 Sep 11:55
ea12c19

Changelog

  • ea12c19 Fix base64 format for Connect error details (#291)

v0.27.3

Choose a tag to compare

@github-actions github-actions released this 25 Sep 06:56

Changelog

  • dc10705 Merge branch 'main' of github.com:sudorandom/protoc-gen-connect-openapi
  • b1eb792 Connect-Protocol-Version is not technically required
  • bf6737b support duration gt/lt, field masks, enum.defined_only (#289)
  • c2848e1 Decouple google.api.field_behavior from google.api.http (#288)
  • 0e11f40 Update readme to fix #286 (#287)

v0.27.2

Choose a tag to compare

@github-actions github-actions released this 13 Sep 09:14
161dfa0

Changelog

  • 161dfa0 schema: let type annotations replace generated refs (#281)
  • d2b65cd chore: add demo with several different tools (swagger/scalar/elements/etc)

v0.27.1

Choose a tag to compare

@github-actions github-actions released this 11 Sep 05:38

Changelog

  • 972d5a1 test: cover a message with multiple oneof containers
  • 393ec8c fix(schema): keep oneof validation out of rendered variants (#280)

v0.27.0

Choose a tag to compare

@github-actions github-actions released this 10 Sep 14:51
000a11d

Changelog

  • 000a11d feat: add jsonschema output format (#279)
  • 9044f1c feat: add option to control well-known type descriptions (#269)
  • 8dd6edf feat: always wrap refs in allOf and remove wrap-refs-in-allof option (#278)
  • 227e87f feat: add wrap-refs-in-allof option (#274)
  • 24d1e8b chore(deps): bump github.com/pb33f/libopenapi-validator (#263)
  • 9325a14 fix: add linter; fix lint errors for all non-broken golden specs (#277)
  • c42a42a feat: use string type for 64-bit integers per protojson spec (#276)
  • d097fff chore: remove checked-in file descriptors to avoid conflicts
  • 42b4e65 fix: render google.protobuf.ListValue as a ProtoJSON array (#270)
  • e781ac6 fix: emit protovalidate const with the field's own type (#275)
  • 73a41ee fix(googleapi): preserve explicit query parameter descriptions (#268)

v0.26.0

Choose a tag to compare

@github-actions github-actions released this 06 Sep 10:54

Changelog

  • 1d36aa6 Merge pull request #267 from bastionplatforms/fix/strip-path-param-make-field-name
  • 41be14b Merge pull request #266 from bastionplatforms/feat/without-field-behavior-prefixes
  • 0908e21 Merge branch 'main' of github.com:sudorandom/protoc-gen-connect-openapi into fix-query-param-visibility
  • 0b09cb5 fix: dropped operations, dropped query parameters, and oneof schemas that reject every instance (#264)
  • 7ddb25c fix(googleapi): exclude path params from bodies when using proto names
  • 1d1b0ce feat: add option to omit field behavior description prefixes
  • 2aeb960 fix(googleapi): exclude query params filtered by field visibility

v0.25.8

Choose a tag to compare

@sudorandom sudorandom released this 30 Aug 15:27
ec5ca91

What's Changed

  • feat: add support for asyncapi with asyncapi-path and asyncapi-channel-template options by @sudorandom in #256
  • fix(googleapi): camelCase path params, double path-prefix on additional bindings, nested body exclusion by @sudorandom in #259

Full Changelog: v0.25.7...v0.25.8

v0.25.7

Choose a tag to compare

@github-actions github-actions released this 14 Jun 17:49
98d0218

Changelog

  • 98d0218 fix: descriptions on cross-package proto messages (#255)
  • 4bce996 feat: add support for (gnostic.openapi.v3.document).paths (#254)
  • 1410441 fix: gnostic parameter description on the correct parameter level (#253)
  • b229301 fix(google.api): respect sigular/plural resource mapping (#252)