friendsofgo / killgrave

Simple way to generate mock servers written in Go

Home Page:https://friendsofgo.github.io/killgrave/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For any JSON schema I get 404 error

NavaneethNKMN opened this issue · comments

Even the schema that was provided in documentation also gives me the below error in terminal:

parse "file://D:\killgrave-master\killgrave-master/internal\server\http\test\testdata\imposters/schemas/create_gopher_request.json": invalid port ":\killgrave-master\killgrave-master" after host: error validating the json schema

In postman, I get 404-Not found.
I have attached files of imposter and schema with txt extension.
create_gopher.imp.txt
create_gopher_request.txt

Please help me out if I am missing something

Hi @NavaneethNKMN,

First of all, thanks for reaching us! I'll be happy to try to help you.
Let me ask you some questions to get additional context:

  • What Killgrave version (v0.3.3, v0.4.0, ...) are you using?
  • How are you running it (Docker, Homebrew, Souce code...)?
  • How is your imposter's directory organized (where do you have each file)?
  • When are you getting those errors (initialization, request-time...)?

Based on the context I have, some potential issues that come to my mind are:

  • Your imposter points to schemas/create_gopher_request.json, do you have the schema file in that location relative to the location your imposter is?
  • Your imposter points to a body file, have you defined it as well? Is it in the proper location?

Thanks!! 🙏🏻

Thanks for the reply.

Killgrave version - Master
How are you running it (Docker, Homebrew, Souce code...) - Source Code
How is your imposter's directory organized (where do you have each file)- I have attached the image of the folder structure
>imposters
   >responses
   >schemas
When are you getting those errors (initialization, request-time...) - During request time.
  • Your imposter points to schemas/create_gopher_request.json, do you have the schema file in that location relative to the location your imposter is? - Yes I have a schema file in that location

  • Your imposter points to a body file, have you defined it as well? Is it in the proper location? - Yeah body file is also present and it is in the proper location
    Capture

Hello sorry for the very delay on the response, the imposters that we have in the repository are only for the unit testing purpose, if you want to use killgrave, you we will need create your own or even if you want copy and paste that and put in the proper paths

I proceed to close it due to inactivity. Please, feel free to open another issue if you're still struggling with imposters containing a JSON Schema.