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

Adding JSONPath-Plus #57

Open
50rayn opened this issue Jan 4, 2024 · 0 comments
Open

Adding JSONPath-Plus #57

50rayn opened this issue Jan 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@50rayn
Copy link

50rayn commented Jan 4, 2024

Is your feature request related to a problem? Please describe.

I'm using @quobix/vacuum for linting my openapi schema. It's a very nice tool for ensuring a high quality schema. So, I wanted to extend the basic linting rules by writing my own rules according to the docs. Afterwards I stuck on some issues with JSONPath. I have paths like:

  • $..[?(@.type == 'array')].default^.nullable - Property nullable is prohibited if default property defined
  • $.paths[?([email protected](/^\/login$/))][*] - All endpoints login
  • [email protected](/allOf/) - Objects that are not under allOf

Describe the solution you'd like

Would be nice to extend the current list of options with those available from JSONPath Plus

  • shorthand selectors - @path, @parent, @property, @parentProperty, @root, @key
  • getting all parent components - $..
  • grabbing the parent of a matching item - ^
  • grabbing property names of matching items - ~

Describe alternatives you've considered

No response

Additional context

No response

@50rayn 50rayn added the enhancement New feature or request label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant