-
Notifications
You must be signed in to change notification settings - Fork 48
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
revert #8103b63; fix bugs; restyle; refactor #67
Conversation
Thanks for this. We've had a report that this node is broken on 1.0 due to its use of some Bootstrap apis we removed. What version of NR did you test this against? Keen to get it working on 1.0 again, but should probably get this PR merged first as a healthy base-line. |
@knolleary I last tried it on 0.20.8. I'm just moving everything over to 1.0.2 so if you can leave it with me for a few days I'll take another look against latest and report back. |
Here's the report of the problem. https://discourse.nodered.org/t/did-a-recent-update-break-swagger/17369 I have asked them to raise an issue, but I know what needs doing and just wanted to sanity check you hadn't got there first somehow with this pr. I'll look at merging this and then fixing the 1.0 issue. |
@knolleary I've taken a look at it... and I've found that:
This was all working in my fork of node-red-node-swagger on Node-RED 0.20.8 but not in 1.0.x. I concur that this is down to I also included in the PR some limited styling improvements by adding some retrofit CSS rules that now don't work and appear not to make it through to the browser at all. |
Restore original name from privately scoped fork name Co-Authored-By: Nick O'Leary <[email protected]>
Signed-off-by: James Sutton <[email protected]>
Updating Tooltips to work with new RED.popover.tooltip API
@knolleary sorry for the delay but I've now merged the PR from @jpwsutton, retested locally with Node-RED 1.0.2, and all seems well.
I haven't yet tried bumping the Swagger-UI version - that can probably wait until after we've got a working baseline release, but I'll let you take the lead there. |
Just need to get @jpwsutton to sign the CLA and we can merge this. |
Sorry, it looks like the CLA was signed for my other email address. All done now 👍 |
This PR incorporates the following changes I've made, arising from #66:
rolled back this commit originally discussed in Don't produce swagger for http-in nodes without a corresponding http-out node #17
fixed all the problems that have prevented my use of the plugin on complex, branching flows for the past 3 years
entirely refactored the code in
swagger.js
to a modern functional ES6 style with heavy use of destructuring, focusing on code readability, maintainability; a more self-documenting, narrative flow with far less wordy code.left the
swagger-ui
version at 2.1.4 because of apparent breaking changes in that library from 2.1.4 to 2.1.5 and seemingly at many points since.applied a modicum of extra styling to
swagger-ui-html
to help it feel more modern and fix some UI oddities.The code has been tested with every flow I have that previously broke the plugin.
This PR should fix or positively affect #43, #44, #57, #58, #59, #60, #61.
Due to the rollback of an earlier commit, it also supercedes PRs #62 and #64.
The rollback of the earlier commit means that #17 should probably be reopened and fully discussed before reimplementing the idea.