Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions