From fafb72672c4e61c3a6fe4e78889d2871ba0469ca Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 30 Apr 2024 11:04:42 -0400 Subject: [PATCH] - fixes #53 adds minimum project requirements for most languages Signed-off-by: Vincent Biret --- OpenAPI/kiota/quickstarts/cli.md | 8 ++++++++ OpenAPI/kiota/quickstarts/dotnet.md | 11 +++++++++++ OpenAPI/kiota/quickstarts/go.md | 6 ++++++ OpenAPI/kiota/quickstarts/java.md | 8 ++++++++ OpenAPI/kiota/quickstarts/php.md | 6 ++++++ OpenAPI/kiota/quickstarts/python.md | 8 +++++++- OpenAPI/kiota/quickstarts/typescript.md | 2 +- 7 files changed, 47 insertions(+), 2 deletions(-) diff --git a/OpenAPI/kiota/quickstarts/cli.md b/OpenAPI/kiota/quickstarts/cli.md index 1ec2031..16555e2 100644 --- a/OpenAPI/kiota/quickstarts/cli.md +++ b/OpenAPI/kiota/quickstarts/cli.md @@ -28,6 +28,14 @@ cd KiotaPostsCLI dotnet new gitignore ``` +## Project configuration + +In case you're adding a kiota client to an existing project, the following configuration is required: + +- ***.csproj** > **TargetFramework** set to "net6" or above. [More information](https://learn.microsoft.com/en-us/dotnet/standard/frameworks) +- ***.csproj** > **LangVersion** set to "latest". [More information](https://learn.microsoft.com/dotnet/csharp/language-reference/configure-language-version#c-language-version-reference) +- ***.csproj** > **Nullable** set to "enable". + ## Add dependencies Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://github.com/microsoft/kiota-abstractions-dotnet) and the [cli-commons package](https://github.com/microsoft/kiota-cli-commons). Additionally, you must either use the Kiota default implementations or provide your own custom implementations of of the following packages. diff --git a/OpenAPI/kiota/quickstarts/dotnet.md b/OpenAPI/kiota/quickstarts/dotnet.md index 18656c4..a60e467 100644 --- a/OpenAPI/kiota/quickstarts/dotnet.md +++ b/OpenAPI/kiota/quickstarts/dotnet.md @@ -24,6 +24,17 @@ dotnet new console -o KiotaPosts dotnet new gitignore ``` +## Project configuration + +In case you're adding a kiota client to an existing project, the following configuration is required: + +- ***.csproj** > **TargetFramework** set to "netstandard2.0" or "netstandard2.1" or "net462" or "net6" or above. [More information](https://learn.microsoft.com/en-us/dotnet/standard/frameworks) +- ***.csproj** > **LangVersion** set to "7.3" or above or "preview" or "latest". [More information](https://learn.microsoft.com/dotnet/csharp/language-reference/configure-language-version#c-language-version-reference) + +The following configuration is recommended: + +- ***.csproj** > **Nullable** set to "enable". + ## Add dependencies Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://github.com/microsoft/kiota-abstractions-dotnet). Additionally, you must either use the Kiota default implementations or provide your own custom implementations of of the following packages. diff --git a/OpenAPI/kiota/quickstarts/go.md b/OpenAPI/kiota/quickstarts/go.md index c719ff4..042cf33 100644 --- a/OpenAPI/kiota/quickstarts/go.md +++ b/OpenAPI/kiota/quickstarts/go.md @@ -23,6 +23,12 @@ Run the following command in the directory you want to create a new project. go mod init kiota_posts ``` +## Project configuration + +In case you're adding a kiota client to an existing project, the following configuration is required: + +- **go.mod** > go set to version 18 or above. + ## Add dependencies Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://github.com/microsoft/kiota-abstractions-go). Additionally, you must either use the Kiota default implementations or provide your own custom implementations of of the following packages. diff --git a/OpenAPI/kiota/quickstarts/java.md b/OpenAPI/kiota/quickstarts/java.md index 4296be7..c2c5bf9 100644 --- a/OpenAPI/kiota/quickstarts/java.md +++ b/OpenAPI/kiota/quickstarts/java.md @@ -24,6 +24,14 @@ Use Gradle to initialize a Java application project. gradle init --dsl groovy --test-framework junit --type java-application --project-name kiotaposts --package kiotaposts ``` +## Project configuration + +In case you're adding a kiota client to an existing project, the following configuration is required: + +- **build.gradle** > **compileJava** > **sourceCompatibility** set to "1.8" or above. (or equivalent if you're not using gradle) +- **build.gradle** > **compileJava** > **targetCompatibility** set to "1.8" or above. (or equivalent if you're not using gradle) +- JDK version 17 or above. + ## Add dependencies Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://github.com/microsoft/kiota-java). Additionally, you must either use the Kiota default implementations or provide your own custom implementations of of the following packages. diff --git a/OpenAPI/kiota/quickstarts/php.md b/OpenAPI/kiota/quickstarts/php.md index dc5d90f..205f0da 100644 --- a/OpenAPI/kiota/quickstarts/php.md +++ b/OpenAPI/kiota/quickstarts/php.md @@ -24,6 +24,12 @@ Run the following commands in the directory where you want to create a new proje composer init ``` +## Project configuration + +In case you're adding a kiota client to an existing project, the following configuration is required: + +- **composer.json** > **require** > **php** set to "php": "^8.0 || ^7.4" or above. + ## Add dependencies Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://github.com/microsoft/kiota-abstractions-php). Additionally, you must either use the Kiota default implementations or provide your own custom implementations of of the following packages. diff --git a/OpenAPI/kiota/quickstarts/python.md b/OpenAPI/kiota/quickstarts/python.md index 33402fa..c24cd9f 100644 --- a/OpenAPI/kiota/quickstarts/python.md +++ b/OpenAPI/kiota/quickstarts/python.md @@ -13,7 +13,7 @@ In this tutorial, you will build a sample app in Python that calls a REST API th ## Required tools -- [Python 3.6+](https://www.python.org/) +- [Python 3.8+](https://www.python.org/) - [pip 20.0+](https://pip.pypa.io/en/stable/) - [asyncio/any other supported async environment e.g AnyIO, Trio.](https://docs.python.org/3/library/asyncio.html) @@ -21,6 +21,12 @@ In this tutorial, you will build a sample app in Python that calls a REST API th Create a directory that will contain the new project. +## Project configuration + +In case you're adding a kiota client to an existing project, the following configuration is required: + +- **pyproject.toml** > **project** > **requires-python** set to ">=3.8". + ## Add dependencies Before you can compile and run the generated API client, you will need to make sure the generated source files are part of a project with the required dependencies. Your project must have a reference to the [abstraction package](https://github.com/microsoft/kiota-abstractions-python). Additionally, you must either use the [Kiota](https://github.com/microsoft/kiota) default implementations or provide your own custom implementations of the following packages: diff --git a/OpenAPI/kiota/quickstarts/typescript.md b/OpenAPI/kiota/quickstarts/typescript.md index 10e449e..e5bfbcd 100644 --- a/OpenAPI/kiota/quickstarts/typescript.md +++ b/OpenAPI/kiota/quickstarts/typescript.md @@ -28,7 +28,7 @@ npx tsc --init ## Project configuration -In case you're adding a kiota client to an existing project, the following configuration is required for the project: +In case you're adding a kiota client to an existing project, the following configuration is required: - **tsconfig** > **compilerOptions** > **esModuleInterop** set to "true". - **tsconfig** > **compilerOptions** > **forceConsistentCasingInFileNames** set to "true".