kogosoftwarellc / open-api

A Monorepo of various packages to power OpenAPI in node
MIT License
892 stars 235 forks source link

BugFix: #778 dont overwrite api doc when controller is shared #780

Closed jjdonov closed 2 years ago

jjdonov commented 2 years ago

This PR implements possible solution 1️⃣ from #778 which is a bug that was introduced in #769 It restores behavior of binding the operation, or (new behavior) by binding each middleware in the array.

I think it is worth some discussion about if this is the correct fix and hopefully this can help kick start the conversation.

~All tests are currently passing, but linting is not. Just need to make some small tweaks to make prettier happy.~

jjdonov commented 2 years ago

and get the build to pass and i'll merge it. thank you!

@jsdevel the failure is unrelated to these changes. I think any PR will fail the check. Its based on latest LTS and is now using node 16. It seems the new version of v8 that node16 uses has a different error message for the same error 👎

I can replicate this by switching my node version between 12 + 16 (didnt have 14 installed), and you can see the fix on 15d70b9