Skip to content

Modularize operator detection and usage to allow for extensibility #63

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

Open
brettz9 opened this issue Dec 14, 2015 · 2 comments
Open

Modularize operator detection and usage to allow for extensibility #63

brettz9 opened this issue Dec 14, 2015 · 2 comments
Labels

Comments

@brettz9
Copy link
Collaborator

brettz9 commented Dec 14, 2015

While the sandbox allows for custom filtering (even as custom functions), we might modularize the path parsing so that operator detection and usage can be externally extended.

@rattrayalex
Copy link

rattrayalex commented Dec 27, 2022

I'm interested in this, and we might be able to submit a PR. How would you like it to work / where can we get started?

EDIT: specifically, I'd like to be able to do things like this:

JSONPath({
  // find SchemaObjects anywhere in an OpenAPI spec 
  // that have an `enum` property and a `nullable` property set to true
  path: '$..@schemaObject()[?(@.enum && @.nullable === true)]' 
})

where I'd need to define @schemaObject() myself.

My impression is that this is currently possible with @other(), but then I only get one kind of custom type selector (and it's not very well-named…)

@brettz9
Copy link
Collaborator Author

brettz9 commented Jan 8, 2023

Feel free to come up with whatever approach you like. I'm barely maintaining the project, so no firm commitments, but I can hopefully review any well-documented PR, or, proposal.

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

No branches or pull requests

2 participants