question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Schema Dependencies Merged Incorrectly

See original GitHub issue

Prerequisites

  • I have read the documentation;
  • In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.

Description

When merging schema with dependencies, enums are appended instead of replaced.

Steps to Reproduce

  1. Visit this playground example
  2. Select “FOO” for Type 1
  3. Notice form presents errors enum should NOT have duplicate items

image

Expected behavior

The form should have no errors as I expect the list of valid enums to be replaced with ["FOO"]. Not that "FOO" will be appended to list of enums. This appears to be occurring in mergeSchemas util

Actual behavior

merged schema should consist only of a single enum. This is the behavior I see when validating the schema on https://www.jsonschemavalidator.net/.

output: image

But the schema created by react-jsonschema-form contains 4 enums, with two being duplicate: ["FOO", "BAR", "BAZ", "FOO"]

Version

1.0.4

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
epicfaacecommented, Aug 11, 2019
0reactions
travisdahlcommented, Sep 24, 2019

+1 also stuck with this issue. Any news?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question - Stack Overflow
Idea to avoid that spring.handlers/spring.schemas get overwritten when merging multiple spring dependencies in a single jar · Probably won't work. · Yes, it...
Read more >
How do I resolve issues with missing or incorrect schema ...
I have run into various cases where errors are occurring related to the DatabaseSchemaVersion property in the LSW_SYSTEM_SCHEMA table for the BPM and...
Read more >
Merge agent fails when you apply snapshot in SQL Server ...
Fixes an issue in which Merge agent fails when you apply snapshot in SQL Server 2012 or SQL Server 2014 instance if cross...
Read more >
Schema validation warnings from Dependency Scanning ...
Something went wrong while fetching related merge requests.
Read more >
Other Internals - react-jsonschema-form documentation
... merging it), the allOf keyword is dropped from the schema. "additionalProperties":false produces incorrect schemas when used with schema dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found