Skip to content

Conversation

@shockey
Copy link
Contributor

@shockey shockey commented Feb 10, 2018

Description

This PR will (eventually) solve a rather specific resolver regression introduced last Friday.

what I know....
  • This line in this PR is creating (indirectly at least) a patch against a nonexistent path...
  • which is causing the [p] property access here to fail during the patchValueAlreadyInPath check here.
  • The order of the keys in the document affect the outcome: sorting referenced objects low-to-high (definitions before paths, definitions in order of DataModifier, DataModifiers, DataObject, DataObjectArray) will resolve correctly.
  • The issue seems to be unique to this sample: switching the order of definitions and paths in Petstore, for example, does not appear to cause any issues.

Motivation and Context

Fixes swagger-api/swagger-editor#1661.

How Has This Been Tested?

Unit test added.

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@shockey shockey merged commit 923b541 into swagger-api:master May 4, 2018
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

Successfully merging this pull request may close these issues.

New error: Cannot read property 'modifiers' of undefined

1 participant