Git Product home page Git Product logo

Comments (12)

emicklei avatar emicklei commented on June 12, 2024

thank you for reporting this. I will include it in my tests and work on a fix

from proto.

emicklei avatar emicklei commented on June 12, 2024

I fixed the reported one but found another issue at line 115. I wonder whether the source is correct as the identifier has a whitespace between repeated and .min_items:

  repeated core.DataSource keys = 1 [(validate.rules).repeated .min_items = 1];
``

from proto.

emicklei avatar emicklei commented on June 12, 2024

if this is correct then should the first option be interpreted as (validate.rules).repeated = true ?

from proto.

RangelReale avatar RangelReale commented on June 12, 2024

These are very strange, where do people find out these weird strange cases on protobuf?
I don't really use envoy, I got this error while trying my library on all proto files I could find.
Maybe the protobuf BNF file can help?

from proto.

RangelReale avatar RangelReale commented on June 12, 2024

I found these options come from here:

https://github.com/lyft/protoc-gen-validate/blob/master/validate/validate.proto

But I don't see anything different in it than in other proto files...

from proto.

emicklei avatar emicklei commented on June 12, 2024

Someone pointed me to

https://developers.google.com/protocol-buffers/docs/reference/proto2-spec
https://developers.google.com/protocol-buffers/docs/reference/proto3-spec

it says

fieldOption = optionName "=" constant

Now, I am looking for the validate.proto to see it definition

from proto.

emicklei avatar emicklei commented on June 12, 2024

https://github.com/lyft/protoc-gen-validate/blob/master/validate/validate.proto

from proto.

emicklei avatar emicklei commented on June 12, 2024

In that definition, I read message RepeatedRules and based on this I conclude this is actually a syntax error on their part.

from proto.

RangelReale avatar RangelReale commented on June 12, 2024

(Removed the last comment, was an error on the proto file itself.)

from proto.

RangelReale avatar RangelReale commented on June 12, 2024

Other problem with this field:

Location home = 4 [(validate.rules).message.required = true];

The parser considers "message" a reserved word, but it isn't on this context.

2018/03/15 17:08:37 <input>:15:39: found "message" but expected [option postfix identifier]

from proto.

emicklei avatar emicklei commented on June 12, 2024

see #72 that fixes this too

from proto.

RangelReale avatar RangelReale commented on June 12, 2024

Seems fine to me!

from proto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.