Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider allowing ifvalue.VALUE to be a regexp #72

Open
duglin opened this issue Feb 14, 2024 · 3 comments
Open

Consider allowing ifvalue.VALUE to be a regexp #72

duglin opened this issue Feb 14, 2024 · 3 comments

Comments

@duglin
Copy link
Contributor

duglin commented Feb 14, 2024

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
Copy link
Contributor Author

duglin commented Nov 15, 2024

Proposal:

  • defer to post-v1
  • then support it but if there's more than one match then it's "undefined" - possibly, first wins but it's a map so it's unordered.

@duglin
Copy link
Contributor Author

duglin commented Nov 15, 2024

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

Copy link

This issue is stale because it has been open for 30 days with no
activity. Mark as fresh by updating e.g., adding the comment /remove-lifecycle stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant