kiota/vscode/microsoft-kiota
Charles Wahome fef6ff3736
Task: create various commands (#5581)
2024-10-14 11:03:11 +03:00
..
.vscode - adds kiota as a known spell check word 2023-05-16 09:36:45 -04:00
images Update readme 2 (#5425) 2024-09-19 14:37:30 +03:00
l10n Task: reorganize questions (#5367) 2024-09-18 16:44:33 +03:00
media update vscode logo (#5408) 2024-09-12 22:07:09 +03:00
src Task: create various commands (#5581) 2024-10-14 11:03:11 +03:00
.gitignore - excludes out directory from tracked files 2023-09-25 09:32:44 -04:00
.hintrc - adds missing configuration file 2023-08-22 09:43:29 -04:00
.vscodeignore Update readme (#5398) 2024-09-16 13:45:49 +03:00
CHANGELOG.md update extension changelog 2024-10-03 15:00:39 +03:00
CONTRIBUTING.md Update readme (#5398) 2024-09-16 13:45:49 +03:00
LICENSE - copies license file 2023-03-27 11:19:37 -04:00
README.md Fix Readme image sources by using raw url as opposed to blob url (#5445) 2024-09-20 12:01:00 +00:00
debugging.md Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
eslint.config.mjs fix: migrates eslint configuration 2024-07-24 13:23:32 -04:00
package-lock.json chore(deps-dev): bump typescript in /vscode/microsoft-kiota 2024-10-09 08:52:57 +00:00
package.json chore(deps-dev): bump typescript in /vscode/microsoft-kiota 2024-10-09 08:52:57 +00:00
package.nls.ar.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.cs.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.es.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.fr.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.it.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.ja.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.pl.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.pt.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.ru.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.sw.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.tr.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
package.nls.zh-cn.json Feature: Update kiota vs code extension (#4500) 2024-08-22 12:34:11 +03:00
tsconfig.json - adds path mapping for glob 2023-09-27 09:20:53 -04:00
vsc-extension-quickstart.md
webpack.config.cjs - moves webpack config to cjs 2023-09-27 09:19:23 -04:00

README.md

Kiota

Kiota is a client/plugin/manifest generator for HTTP REST APIs described by OpenAPI. The experience is available as a command-line tool and as a Visual Studio Code extension. Kiota helps eliminate the need to take a dependency on a different API client for every API that you need to call, as well as limiting the generation to the exact API surface area youre interested in, thanks to a filtering capability. It also helps with participating in the Microsoft Copilot ecosystem by enabling generation of API plugins.

Capabilities

Using kiota you can:

  1. Search for API descriptions.
  2. Filter and select the API endpoints you need by slicing only required endpoints from a rather bulky OpenAPI Description
  3. Generate models and a chained method API surface in the language of your choice. Supported languages can be viewed at https://github.com/microsoft/kiota/tree/main?tab=readme-ov-file#supported-languages
  4. Call the OpenAPI described API with the new client generated in step 3 above.
  5. Generate API plugin manifests that can be easily integrated into Microsoft Copilot. New
  6. Generate API manifests. New

All that in a matter of seconds.

Kiota extension for Visual Studio Code

This Visual Studio Code (VS Code) extension adds a rich UI for the Kiota experience. The features include all of Kiota capabilities such as search for API descriptions, filtering and generating API clients and more!

Kiota extension installation

  1. In VS Code, navigate to Extensions. Navigate to Extensions on VS Code

  2. Search for 'kiota'

  3. Click on Install.

You can also install the extension package from the VS Code Marketplace.

Getting started

Once the extension is installed, you will be able to see the commands available to you.

You can kick start the process by using the add file icons as appears below or using command pallete with the command "Add API description"

Use the add file icon

The notification bar will also notify you of ongoing background processes e.g when searching for an api using a keyword

vscode extension search notification

The search results will be displayed as below once the search is complete

vscode extension search results

Select the OpenAPI description you are interested in and you will be presented with the Kiota OpenAPI Explorer containing all the available endpoints

Kiota OpenAPI explorer

Select the endpoints to include in your API client as above and click the generate icon. Kiota extension will display with the options to generate either client, plugin or other.

kiota vscode generate options

Finally, the notification bar at the bottom right will display "Generation Completed Successfully" once the generation is done. Click on your vscode file explorer to see the generated outputs in the current workspace if default selection was your output directory choice or navigate to selected folder to see the output.

Migrating from older use of lock file to a workspace.json

The latest version of the Kiota extension has been improved to using a workspace instead of a lock file to facilitate having multiple clients, plugins, or manifests within the same workspace. The workspace.json file also provides an opportunity to edit, or regenerate the outputs conveniently.

Working with the extension's workspace

If you previously generated a client that had a lock file, kiota prompts you to migrate to using the workspace once you open the previously generated folder containing a lock file. You can choose to migrate immediately or ask to be reminded later.

Notification to Migrate to extension's workspace

You can also access the same feature later by using the contextual option on the lock file, by right-clicking on the lock file and selecting the option to migrate.

Contextual Migrate option on right-clicking on lockfile

Enjoy the benefits of the workspace once the migration is complete.

Extension Settings

  1. Navigate to extensions using the UI or (ctrl+shift+x) or (cmd+shift+x) for mac users
  2. Search 'kiota'
  3. Click on the settings icon on the kiota extension
  4. On the dropdown navigate to Extension Settings and click on it.
  5. This should open a settings tab on your vscode that has filtered for all Kiota supported extensions.
  6. Feel free to leave the settings as is or customize them for even better control.

Contributions

There are many ways in which you can participate in the project, for example:

See our contributions guidelines in the CONTRIBUTING.md page for more information. Further guidelines are also available in the page SUPPORT.md

Reporting security issues

Check out our SECURITY.md page for details.

Telemetry

Kiota extension collects usage data and sends it to Microsoft to help improve our products and services. Read our Privacy Statement and Data Collection Notice to learn more. Learn more in our FAQ.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.