Skip to content

fix for having a proper json schema for "where" #11027

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

durgesh-rathod-sf
Copy link

Description

Enhancement: Added proper support for where filter JSON schema in LoopBack to reflect all documented operators (e.g., eq, neq, gt, gte, inq, like, regexp, etc.) and logical clauses (and, or, not, nor), based on the [official LB4 filter documentation](https://loopback.io/doc/en/lb4/Where-filter.html#operators).

This improves the output of getWhereJsonSchemaFor() to generate accurate OpenAPI schemas and improves downstream schema validation/generation (e.g., for clients or Zod-based tools).

⚠️ Unit tests have not yet been updated or run in this commit. This PR is to get early feedback on logic and approach.


Checklist


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

Successfully merging this pull request may close these issues.

1 participant