This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
BUG: Using the --jsonschema_opt=enforce_oneof flag makes all "optional" fields in the .proto files required in the jsonschema #161
Labels
awaiting_feedback
Waiting for the reporter to respond
Using the following CL options:
protoc --plugin=${HOME}/go/bin/protoc-gen-jsonschema --jsonschema_opt=file_extension=schema.json --jsonschema_opt=disallow_additional_properties --jsonschema_out=schemas --proto_path=$CI_PROJECT_DIR/protobuf $CI_PROJECT_DIR/protobuf/*.proto --experimental_allow_proto3_optional
converts this proto:
into this schema:
without this flag, it produces the following jsonschema:
The text was updated successfully, but these errors were encountered: