Error copying examples to workdir #208
Description
I've setup my RAFT config with:
"toolName": "RESTler",
"outputFolder": "restler-logs",
"toolConfiguration": {
"tasks": [
{
"task": "compile",
"compileConfiguration":
{
"discoverExamples": true,
"usebodyexamples": true,
"UseQueryExamples": true,
"ExamplesDirectory": "."
and my API json has:
"parameters": [
{
"name": "id",
"in": "path",
"description": "Id of the object",
"required": true,
"schema": {
"type": "string",
"format": "guid"
},
"examples":
{
"example": {
"$ref": "./examples.json"
}
}
So I would expect the Examples.json to get copied to the work dir, but I get
Unhandled exception. System.AggregateException: One or more errors occurred. (Could not resolve the JSON path '/work_dir_6ac5804a-4632-4ec4-aa45-a0dd090ecfde/examples.json' with the full JSON path '/work_dir_6ac5804a-4632-4ec4-aa45-a0dd090ecfde/examples.json'.)
---> System.InvalidOperationException: Could not resolve the JSON path '/work_dir_6ac5804a-4632-4ec4-aa45-a0dd090ecfde/examples.json' with the full JSON path '/work_dir_6ac5804a-4632-4ec4-aa45-a0dd090ecfde/examples.json'.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileNotFoundException: Could not find file '/work_dir_6ac5804a-4632-4ec4-aa45-a0dd090ecfde/examples.json'.
File name: '/work_dir_6ac5804a-4632-4ec4-aa45-a0dd090ecfde/examples.json'
from the RESTler compiler and the examples.json is not in the workdir