Repository navigation
Releases
Releases · connectrpc/protoc-gen-connect-openapi
v0.30.0
v0.29.0
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
notconstraint and stated in the message description, e.g. "Exactly one ofa,bmust be set." Messages go back toadditionalProperties: false, andunevaluatedPropertiesis gone. (#315) - New
compat=openapi-3.0option.$refsiblings are no longer wrapped inallOfby default; setcompat=openapi-3.0(orWithCompatin the Go API) for tooling that needs the 3.0-style output. (#314) - google.api.http routes always get a
google.rpc.Statusdefault error response, andwith-google-error-detailnow types its details. (#313)
Breaking output changes
-
Oneofs use plain properties plus
not, as described above. (#315) -
$refsiblings aren't wrapped inallOfunlesscompat=openapi-3.0is set. (#314) -
Twirp media types are
application/jsonandapplication/protobuf(werejsonandproto). Streaming methods no longer get Twirp routes. (#316) -
Well-known types:
google.protobuf.Anyuses@type(required) instead oftype/value.- Wrapper types accept
null, and Int32/UInt32 wrappers areinteger. BytesValueisformat: byte.Durationuses a pattern instead offormat: duration.NullValueistype: "null".
(#316)
-
Protovalidate rules:
- Duration and Timestamp values use the protojson form (
2000s, RFC 3339). - Bytes values are base64-encoded.
- Bytes length,
patternand 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_inconstrain@type.
- Duration and Timestamp values use the protojson form (
-
Connect unary errors and the GET
messageparameter are JSON-only. (#316)
Fixes
google.api.http
- Nested path params (
{book.id}withbody: "*") 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
$refrequest bodies, parameters, links and security schemes no longer crash the plugin.required/explodeare only emitted when set.- Defaults are typed.
- Custom operation IDs no longer collide with
allow-getor additional bindings. - A request body is not applied to GET.
request_bodykeeps query params (#300, thanks @vh), and doesn't add them whenbodyis 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_onlydescription 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
WithOnlyGoogleapiHTTPandWithIgnoreGoogleapiHTTPtake effect.- Output is deterministic across runs.
- Overlapping
WithFiles/WithSourceFilesregistries 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
v0.27.3
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
v0.27.1
v0.27.0
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
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
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