Open bogi158 opened 1 year ago
Related issue #660
Thank you. I see that the issue is not really solved, and you still have to change the openapi-validator package code to make it work. Not a very elegant solution. I do not see any PR related to the problem so I guess no one really added this feature on the package and everyone is fixing this by themselves locally.
Describe the bug I have generated a server with
openapi-express-server
but I need to convert it to ES6 as I will be using some libraries that do not support CommonJS anymore so I cannot use require for them. I generated a basic server to test the refactor but I keep getting an error from resolver.js. I have tried with express-openapi-validator v3, v4 and v5.To Reproduce Generate a server with openapi-express-server Generator and convert the files to ES6 standard.
Actual behavior Server loads up correctly, but when an API is called I get the error:
Expected behavior openAPI validator should run also with ES6 modules normally
Examples and context This is the Controller that is giving the error, but also all the others controllers will throw an error if used. The error appears not on the server startup but on the first API call to the REST endpoint (in this case
info/version
)