chrusty / protoc-gen-jsonschema

Protobuf to JSON-Schema compiler
Apache License 2.0
496 stars 101 forks source link

Fixing a bug that was still allowing nulls (even when allow_nulls wasn't enabled) #46

Closed chrusty closed 4 years ago

chrusty commented 4 years ago

This addresses https://github.com/chrusty/protoc-gen-jsonschema/issues/43, but hopefully doesn't cause any issues for others. The result is a bit less cruft in the generated protos.

@grant and @pavolloffay what do you make of this?

grant commented 4 years ago

Not familiar enough with the workings of this tool to have an opinion. We pin the version, so any changes shouldn't break anything.


Related, I'm trying to figure out how to specify required fields in protos to make this tool require only some fields.

chrusty commented 4 years ago

Not familiar enough with the workings of this tool to have an opinion. We pin the version, so any changes shouldn't break anything.

Related, I'm trying to figure out how to specify required fields in protos to make this tool require only some fields.

Sadly proto3 isn't so friendly with required fields... that was just a proto2 thing