Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Failed validating 'oneOf'

Open
#80 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

No files, tests, or entry points are named. Start by reproducing the supplied validation error with the OpenAPI instance, then trace validation of the callbacks property and its oneOf schemas. Done means identifying whether the reported structure is invalid or the validator is producing an incorrect diagnostic, with a focused regression test if a defect is confirmed.

Written by the indexing model from the issue text.

Description

Hello,
I don't understand the following validation error:

{'{$response.header.Location}': {'get': {'requestBody': {}, 'responses': {'301': {'x-scope': ['', '#/components/callbacks/moveProgress'], '$ref': '#/components/responses/MoveProgress'}, '303': {'x-scope': ['', '#/components/callbacks/moveProgress'], '$ref': '#/components/responses/MoveSuccess'}}}}} is not valid under any of the given schemas

Failed validating 'oneOf' in schema['properties']['paths']['patternProperties']['^/']['properties']['put']['properties']['callbacks']['additionalProperties']:
    {'oneOf': [{'$ref': '#/definitions/callback'},
               {'$ref': '#/definitions/reference'}]}

On instance['paths']['/users/user/{dn}']['put']['callbacks']['move-progress']:
    {'{$response.header.Location}': {'get': {'requestBody': {},
                                             'responses': {'301': {'$ref': '#/components/responses/MoveProgress',
                                                                   'x-scope': ['',
                                                                               '#/components/callbacks/moveProgress']},
                                                           '303': {'$ref': '#/components/responses/MoveSuccess',
                                                                   'x-scope': ['',
                                                                               '#/components/callbacks/moveProgress']}}}}}

The x-scope was not added by myself. I don't have any oneOf defined.
Maybe someone can point me to the error?

Dominant language
Python
Stars
409
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python-openapi/openapi-spec-validator

All issues in python-openapi/openapi-spec-validator

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.