MicrosoftDocs / openapi-docs

Creative Commons Attribution 4.0 International
13 stars 34 forks source link

Add REST API Client Code Generator section to install.md #6

Closed christianhelle closed 1 year ago

christianhelle commented 1 year ago

The changes here are based off a suggestion by @baywet in this discussion to add information about REST API Client Code Generator as a community provided tooling option for Kiota.

I added the following to install.md

REST API Client Code Generator

[!IMPORTANT] The REST API Client Code Generator extension for Visual Studio is maintained and distributed by the community and is not an official Microsoft Visual Studio extension. Microsoft makes no warranties, express or implied, with respect to the extension or its use. Use of this extension is at your own risk. Microsoft shall not be liable for any damages arising out of or in connection with the use of this extension.

REST API Client Code Generator is a collection of Visual Studio C# custom tool code generators for OpenAPI specifications. This extension will install Kiota on-demand and will also add the required NuGet packages to build the generated code to the project. The generated code is created as a "code-behind" file to the OpenAPI specifications file in the .NET project. This extension offers same-day releases for new Kiota versions, but this requires updating the extension, which can be configured to be automatically.

Installation:

  1. From Visual Studio (Windows), using the Manage Extensions dialog box (Tools -> Manage Extensions), search for extension called REST API Client Code Generator. This extension is available for Visual Studio 2022 for AMD64 and ARM64 and Visual Studio 2019

    For Visual Studio for Mac, follow these instructions

  2. Click on the Download button. The extension will be installed after closing Visual Studio so you will need to do a restart

Usage:

To generate code using Kiota, Right click on a project or location under a project and select Add -> New REST API Client -> Generate with Microsoft Kiota

add-new

This will prompt you for a URL to download the OpenAPI specifications file.

If the operation worked successfully then you should see a code-behind file for the OpenAPI specifications. Once you have generated code, all changes to the OpenAPI specifications file will trigger a re-generation of the code-behind file via the KiotaCodeGenerator custom tool

custom-tool-experience

If you already have a OpenAPI specifications file in the project, then you can also generate code using Kiota by right clicking on the file then selecting REST API Client Generator -> Generate with Microsoft Kiota

generate-from-existing

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 2a6f3ef:

:warning: Validation status: warnings

File Status Preview URL Details
OpenAPI/kiota/install.md :warning:Warning Details
OpenAPI/kiota/images/community/rest-api-client-generator/add-new.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/custom-tool-experience.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/generate-from-existing.png :white_check_mark:Succeeded

OpenAPI/kiota/install.md

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

christianhelle commented 1 year ago

@microsoft-github-policy-service agree

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit be2f9d7:

:warning: Validation status: warnings

File Status Preview URL Details
OpenAPI/kiota/install.md :warning:Warning Details
OpenAPI/kiota/images/community/rest-api-client-generator/add-new.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/custom-tool-experience.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/generate-from-existing.png :white_check_mark:Succeeded

OpenAPI/kiota/install.md

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 5d1f463:

:bulb: Validation status: suggestions

File Status Preview URL Details
OpenAPI/kiota/install.md :bulb:Suggestion Details
OpenAPI/kiota/images/community/rest-api-client-generator/add-new.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/custom-tool-experience.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/generate-from-existing.png :white_check_mark:Succeeded

OpenAPI/kiota/install.md

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

christianhelle commented 1 year ago

Sorry but I don't know how to resolve

Line 110, Column 44: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/visualstudio/ide/finding-and-using-visual-studio-extensions' will be broken in isolated environments. Replace with a relative link.

Ay hints?

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 6493a54:

:x: Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
[]() :x:Error Details

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 9e908d9:

:x: Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
[]() :x:Error Details

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 70ab427:

:bulb: Validation status: suggestions

File Status Preview URL Details
OpenAPI/kiota/install.md :bulb:Suggestion Details
OpenAPI/kiota/images/community/rest-api-client-generator/add-new.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/custom-tool-experience.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/generate-from-existing.png :white_check_mark:Succeeded

OpenAPI/kiota/install.md

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

jasonjoh commented 1 year ago

Sorry but I don't know how to resolve

Line 110, Column 44: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/visualstudio/ide/finding-and-using-visual-studio-extensions' will be broken in isolated environments. Replace with a relative link.

Ay hints?

@christianhelle remove the https://learn.microsoft.com/en-us bit from the URL to make it relative.

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit a4a021f:

:white_check_mark: Validation status: passed

File Status Preview URL Details
OpenAPI/kiota/images/community/rest-api-client-generator/add-new.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/custom-tool-experience.png :white_check_mark:Succeeded
OpenAPI/kiota/images/community/rest-api-client-generator/generate-from-existing.png :white_check_mark:Succeeded
OpenAPI/kiota/install.md :white_check_mark:Succeeded

For more details, please refer to the build report.

For any questions, please:

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit fea50b9:

:white_check_mark: Validation status: passed

File Status Preview URL Details
OpenAPI/kiota/install.md :white_check_mark:Succeeded

For more details, please refer to the build report.

For any questions, please:

learn-build-service-prod[bot] commented 1 year ago

Learn Build status updates of commit 9aaed64:

:white_check_mark: Validation status: passed

File Status Preview URL Details
OpenAPI/kiota/install.md :white_check_mark:Succeeded

For more details, please refer to the build report.

For any questions, please: