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

Support for oneOf for the filterBySchema function #66

Open
MariusVuscanNx opened this issue Mar 27, 2024 · 0 comments
Open

Support for oneOf for the filterBySchema function #66

MariusVuscanNx opened this issue Mar 27, 2024 · 0 comments

Comments

@MariusVuscanNx
Copy link

Given a json schema:

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
        "BA": {
            "oneOf": [
                {
                    "properties": {
                        "someProp": {
                            "type": "string"
                        }
                    },
                    "type": "object"
                },
                {
                    "items": {
                        "properties": {
                            "someProp": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    },
                    "type": "array"
                }
            ]
        }
    }
}

running the filterBySchema function on a json:

{
    "BA": {
        "someProp": "123",
        "someProp": "1234"
    }
}

will result in emptying the object/array property.

{
    "BA": {}
}

while the expected result would be:

{
    "BA": {
        "someProp": "123"
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant