You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run restler compile to generate grammar files, it creates a wrong dynamic dependency on one of the API requests so restler has to create another unrelated resource before that request.
Steps to reproduce
This is the partial resource definitions for my PUT /api/assets/{assetName}.
I also have another path called PUT /api/datasets/{datasetName}, which does nothing with the assets API.
But in assets request in grammar.py, I saw _api_datasets__datasetName__put_name.reader() which comes from the dataset creation API. Look at the name under datasetConfiguration. It should be a simple string.
This issue is due to imprecision in one of the heuristics in RESTler for identifying dependencies. If these names should simply be arbitrary strings, adding the following to the dictionary should resolve the incorrect dependencies in the grammar (or adding a custom payload generator for the strings if the names must be unique):
Unfortunately, this same imprecision could impact new APIs with a similar naming pattern in the body and those new properties would need to be added similarly to the above. (Please keep this issue open to track improving the dependency analysis to fix the root cause).
Description
When I run
restler compile
to generate grammar files, it creates a wrong dynamic dependency on one of the API requests so restler has to create another unrelated resource before that request.Steps to reproduce
This is the partial resource definitions for my
PUT /api/assets/{assetName}
.I also have another path called
PUT /api/datasets/{datasetName}
, which does nothing with the assets API.But in assets request in
grammar.py
, I saw_api_datasets__datasetName__put_name.reader()
which comes from the dataset creation API. Look at thename
underdatasetConfiguration
. It should be a simple string.If I remove
/api/datasets/{datasetName}
in my swagger input, restler generates correct file.And I didn't set any producer/consumer relationships in my annotation file.
Expected results
_api_datasets__datasetName__put_name.reader()
should be a simple fuzz string.Actual results
_api_datasets__datasetName__put_name.reader()
comes from a wrong restler logic?Environment details
The text was updated successfully, but these errors were encountered: