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

Jsonpath / Add non-equal filter on string and number value #3281

Merged

Conversation

sandeshbhusal
Copy link
Contributor

Fixes #3261. Added tests. These things should work:

"$.data[?(@.id != 2.2)].id"
"$.data[?(@.title != "check")].id"

Also, while running the integration tests, I ran into a couple of issues (from https://github.com/Orange-OpenSource/hurl/blob/master/CONTRIBUTING.md):

$ cd integration
$ python3 server.py >server.log 2>&1 &

There is no server.py file in integration/. It's instead inside integration/hurl.

$ python3 ssl/server.py >server-ssl.log 2>&1 &

There is also no ssl/ folder in this repo.

I think these could be a separate doc PR.

Looking forward to reviews on this PR! :) (deleted the old PR because the commit was not signed.)

@lepapareil
Copy link
Collaborator

Hi @sandeshbhusal,

Thks for reporting CONTRINBUTING.md issues, I'll do a full review of this doc and make a new PR to fix the identified errors.

@sandeshbhusal
Copy link
Contributor Author

I apologize for the signing issue - figuring out this gpg business for the first time :)

@jcamiel
Copy link
Collaborator

jcamiel commented Oct 4, 2024

Hi @sandeshbhusal

you need to run cargo fmt and cargo clippy on your PR in order to appease our CI/CD!

@sandeshbhusal
Copy link
Contributor Author

Ah! Gotcha. I just ran cargo fmt+clippy and pushed out a commit :)

@fabricereix
Copy link
Collaborator

Hi @sandeshbhusal,
we can accept your new operator != as your code is consistent with the existing one.

As mentioned in #3261, from our side, we will still have to align our full implem to the grammar defined in the new spec.
for example, != will be part of the following rule

comparison-op       = "==" / "!=" /
                      "<=" / ">=" /
                      "<"  / ">"

@fabricereix
Copy link
Collaborator

/accept

@hurl-bot
Copy link
Collaborator

hurl-bot commented Oct 5, 2024

🕗 /accept is running, please wait for completion.

@hurl-bot
Copy link
Collaborator

hurl-bot commented Oct 5, 2024

🔨 Auto rebase from Orange-OpenSource/hurl/master succeeds, sandeshbhusal/hurl/3261-noteq_predicate_operator now embeds these commits:

  • 625a0a3 Update actions
  • 949963c Fix integration/README.md and CONTRIBUTING.md prerequisites

@hurl-bot
Copy link
Collaborator

hurl-bot commented Oct 5, 2024

🕗 /accept is still running, please wait for completion.

@hurl-bot hurl-bot force-pushed the 3261-noteq_predicate_operator branch from fe0daa5 to 395c2bc Compare October 5, 2024 09:56
@hurl-bot
Copy link
Collaborator

hurl-bot commented Oct 5, 2024

✅ Pull request merged and closed by fabricereix with fast forward merge..

# List of commits merged from sandeshbhusal/hurl/3261-noteq_predicate_operator branch into Orange-OpenSource/hurl/master branch:

  • 395c2bc chore: cargo fmt - clippy
  • 3b84323 feat: Added not equl operator in jsonpath predicate

@hurl-bot hurl-bot merged commit 395c2bc into Orange-OpenSource:master Oct 5, 2024
22 checks passed
@fabricereix fabricereix changed the title feat: Added a not eq operator to predicates Jsonpath / Add non-equal filter on string and number value Oct 5, 2024
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.

Invalid JSONPath when using != (not equal) operator
5 participants