Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Releases: chrusty/protoc-gen-jsonschema

Initial support for protoc-gen-validate options, google.protobuf.ListValue, excluded comments

18 Apr 20:41
Compare
Choose a tag to compare

This release contains 3 new features:

Adopting a proper package name for the options proto

09 Mar 20:56
ef0ff69
Compare
Choose a tag to compare

This release includes a proper package name for the options proto.

Thanks to @betamike for pointing this one out.

Convert google Int64Value to strings

14 Nov 06:50
c6dba84
Compare
Choose a tag to compare

This release introduces specific support for Google Int64 values (as strings).

Thanks @ianvdhSBM for your contribution!

Support for stripping ENUM prefixes

29 Jun 19:53
fb6570f
Compare
Choose a tag to compare

This release introduces a new option, to strip prefixes from ENUM values. Usually ENUM values are given a prefix (this avoids namespace clashes, and allows you to understand exactly where they came from) - but that does lead to ugly strings sometimes, so we now have an option to disable that behaviour.

Thanks @zbiljic for your contribution!

Fixing a bigint-as-string bug

28 Jun 19:49
1e10cf8
Compare
Choose a tag to compare

This release addresses an issue which was raised recently, in which bigints were still rendered as strings even when disallow-bigints-as-strings was selected (when combined with null values).

Thanks for raising this, @dbedari-indeed!

Field constraint validation

24 Mar 06:04
dc70e11
Compare
Choose a tag to compare

This release brings some new field options to validate constraints:

  • minimum length
  • maximum length
  • pattern (regex)

Thanks @faroceann for your contribution!

Titles, descriptions, and default proto package

01 Feb 00:34
Compare
Choose a tag to compare

A couple of slightly different behaviours here, by request:

  • Titles will now be added to JSONSchemas. These are either taken from the first comment (where there are more than one), or automatically generated from the proto message name (thanks @mrozycki-tink)
  • Newline characters are now stripped from description fields (thanks @jcchavezs)
  • Proto3 package is no longer required, and will now default to "package" instead (thanks @amarkevich)

Control over ENUM values

20 Dec 19:09
f5fcc60
Compare
Choose a tag to compare

This version introduces a new converter flag / option which controls the types of values generated for ENUMs. The default behaviour is still to generate strings AND numbers, but the new flag / option limits this to the string values only.

See the README for details and examples:

Thanks @mrozycki-tink for your contribution!

Claiming support for proto3 "optional" fields

15 Dec 20:21
48d4fd9
Compare
Choose a tag to compare

Recent versions of the protoc libraries require a specific support flag to be set in order to work with proto3 "optional" fields. This release sets that flag, but currently doesn't treat these fields any differently. Future releases may introduce new logic around these fields, but for now this at least allows people to continue to generate schemas.

JSON fieldnames for required fields

18 Nov 01:41
284d269
Compare
Choose a tag to compare

Currently, the required fields list will always contain only the protobuf names of fields, even if the json_fieldnames option is used.

In this release the behavior is changed to instead use JSON names if the json_fieldnames option is used, and proto names in all the other cases.

Thank you @mrozycki-tink for this contribution!