FirebaseExtended / protobuf-rules-gen

This is an experimental protoc plugin that generates Firebase Rules for Cloud Firestore based on Google's Protocol Buffer format. This allows you to easily validate your data in a platform independent manner.
Apache License 2.0
197 stars 13 forks source link

Implement a nullable annotation for fields and messages #26

Closed rockwotj closed 5 years ago

rockwotj commented 5 years ago

Closes #24

ribrdb commented 5 years ago

I can't load these generated rules into the firestore emulator:

    Error: 3 INVALID_ARGUMENT: Error compiling rules:
    L14:101 Unexpected 'null'.

Should that be == null instead of is null? I had a couple other observations after using this for a while:

rockwotj commented 5 years ago

It should be ==, thanks for catching

I'd welcome contributions for the per type config! It shouldn't be too bad.

RE: bazel rules, I think those specific rules would be great to have in this repo and I'd welcome those contributions!

I think as long these macros/rules are primatives and not specialized to the ORM, this repo is a good place for them.