зеркало из https://github.com/microsoft/kiota.git
fe862401b1 | ||
---|---|---|
.. | ||
.run | ||
gradle | ||
src | ||
.gitignore | ||
CHANGELOG.md | ||
Readme.md | ||
build.gradle.kts | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
qodana.yml | ||
settings.gradle.kts |
Readme.md
Kiota IntelliJ PlugIn
Kiota IntelliJ plugin is used to generate an API client to call any OpenAPI described API you are interested in from an OpenAPI specification. One of the goals of the project is to provide the best code generator support possible for OpenAPI and JSON Schema features from IntelliJ platform.
This plugin is built uponintellij-platform-plugin-template
. This readme documents how to get started with the Kiota Intellij plugin
Getting Started
Installation
Gradle : Visit the Gradle Webside and install Gradle version 7.4
DotNet: Visit the official .NET website and install .NET SDK
Kiota : Install kiota as a dotnet tool
IntelliJ IDEA Community Edition : Install IntelliJ IDEA Community Edition
Clone the Repo
- Clone the Kiota repository
- Checkout the intellijplugin branch:
git checkout intellijplugin
or
Open the plugin from IntelliJ IDEA
- From IntelliJ IDEA click on Open
- Navigate to the kiota root directory
- Navigate to intellij directory
Configure Project Dependencies:
- In your Intellijplugin project go to File > Project Structure
- On the left panel, click on
Modules
- Under
Dependencies
, click on Add SDK from the Module SDK dropdown - click on Download SDK
- Select
Corretto-17 (Amazon Corretto version 17.0.8)
Run plugin:
- Navigate to
intellij/intellij/src/main/resources/META-INF/plugin.xml
in your project's to access theplugin.xml
file - select run plugin from the top dropdown menu
- This starts a new instance of Intelli IDEA with the intellijTestPlugin Template plugin installed
Open Plugin :
- When IntelliJ IDEA opens, select New Project.
- Provide a Name for the project.
- Select Groovy for the Language input.
- Select Gradle for the Build system input.
- Leave the other default selections and click on Create.
Use the Kiota IntelliJ Plugin
Wait for the environment to get indexed before you can use the plugin.
- Select the KiotaToolFactory tab on the left side of the environment. This is the Kiota IntelliJ Plugin.
- Set a path to an OpenAPI description file.
- Set an output path. We suggest that you set a path to the root of the blank project you created in the previous step.
- Leave Java as the default language.
- Set a client class name. If you don't provide a value, ApiClient will be used.
- Set a namespace for the generated client classes.
- Select the Generate button. You can find your generated files at the specified output location.