Skip to content

Conversation

tim-lai
Copy link
Contributor

@tim-lai tim-lai commented Mar 12, 2020

Description

Changed from schema: ImPropTypes.orderedMap.isRequired, to schema: ImPropTypes.map.isRequired

Motivation and Context

Prior to this change, there exists a console error

Warning: Failed prop type: Invalid prop `schema` of type `Immutable.Map` supplied to `Model`, expected `OrderedMap`.
    in Model (created by ModelWrapper)
    in ModelWrapper (created by Models)
    in span (created by ModelCollapse)
    in ModelCollapse (created by Models)
    in div (created by Models)
    in div (created by NoMargin)
    in NoMargin (created by Collapse)
    in Collapse (created by Models)
    in section (created by Models)
    in Models (created by _class)
    [...more output omitted...]

How Has This Been Tested?

  1. Run Swagger UI in development mode
  2. In the default Petstore definition, expand the ApiResponse model
  3. Observe that a PropType error has been emitted in your browser's console...

Screenshots (if appropriate):

Checklist

My PR contains...

  • No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes to a public API (config options, System API, major UI change, etc).
  • are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • are not breaking changes.

Documentation

  • My changes do not require a change to the project documentation.
  • My changes require a change to the project documentation.
  • If yes to above: I have updated the documentation accordingly.

Automated tests

  • My changes can not or do not need to be tested.
  • My changes can and should be tested by unit and/or integration tests.
  • If yes to above: I have added tests to cover my changes.
  • If yes to above: I have taken care to cover edge cases in my tests.
  • All new and existing tests passed.

@tim-lai tim-lai requested review from webron and shockey March 12, 2020 23:02
Copy link
Contributor

@shockey shockey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but please clean out the unrelated diff before merging!

@@ -114,7 +114,7 @@ export default class ObjectModel extends Component {
}
{
// empty row befor extensions...
!showExtensions ? null : <tr>&nbsp;</tr>
!showExtensions ? null : <tr><td>&nbsp;</td></tr>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like your change from #5918 snuck in!

@tim-lai
Copy link
Contributor Author

tim-lai commented Mar 16, 2020

Closing this PR in favor of cleaner PR #5921

@tim-lai tim-lai closed this Mar 16, 2020
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.

2 participants