validator-badge
validator-badge copied to clipboard
Validator throws error for external references
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.
I'm getting the same issue. Does anyone can help?
Hi @huyngo can you please provide the spec files?
It seems that @huyngo didn't provide the spec files. Too bad because this is an issue for me as well.
Hi, can you please provide your spec files or maybe a PR with a failing test with the specs? Thanks in advance @denarced
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.