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

swagger.json invalid #319

Closed
peterstadler opened this issue Aug 28, 2019 · 0 comments
Closed

swagger.json invalid #319

peterstadler opened this issue Aug 28, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@peterstadler
Copy link
Member

validator error message:

{
    "schemaValidationMessages": [
        {
            "level": "error",
            "domain": "validation",
            "keyword": "oneOf",
            "message": "instance failed to match exactly one schema (matched 0 out of 2)",
            "schema": {
                "loadingURI": "http://swagger.io/v2/schema.json#",
                "pointer": "/definitions/parametersList/items"
            },
            "instance": {"pointer": "/paths/~1application~1newID/get/parameters/0"}
        }
    ]
}

From the docs:

Any sibling elements of a $ref are ignored. This is because $ref works by replacing itself and everything on its level with the definition it is pointing at.

So this is invalid:

"$ref": "#/parameters/docTypeParam",
"required": true

@peterstadler peterstadler added this to the Hotfix 3.5.1 milestone Aug 28, 2019
@peterstadler peterstadler self-assigned this Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant