I want to add Open API specification to create swagger document for endpoints of Azure function app that is developed using JavaScript (Node js).
I understand this can be done in Dotnet Azure function app using the package Microsoft.Azure.WebJobs.Extensions.OpenApi.
Is there any such package available for Javascript Azure function? Or Suggest any other alternative to create documentation for Node azure functions?
We have two options available for integrating Open API specifications with JavaScript Azure Function which are MSAL and ADAL.
The Microsoft Authentication Library (MSAL) enables developers to acquire tokens from the Microsoft identity platform in order to authenticate users and access secured web APIs.
Using MSAL, a token can be acquired from a number of application types like web applications, web APIs, single-page apps (JavaScript), mobile and native applications. Check this Microsoft Authentication Library for JavaScript for more information.
Similarly, the Azure Active Directory Authentication Library (ADAL) for Node.js enables Node.js applications to authenticate to Azure AD in order to access AAD protected web resources. But since ADAL is being deprecated, it's recommend that you use the Microsoft Authentication Library (MSAL).
For more information check this Azure AD Library for JavaScript.