Closed comdiv closed 1 year ago
Try prefixing enforce_oneof=true:
to your --jsonschema_out
protoc argument.
Thank you @michaelrosett! @comdiv would you be able to try this flag and let us know if it solves your issue?
Yes, it generates another more correct varianr, thx!
ср, 11 янв. 2023 г., 06:13 Prawn @.***>:
Thank you @michaelrosett https://github.com/michaelrosett! @comdiv https://github.com/comdiv would you be able to try this flag and let us know if it solves your issue?
— Reply to this email directly, view it on GitHub https://github.com/chrusty/protoc-gen-jsonschema/issues/135#issuecomment-1378109719, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASG7FTRAKOZODP3JE2KLLLWRYCL5ANCNFSM6AAAAAATN7D5UQ . You are receiving this because you were mentioned.Message ID: @.***>
Glad you got it working!
GENERATES ->
As you can see JsonSchema allows both
x
andy
property persists in one single JSON , while protobuf schema defines that just one property should occurs...Is where any way to generate more valid JsonSchema or it doesn't support it by nature?