Skip to content

Commit

Permalink
Update readme (#5398)
Browse files Browse the repository at this point in the history
* update READMe

* Update Readme and package documentation

* Change width of all images

* Make image source absolute path based on github

* fixes on wording or placement of text

* code review updates
  • Loading branch information
fey101 authored Sep 16, 2024
1 parent e03bc75 commit cdb0c9c
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 28 deletions.
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ vsc-extension-quickstart.md
**/*.map
**/*.ts
.kiotabin/
.vsix
.vsix
images/samples/
9 changes: 9 additions & 0 deletions vscode/microsoft-kiota/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

All notable changes to this project will be documented in this file.

## [1.18.100000002] - 2024-09-12

### Added

- Extension Released for GA
86 changes: 86 additions & 0 deletions vscode/microsoft-kiota/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing to Kiota extension

Thanks for your interest in contributing to Kiota! We welcome contributions from everyone, regardless of skill level or experience. Here are some guidelines to help you get started:

## Getting Started

To get started, you'll need to have the following tools installed:

- [.NET SDK 8.0](https://get.dot.net/8)
- [Visual Studio Code](https://code.visualstudio.com/)



## Building the project

```sh
# On Linux/MacOS
sudo dotnet workload restore
# On Windows, run the following command in an elevated prompt
dotnet workload restore
# then
dotnet build
```

### Building the Kiota generator

You can build just the Kiota generator by running the following commands, which do not require elevated privileges:

```sh
dotnet restore ./src/kiota
dotnet build ./src/kiota
```

## Running the tests

### Test the Kiota command line

```sh
dotnet test ./tests/Kiota.Tests/
```

### Test the Kiota builder

```sh
dotnet test ./tests/Kiota.Builder.Tests
```

## Try out the generator

You can try out the generator including your local changes by running:

```sh
dotnet run -c Release --project src/kiota/kiota.csproj -- <arguments you would pass>
```

### Debugging the Kiota Extension
See [Debugging the Extension](https://github.com/microsoft/kiota/blob/main/vscode/microsoft-kiota/debugging.md)

## Contributing Code

1. Fork the repository and clone it to your local machine.
2. Create a new branch for your changes: `git checkout -b my-new-feature`
3. Make your changes and commit them: `git commit -am 'Add some feature'`
- Include tests that cover your changes.
- Update the documentation to reflect your changes, where appropriate.
- Add an entry to the `CHANGELOG.md` file describing your changes if appropriate.
4. Push your changes to your fork: `git push origin my-new-feature`
5. Create a pull request from your fork to the main repository. `gh pr create` (with the GitHub CLI)

## Reporting Bugs

If you find a bug in Kiota, please report it by opening a new issue in the issue tracker. Please include as much detail as possible, including steps to reproduce the bug and any relevant error messages.

## License

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit [https://cla.opensource.microsoft.com](https://cla.opensource.microsoft.com).

When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
106 changes: 80 additions & 26 deletions vscode/microsoft-kiota/README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,112 @@
# Microsoft Kiota
# Kiota

Kiota is a client generator for HTTP REST APIs described by OpenAPI. The experience is available as [a command-line tool](https://www.nuget.org/packages/Microsoft.OpenApi.Kiota) and as [a Visual Studio Code extension](https://aka.ms/kiota/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 you’re interested in, thanks to a filtering capability.
Kiota is a client/plugin/manifest generator for HTTP REST APIs described by OpenAPI. The experience is available as [a command-line tool](https://www.nuget.org/packages/Microsoft.OpenApi.Kiota) and as [a Visual Studio Code extension](https://aka.ms/kiota/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 you’re interested in, thanks to a filtering capability. It also helps with participating in the Microsoft Copilot ecosystem by enabling generation of API plugins.

## Features
## Capabilities

Using kiota you can:

1. Search for API descriptions.
1. Filter and select the API endpoints you need.
1. Generate models and a chained method API surface in the language of your choice.
1. Call the API with the new client.
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](https://datatracker.ietf.org/doc/draft-miller-api-manifest/). **New**

All that in a matter of seconds.

## Microsoft Kiota extension for Visual Studio Code
## Kiota extension for Visual Studio Code

This [Visual Studio Code](https://code.visualstudio.com/) (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!

* Once the extension is installed, you will be able to see the commands available to you.
## Kiota extension installation
1. In VS Code, navigate to `Extensions`.
<img width="482" alt="Navigate to Extensions on VS Code" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/Navigate%20to%20Extensions%20on%20VS%20Code.png">

<img width="482" alt="VScode extension commands" src="https://user-images.githubusercontent.com/5781590/229946855-faff33bf-4e18-45eb-9b15-a42ac959a916.png">
2. Search for 'kiota'
3. Click on Install.

* Search for an API description using a keyword
You can also install the extension package from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota).

<img width="479" alt="vscode extension search " src="https://user-images.githubusercontent.com/5781590/229947287-3a2850d0-d97e-4a1e-9440-9c97f8e66e1a.png">
## Getting started

<img width="478" alt="vscode extension search results" src="https://user-images.githubusercontent.com/5781590/229947317-dd24f722-d58c-41a6-a85b-fa7c0d48493e.png">
Once the extension is installed, you will be able to see the commands available to you.

* Select the OpenAPI description you are interested in and you will be presented with the Kiota OpenAPI Explorer containing all the available endpoints
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"

<img width="189" alt="Kiota OpenAPI explorer" src="https://user-images.githubusercontent.com/5781590/229947806-27ff49b9-5877-41a2-b7df-c9c19f6f736e.png">
<img width="482" alt="Use the add file icon" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/SearchOrBrowseOptions.png">

* Select the endpoints to include in your API client
The notification bar will also notify you of ongoing background processes e.g when searching for an api using a keyword

<img width="225" alt="kiota vscode select endpoint" src="https://user-images.githubusercontent.com/5781590/229948168-efecfd85-214a-4d65-a225-10b100b15a68.png">
<img width="482" alt="vscode extension search notification" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/searchingNotification.png">

* Finally, you can generate the API client. You will be prompted to provide some parameters for your client such as the class and namespace names. You will also need to select the language for the generated client.
<img width="482" alt="vscode extension search results" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/searchResults.png">

<img width="349" alt="generation complete" src="https://user-images.githubusercontent.com/5781590/229949052-159f3a58-b0e6-421f-9ca5-b45dc49c4639.png">
Select the OpenAPI description you are interested in and you will be presented with the Kiota OpenAPI Explorer containing all the available endpoints

<img width="482" alt="Kiota OpenAPI explorer" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/endpointSelectionandTheGenerateIcon.png">

## Requirements
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.

<img width="482" alt="kiota vscode generate options" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/SelectGenerationOption.png">

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.

<img width="482" alt="Working with the extension's workspace" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/GenerationMultipleClientsSameWorkspace.png">

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.

<img width="482" alt="Notification to Migrate to extension's workspace" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/MigratePromptOnOpeningFolder.png">

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.

<img width="482" alt="Contextual Migrate option on right-clicking on lockfile" src="https://github.com/microsoft/kiota/blob/865b5f9a3b6aa495f42a397714b09a08bdb99011/vscode/microsoft-kiota/images/samples/ContextualMigrateLockToWorkspace.png">

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

None.

## Extension Settings

None.
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:

- [Download our latest builds](https://github.com/microsoft/kiota/releases).
- [Submit bugs and feature requests](https://github.com/microsoft/kiota/issues), and help us verify as they are checked in
- Review [source code changes](https://github.com/microsoft/kiota/pulls)
- Review the [documentation](https://github.com/microsoft/kiota/blob/main/vscode/microsoft-kiota/README.md) and make pull requests for anything from typos to new content

See our contributions guidelines in the [CONTRIBUTING.md](https://github.com/microsoft/kiota/blob/main/vscode/microsoft-kiota/CONTRIBUTING.md) page for more information.
Further guidelines are also available in the page [SUPPORT.md](https://github.com/microsoft/kiota/blob/main/SUPPORT.md)

## Reporting security issues
Check out our [SECURITY.md](https://github.com/microsoft/kiota/blob/main/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](https://go.microsoft.com/fwlink/?LinkId=521839) and [Data Collection Notice](https://docs.opensource.microsoft.com/content/releasing/telemetry.html) to learn more. Learn more in our [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).

## Known Issues
## Trademarks

Checkout the [list of open issues](https://github.com/microsoft/kiota/issues) to get a list of the known issues.
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](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general).
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.

## Release Notes
## Code of Conduct

Checkout the [release notes](https://github.com/microsoft/kiota/releases) to get more information about each release.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion vscode/microsoft-kiota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@
"engines": {
"vscode": "^1.93.0"
},
"license": "MIT",
"categories": [
"Other"
],
"repository": {
"url": "https://github.com/microsoft/kiota.git",
"type": "git"
},
"keywords": [
"openapi",
"api client",
"copilot",
"api plugins",
"api manifest"
],
"activationEvents": [
"onStartupFinished"
],
Expand Down Expand Up @@ -504,4 +512,4 @@
"sha256": "2525D4A8C3ED4972C05E57E4DB2D244E1A708325CE4A5CFB24822D9FD7BB7ED3"
}
]
}
}

0 comments on commit cdb0c9c

Please sign in to comment.