Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.

Retain items in polymorphic mappings without defined schema #208

Merged
merged 2 commits into from
Jan 11, 2017

Conversation

paularmstrong
Copy link
Owner

@paularmstrong paularmstrong commented Jan 6, 2017

Problem

Polymorphic mappings (Array, Union, Values) require strict schema definitions. This means that if your API returns something you didn't expect, Normalizr will throw an error.

Solution

Make it not strict and just retain the original input value in the result.

Fixes #207

TODO

  • Add & update tests
  • Ensure CI is passing (lint, tests, flow)
  • Update relevant documentation

@paularmstrong paularmstrong force-pushed the feature/retain-non-defined-polymorphic branch from d4f653e to 386ddbf Compare January 6, 2017 14:15
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 386ddbf on feature/retain-non-defined-polymorphic into 1d7c0b0 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 386ddbf on feature/retain-non-defined-polymorphic into 1d7c0b0 on master.

@paularmstrong paularmstrong added this to the 3.1.0 - Denormalize milestone Jan 10, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b525f9e on feature/retain-non-defined-polymorphic into 1d7c0b0 on master.

@paularmstrong paularmstrong merged commit b525f9e into master Jan 11, 2017
@paularmstrong paularmstrong deleted the feature/retain-non-defined-polymorphic branch January 11, 2017 16:03
@lock
Copy link

lock bot commented May 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the Outdated label May 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants