Skip to content

Commit

Permalink
- fixes #53 adds minimum project requirements for most languages
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Apr 30, 2024
1 parent 71cb82d commit fafb726
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 2 deletions.
8 changes: 8 additions & 0 deletions OpenAPI/kiota/quickstarts/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions OpenAPI/kiota/quickstarts/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 31 in OpenAPI/kiota/quickstarts/dotnet.md

View workflow job for this annotation

GitHub Actions / Lint and spell-check

Unknown word (netstandard)

Check warning on line 31 in OpenAPI/kiota/quickstarts/dotnet.md

View workflow job for this annotation

GitHub Actions / Lint and spell-check

Unknown word (netstandard)
- ***.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.
Expand Down
6 changes: 6 additions & 0 deletions OpenAPI/kiota/quickstarts/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions OpenAPI/kiota/quickstarts/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions OpenAPI/kiota/quickstarts/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 7 additions & 1 deletion OpenAPI/kiota/quickstarts/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ 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)

## Create a project

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".

Check warning on line 28 in OpenAPI/kiota/quickstarts/python.md

View workflow job for this annotation

GitHub Actions / Lint and spell-check

Unknown word (pyproject)

## 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:
Expand Down
2 changes: 1 addition & 1 deletion OpenAPI/kiota/quickstarts/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down

0 comments on commit fafb726

Please sign in to comment.