xregistry / spec

xRegistry related specifications
https://xRegistry.io
Apache License 2.0
40 stars 6 forks source link

Consider allowing ifvalue.VALUE to be a regexp #72

Open duglin opened 9 months ago

duglin commented 9 months ago

so people don't need to repeat siblingattributes in multiple ifvalues just to support more than one VALUE adding the same set of attributes.

We'd need to decide what to do about cases where multiple ifValues match the attribute we're checking. Some options: 1 - generate a runtime error - but the user can't fix it until less they have write access - or possibly might need admin access to change the model 2 - try to merge all attributes, and conflicts generate a runtime error 3 - try to merge all attributes, and conflicts result in undefined behavior (e.g. possibly "last wins")

duglin commented 1 day ago

Proposal:

duglin commented 14 hours ago

Make '^' a reserved "leading" character - reserved for future use.

Options for later:

{
  "foo": { .... attr...},
  "^.*space$": { ... },   ends with 'space'
  "^.*space/": { ... }  has 'space/'
  "^space": { ... }  - starts with
}

move support for regexp to post-v1