node-red-node-swagger icon indicating copy to clipboard operation
node-red-node-swagger copied to clipboard

Openapi3 upgrade

Open fasblom opened this issue 1 year ago • 4 comments

Background of the PR:

  • Upgrade the dependency of the swagger-ui from 2.1.4 -> 5.11.1 as the previous package is old and with security issues
  • As a consequence implemented the OpenAPI 3 specification instead of OpenAPI 2

Consequences:

  • Updated outdated packages
  • Updated swagger.js to follow OpenAPI 3 specification
  • Removed outdated fields like produces, consumes from swagger.js and swagger-html
  • Updated way of generating the Swagger-HTML site based on swagger-iu

Some comments:

  • The full OpenAPI 3 spec is not implemented - but the core concepts that are in line with what has been implemented as per the previous release

Resolves #83 , Resolves #82 , Resolves #74 , Resolves #51

fasblom avatar Feb 05 '24 08:02 fasblom

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: fasblom (3a23fb37327a69893279f03896d30825ee7465b4, 339b6b5e8f653cde5486a26b1633f6d8673c75bc, 0262ff34626a6792c2f9f07bcdb3ebe294f88ed7, 8948c12a46892020362eccaa6c72884d5c36ff57, 5059a33381572811d2c209c3b80c0b2595ae7d52, 3e35e914297ceb280125e58e6034ca5f33f531ca, e2038bed5dad60a3ad912fb9697fe9cff73a36e3, 1db08311f0771d9f71f982e639cfea202127ad7f, f0d8446a24b71c66607633075873b78e3aad08a4, 63e65abd0013eb3e2e920333e4bffb25875d3bae, b820ee580fdd4b18c08561acf1ecaa1405035e65, 48af206708340a146f6b5ffa93a34cfd6cb4fff2, 7c8b07b2103fc2ebf888947b2408c0564c9f2598, 01a05f7f4f996a6cfc95a7d958ef181e87f6fcd5, e83696d63a71fb440985fd2b38b642edd367a4af, 226ca7debbd0140313d17de6c1ecdf911a757452, 6747a9628f6d123aea614440283b9c438f019586, 3ae266ef1af655f0b21750570e229688ece5fd77, 90a120fabc7c52aeb1aeec07b53dfbdcdd87e587, 8db1b2b639c4a3ac990711f6e833b804a10d8d14)

@knolleary - Have you had a chance to look at this PR for updating Swagger?

fasblom avatar Feb 22 '24 12:02 fasblom

I have not looked. I do not actively use this node, but I will try to review it soon.

I suspect changing the format of the spec it generates warrants a major version bump as it could be considered a breaking change.

knolleary avatar Feb 22 '24 12:02 knolleary

Major version bump sounds reasonable as it changes quite a lot given the new OpenAPI-spec. Have you had a chance to look at it yet @knolleary ? Kind regards

fasblom avatar Apr 03 '24 12:04 fasblom