
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
swagger2teams
Advanced tools
This is a CLI tool to convert swagger yaml file to Teams App command bot project with adaptive cards based on [TeamsFx](https://github.com/OfficeDev/TeamsFx).
This is a CLI tool to convert swagger yaml file to Teams App command bot project with adaptive cards based on TeamsFx.
Make sure your NodeJS version >= 14
Install the CLI
npm install swagger2teams -g
If you don't have any swagger yaml file, you can download some sample yaml files here: https://github.com/SLdragon/test-swagger-yaml-files
Run the convert tool, it will generate teams project to generated-teams-app folder
swagger2teams test4.yml
You can also specify which folder to generate teams project
swagger2teams test4.yml -o my-custom-teams-app-folder
Open generated folder in VSCode, and make sure you have installed Teams Toolkit (4.x.x).
Click F5 in VSCode to run the Teams App project to view the result (Use this yaml file as example: https://github.com/SLdragon/test-swagger-yaml-files/blob/master/test4.yml):
GET /pets/1 to Bot, bot will send a response adaptive card:
GET /pets to Bot, it will first send request a request adaptive card:

https://www.swagger.io/pets/1 (Note: currently base URL can only be https://*.swagger.io) inside message box, you can see the link unfurling:
Adaptive card doesn't support file upload, so if api contains file upload, then it cannot be converted to adaptive card
For request card, there is no proper element to represent array type in adaptive card, so user need to input the array value manually
It will not generate backend api calls due to swagger may contains auth, which is not easy to handle. So we will only provide a mock function and user need to manually update the mock to call real backend api.
Some APIs may have conflict for the command trigger pattern. For example in test.yml file, GET /user/login and GET /user/{username} has conflict, the convert tool cannot easily to distinguish these two APIs.
Do not support keyword oneOf, anyOf, not because there is no better ways to represent it in adaptive cards, only support allOf keyword
Cannot remove link unfurling caches due to lack document about how to remove it, and there is an issue to track this: https://github.com/MicrosoftDocs/msteams-docs/issues/8108
Command intellisense can only contain max 10 items due to Teams limitation
FAQs
This is a CLI tool to convert swagger yaml file to Teams App command bot project with adaptive cards based on [TeamsFx](https://github.com/OfficeDev/TeamsFx).
We found that swagger2teams demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.