Skip to content

Dereferencing does not happen when allOf is used #736

@DeepeshMitra

Description

@DeepeshMitra

Describe the bug
Dereferencing does not work when allOf is used at the same level as properties. i.e. in the below example dereferencing will not work.

{
      "type": ["object", "null"],
      "properties": {
        "termDetails": {
          "$ref": "#/definitions/def2"
        }
      },
      "allOf": [],
      "title": "def1"
    }

To Reproduce
Find the attahced codesandbox link. The Codesandbox
The resultant schema with allOf & without allOf is being printed in the console.

Expected behavior
Dereferencing should work irrespective of whether alllOf is used or not used.

Screenshot
Schema difference
Image

Result difference, notice how in the first half where I used allOf , dereferencing did not work
Image

Desktop (please complete the following information):

  • OS: ios
  • Browser: Chrome
  • Version 131.0.6778.206

Additional context
I have tried the same with other dereferencing libraries like dereference-json-schema, the dereferencing works irrespective of whether allOf is used or not.

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