npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@microsoft/api2teams

v0.1.2

Published

openapi spec to teams app

Downloads

51

Readme

Welcome to api2teams

Deprecation Notice: this library has been deprecated and is no longer maintained or updated. For continued support and enhanced features, we recommend using the TTK to build a RAG bot in Teams. This will assist you in converting your Open API specification file into an AI chatbot.

api2teams is a command line tool to generate a complete conversational style command and response Teams application based on your Open API specification file and represent the API response in the form of Adaptive Cards.

api2teams is the best way to start integrating your APIs with Teams conversational experience.

Prerequisite

Before running this CLI and deploying your generated Teams App to Azure or your local development machine, please ensure that you have the following prerequisites in place:

Quick start

  • Install api2teams with npm: npm install @microsoft/api2teams@latest -g
  • Prepare the Open API specification. If you don't currently have one, start with a sample we provided by saving a copy of the sample-open-api-spec.yml to your local disk.
  • Convert the Open API spec to a Teams app, assuming you are using the sample-open-api-spec.yml: api2teams sample-open-api-spec.yml

Available commands and options

The CLI name is api2teams. Usage is as below:

Usage: api2teams [options] <yaml>

Convert open api spec file to Teams APP project, only for GET operation

Arguments:
  yaml                   yaml file path to convert

Options:
  -o, --output [string]  output folder for teams app (default: "./generated-teams-app")
  -f, --force            force overwrite the output folder
  -v, --version          output the current version
  -h, --help             display help for command

You can input below command to generate Teams App to default or specific folder:

api2teams sample-open-api-spec.yml # generate teams app to default folder ./generated-teams-app
api2teams sample-open-api-spec.yml -o ./my-app # generate teams app to ./my-app folder
api2teams sample-open-api-spec.yml -o ./my-app -f # generate teams app to ./my-app folder, and force overwrite output folder
api2teams -h # show help message
api2teams -v # show version information

Getting started with the generated Teams app

  • Open the generated project in Visual Studio Code and make sure you have the latest Teams Toolkit (version 5.0.0 or higher) installed.

  • Follow the instruction provided in the README.md for the generated project to get started. After installing the Teams app generated from the provided OpenAPI spec, you will receive a welcome message.

    welcome

  • You can then run a GET /pets/1 command in Teams to receive an Adaptive Card response from the bot.

    response

Current limitations

  1. The api2teams doesn't support Open API schema version < 3.0.0.
  2. The api2teams doesn't support Authorization property in Open API specification.
  3. The api2teams doesn't support webhooks property and it would be ignored during convert.
  4. The api2teams doesn't support oneOf, anyOf, notkeyword (It only support allOf keyword currently).
  5. The api2teams doesn't support POST, PUT, PATCH or DELETE operations (It only supports GET operation currently).
  6. The generated Adaptive Card doesn't support array type.
  7. The generated Adaptive Card doesn't support file upload.
  8. The generated Teams app can only contain up to 10 items in the command menu.

Further reading