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

oneOf with "object" types - impossible to replace Option 1 #2183

Closed
3 tasks done
naorgu opened this issue Jan 2, 2021 · 0 comments
Closed
3 tasks done

oneOf with "object" types - impossible to replace Option 1 #2183

naorgu opened this issue Jan 2, 2021 · 0 comments

Comments

@naorgu
Copy link

naorgu commented Jan 2, 2021

Prerequisites

Description

When using a json schema with oneOf where the possible types are object, Option 1 properties cannot be removed - when choosing a different option, Option 1 properties remain in the json output. See Playground reproducible

Steps to Reproduce / Actual behaviour

  1. Create a json schema with oneOf with object types
  2. Switch to Option 2
  3. Option 2 properties added, Option 1 properties remain in the json output
  4. Switch to Option 3
  5. Option 3 properties added, Option 2 properties deleted (as they should), Option 1 properties remain

Expected behavior

  1. Create a json schema with oneOf with object types
  2. Switch to Option 2
  3. Option 2 properties added, Option 1 properties deleted
  4. Switch to Option 3
  5. Option 3 properties added, Option 2 properties deleted

Correct behaviour can be found in the json-editor playground here

Version

Current playground versioon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants