FirebaseExtended / bolt

Bolt Compiler (Firebase Security and Modeling)
Apache License 2.0
896 stars 108 forks source link

Allow us to specify $other{ .validate: true } #237

Closed lukepighetti closed 5 years ago

lukepighetti commented 5 years ago

Bolt creates an explicit "no other properties" with

"$other": {
  ".validate": "false"
},

Allow us to specify that additional properties are allowed for certain paths.

lukepighetti commented 5 years ago

Just found this example and I find it to be a perfect solution.

path / is Person;

type Person {
  name: String,
  age: Number,
  isMember: Boolean,

  // Optional data (allows an Object or null/missing value).
  extra: Object | Null
}