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
The concrete problem for me appeared on the phoneNumber Faker.js function where it is possible to pass the phoneFormat as an argument but it is not possible via the JSON file in which I write my mocked API configuration.
It would be nice to be able to pass function arguments. I looked into the current parser implementation, it seems plausible to update it with a feature such as this one.
I believe it would require an additional split/check on the fakerMethod once the first split(':') is done. :)
E.g. [#faker:phone:phoneNumber('+385#######')]
The text was updated successfully, but these errors were encountered:
Yes it shouldn't be a huge problem to add this feature. Like you already find out we can just extend the logic of the areFakerVarsSyntaxValidInContent function to extract the parameters and give them back in the FakerSyntaxData object.
But I guess we will need then to use a try catch block to be sure that the syntax with the parameters is valid 🤔
I saw you already created a fork of Restapify do you want to take care of the implementation?
Hey @johannchopin, yeah if it's not too urgent for you to get this one out I can take care of the implementation over the weekend and make a PR for review. 😄
The concrete problem for me appeared on the phoneNumber Faker.js function where it is possible to pass the phoneFormat as an argument but it is not possible via the JSON file in which I write my mocked API configuration.
It would be nice to be able to pass function arguments. I looked into the current parser implementation, it seems plausible to update it with a feature such as this one.
I believe it would require an additional split/check on the fakerMethod once the first
split(':')
is done. :)E.g.
[#faker:phone:phoneNumber('+385#######')]
The text was updated successfully, but these errors were encountered: