Skip to content

Separated files are not validated correctly #396

Closed as not planned
Closed as not planned
@curry684

Description

@curry684

Take a look at the split up OpenAPI/Swagger example definition at https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v2.0/json/petstore-separate/spec/swagger.json.

It's split up into multiple files, for example:

            "schema": {
              "$ref": "../common/Error.json"
            }

Running the following command on a local copy of that file (schema here):

vendor/bin/validate-json sample/spec/swagger.json res/schema.json

Happily outputs that validation succeeded... even if I add dozens of random characters anywhere in any of the included documents.

So it would seem that:

  • These references are not resolved at all, and
  • The failure to resolve them is completely ignored while it should be blocking successful validation

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