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

The engine should validate the dictionary values are all quoted #773

Closed
marina-p opened this issue Jun 8, 2023 · 4 comments · Fixed by #915
Closed

The engine should validate the dictionary values are all quoted #773

marina-p opened this issue Jun 8, 2023 · 4 comments · Fixed by #915
Labels
engine Issue in the RESTler engine good first issue Good for newcomers help wanted Pick this issue - it is ready to be worked on.

Comments

@marina-p
Copy link
Contributor

marina-p commented Jun 8, 2023

💡 Idea

The array values in the dictionary must all be strings. For example:

Correct way to define a fuzzable int:

  "restler_fuzzable_int": [
    "1"
  ],

Incorrect way to define a fuzzable int:

  "restler_fuzzable_int": [
    1
  ],

We need to validate this in the engine before proceeding, since later errors can be difficult to debug.

Design Notes

No response

@marina-p marina-p added good first issue Good for newcomers help wanted Pick this issue - it is ready to be worked on. engine Issue in the RESTler engine labels Jun 8, 2023
@gauravdhiman217
Copy link

Hey Marina,
is this issue still open ?. this could be my first contribution . can you please guide me through.
thank you

@marina-p
Copy link
Contributor Author

Hello @gauravdhiman217,

Yes, the issue is still open. The way to implement the validation would be in the engine. Taking a quick look, I suggest starting with adding it to the set_candidate_values method of the CandidateValuesPool class. You can create a separate function (could be local function) and validate it at the very beginning.

To test this, you will need to add a unit test in the engine unit tests with the invalid dictionary.

Thanks,

Marina

@gauravdhiman217
Copy link

Hey @marina-p
Thank You So much for responding. I am going through code base and try to understand the flow. I have one question , here we are only concern about custom dict . right ?

@brokoli777
Copy link
Contributor

brokoli777 commented Nov 20, 2024

Hi! I tried fixing this issue, could you please take a look? I created a test case for the change, but I ran into some issues while running the test cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issue in the RESTler engine good first issue Good for newcomers help wanted Pick this issue - it is ready to be worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants