Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validator throws error for external references #94

Open
ritwik-dell opened this issue Nov 2, 2016 · 5 comments
Open

Validator throws error for external references #94

ritwik-dell opened this issue Nov 2, 2016 · 5 comments

Comments

@ritwik-dell
Copy link

I have a Swagger file which has external references.
Here is a snapshot of how I am calling out the external reference:

    "definitions": {
        "Car": {
            "$ref": "./common/schema/car.schema"
        }
    },

Here is how the car.schema file looks like:

{
  "type": "object",
  "properties": {
    "vin": {
      "type": "string"
    },
    "year": {
      "type": "integer"
    },
    "make": {
      "type": "string"
    },
    "model": {
      "type": "string"
    }
  },
  "required": [
    "vin",
    "year",
    "make",
    "model"
  ]
}

Now Swagger editor and SwaggerUI does not throw an error (There was a problem in SwaggerUI, but it was fixed). However, the validator-badge keeps complaining that there is an error.

Unfortunately the only details it provided was:

{"messages":["malformed or unreadable swagger supplied"]}

Please help.

@huyngo
Copy link

huyngo commented Nov 26, 2017

I'm getting the same issue. Does anyone can help?

@gracekarina
Copy link
Contributor

Hi @huyngo can you please provide the spec files?

@denarced
Copy link

It seems that @huyngo didn't provide the spec files. Too bad because this is an issue for me as well.

@gracekarina
Copy link
Contributor

Hi, can you please provide your spec files or maybe a PR with a failing test with the specs? Thanks in advance @denarced

@bhardwz
Copy link

bhardwz commented Dec 2, 2022

Hi, is there any update in this issue,
I'm getting this error while converting config file 2.0 to 3.0 using swagger-converter.
Due to external references in config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants