protoyaml-go
protoyaml-go copied to clipboard
Marshal and unmarshal Protobuf as YAML with rich error messages.
see https://github.com/bufbuild/protoyaml-go/issues/39
see https://github.com/bufbuild/protoyaml-go/issues/36 JSON objects are unmarshaled into (unordered) go maps by default. This PR uses yaml.Node (when possible) instead, which preserves the field order from protojson. Note that yaml refuses...
See https://github.com/bufbuild/protoyaml-go/issues/37
Similar to: - https://pkg.go.dev/google.golang.org/[email protected]/proto#UnmarshalOptions - https://pkg.go.dev/google.golang.org/[email protected]/encoding/protojson#UnmarshalOptions - https://pkg.go.dev/google.golang.org/[email protected]/encoding/prototext#UnmarshalOptions It would be good to have a `DiscardUnknown` option on `protoyaml.UnmarshalOptions`. https://github.com/bufbuild/buf/issues/2714 is the motivation for this issue.
While fields in the json string output by protojson are kept in the same order as defined in the .proto file, fields in the yaml string output by protoyaml-go are...
Hi! Thanks for the lib, it's been really useful for us, however I'm experiencing the behaviour that doesn't seem to be an intentional one. When I declare a message containing...
As the repo is now read-only, we might want to switch in the future.
When StrictEnums is false, the following is now allowed: ``` - oneof_enum_value: VALUE_1 ``` The following is always allowed: ``` - oneof_enum_value: PROTO2_TEST_ENUM_VALUE_1 ``` Note that this does not impact...
Since protoyaml depends on protovalidate, cel-go is already a dependency. Scalars that do not trivially parse are passed through cel to see if they can be evaluated. The tag `!cel`...