Skip to content

Providing path to json file instead of content of the json. #60

@bartzet

Description

@bartzet

Instead of providing the JSON format structure after return, is there a way to point Ambassador to the .json file located in the project of the app we want to test?

instead of

router["/api/v2/users"] = JSONResponse() { _ -> Any in
    return [
        ["id": "01", "name": "john"],
        ["id": "02", "name": "tom"]
    ]
}

something like:

router["/api/v2/users"] = JSONResponse() { _ -> Any in
    return [
       path/to/file/users.json
    ]
}

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