Skip to content

Validator throws error for external references #94

Open
@ritwik-dell

Description

@ritwik-dell

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.

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