azure-functions-nodejs-openapi icon indicating copy to clipboard operation
azure-functions-nodejs-openapi copied to clipboard

v4 Programming model?

Open diberry opened this issue 1 year ago • 5 comments

Does this work on the new v4 Programming model @aaronpowell?

diberry avatar Apr 12 '23 15:04 diberry

Possibly. Given that all it does is create an internal object structure that has metadata you provide and then an endpoint you register that will give you the swagger output, it should work but it might be a bit clunky.

But Functions v4 will actually simplify the implementation, or at least it should in theory. I tried with one of the early builds and found some hurdles that I raised to the Functions team, but I haven't reviewed it since then.

aaronpowell avatar Apr 13 '23 03:04 aaronpowell

@aaronpowell any luck with the v4? Is it possible to use it with the v4 or not yet? I'm trying to implement it but the structure of the folders and the files are quite different from the v3, so I can't really follow the examples from this repo :/

rafaelgrilli92 avatar Oct 05 '23 03:10 rafaelgrilli92

@aaronpowell any luck with the v4? Is it possible to use it with the v4 or not yet? I'm trying to implement it but the structure of the folders and the files are quite different from the v3, so I can't really follow the examples from this repo :/

There are some structurally different types used in v4 compared to v3 which means it's not directly compatible, so at the moment it doesn't support v4. I'm also no longer in a role where I'm doing any JS development so I don't have a whole lot of bandwidth to tackle this at present.

aaronpowell avatar Oct 05 '23 03:10 aaronpowell

Sad news!! But thanks for the quick response. Appreciate it! Do you know any other way to work with OpenAPI and Azure Functions to make things simpler?

rafaelgrilli92 avatar Oct 05 '23 03:10 rafaelgrilli92

Hi, if you still interested in OpenAPI in Azure Functions V4, look at this repo: https://github.com/apvee/azure-functions-nodejs-monorepo. We are just published the repo as public and same for the npm package. ❤️ Feel free to submit ideas and contribution! At this moment is supported just the version 3.0 of the OpenAPI Spec, but soon will open to the 3.1 and 2.0 😄

fabiofranzini avatar Sep 19 '24 21:09 fabiofranzini