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

change swagger-js wrapActions to js object #7753

Merged
merged 3 commits into from Jan 26, 2022

Conversation

Axiloom
Copy link
Contributor

@Axiloom Axiloom commented Jan 13, 2022

Specifying for plugins to be chain loaded was causing an issue where a specific wrapActions (plugins/swagger-js) was not able to be set because the. scope of the variable was wrong.

Description

Changing the swagger-js wrapActions to use a js object instead of the original key/value pair, which was preventing the wrapActions from being set

Motivation and Context

Solves the problem of not being able to chain load plugins

Fixes #7730

How Has This Been Tested?

I haven't been able to test and will provider a comment in the issue

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

Not entirely sure about this

@@ -30,7 +30,9 @@ export default function({ configs, getConfigs }) {
},
statePlugins: {
configs: {
wrapActions: configsWrapActions
wrapActions: {
Copy link
Member

Choose a reason for hiding this comment

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

This is technically an invalid usage of wrapActions interface. The code here creates unsupported nested wrapActions object:

wrapAction: {
  configsWrapActions: {
    loaded: ...implementation...
  }
}

Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! I've made a change to the PR which I explained in CR and issue comment.

@char0n char0n merged commit 8ea3cfd into swagger-api:master Jan 26, 2022
@Axiloom Axiloom deleted the bug/7730-fix-chain-loading-plugins branch January 26, 2022 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pluginLoadType: "chain" not working
2 participants