Skip to content

Commit

Permalink
Merge branch 'main' into specs/kiota-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
maisarissi authored Feb 27, 2024
2 parents 736a3b3 + 437045d commit b1bdf76
Show file tree
Hide file tree
Showing 123 changed files with 2,646 additions and 1,180 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
build_extension:
runs-on: ubuntu-latest
Expand All @@ -20,6 +23,7 @@ jobs:
owner: microsoft
repo: kiota
excludes: prerelease, draft
token: ${{ secrets.GITHUB_TOKEN }}
- run: scripts/update-vscode-releases.ps1 -version "${{ steps.last_release.outputs.release }}" -filePath "./vscode/microsoft-kiota/package.json" -online
shell: pwsh
- name: Install dependencies
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ on:
schedule:
- cron: "20 9 * * 5"

permissions:
contents: read #those permissions are required to run the codeql analysis
actions: read
security-events: write

jobs:
analyze:
name: Analyze
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
- "https://developers.pipedrive.com/docs/api/v1/openapi.yaml"
- "apisguru::twilio.com:api"
- "apisguru::docusign.net"
- "apisguru::github.com:api.github.com"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added the init command as part of the experience revamp of [#3356](https://github.com/microsoft/kiota/issues/3356)
- Added uri-form encoded serialization for Python. [#2075](https://github.com/microsoft/kiota/issues/2075)

### Changed

- Fixed mantis for bitwise enums in Go. [#3936](https://github.com/microsoft/kiota/issues/3936)
- Keyword in enum names for go should not be escaped. [#2877](https://github.com/microsoft/kiota/issues/2877)
- Generator method code reduction in Python. [#3695](https://github.com/microsoft/kiota/issues/3695)
- Fixed a bug with URI template generation for required parameters when they differ between operations. [#4148](https://github.com/microsoft/kiota/issues/4148)
- Fixed return doc comments for Go/Java/CSharp/TypeScript.
- Fixed type names in doc comments and deprecation noticed across languages.
- Added thrown exceptions in doc comments for Go/CSharp/Java/TypeScript. [#3811](https://github.com/microsoft/kiota/issues/3811)
- Fixed missing type/method names in deprecation comments.[#4186](https://github.com/microsoft/kiota/issues/4186)
- Fixed `cref` tags not closed in doc comments in CSharp generation.
- Deduplicates 4XX and 5XX error mappings when they map to the same type to reduce emitted code. [#4025](https://github.com/microsoft/kiota/issues/4025)
- 📢📢📢 Java generation is now stable! 🚀🚀🚀 special thanks to @andreaTP (Red Hat) for all the help.
- Fixed bug where stream responses would generate incorrect partial paging code. [#4207](https://github.com/microsoft/kiota/issues/4207)
- Sanitize Accept and Content-Type headers during generation. [#4211](https://github.com/microsoft/kiota/issues/4211)
- Fixed a bug in enum default value generator for TypeScript. [#4216](https://github.com/microsoft/kiota/issues/4216)

## [1.11.1] - 2024-02-05

### Added

### Changed

- Fixed a deadlock on update for multiple clients targeting the same local file.
- Fixed a deadlock when evicting cached descriptions.

## [1.11.0] - 2024-02-01

### Added

- Added 'none' key for serializer and deserializer arguments to enable portable clients generation. [#3796](https://github.com/microsoft/kiota/issues/3796)
- Added Japanese translations to vscode extension.
- Added support for deprecation annotations in Python. [#2798](https://github.com/microsoft/kiota/issues/2798)
Expand Down Expand Up @@ -1234,3 +1267,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial GitHub release




2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following table provides an overview of the languages supported by Kiota and
| Go || [](https://github.com/microsoft/kiota-abstractions-go) | [FORM](https://github.com/microsoft/kiota-serialization-form-go), [JSON](https://github.com/microsoft/kiota-serialization-json-go), [MULTIPART](https://github.com/microsoft/kiota-serialization-multipart-go), [TEXT](https://github.com/microsoft/kiota-serialization-text-go) | [Anonymous](https://github.com/microsoft/kiota-abstractions-go/blob/main/authentication/anonymous_authentication_provider.go), [API Key](https://github.com/microsoft/kiota-abstractions-go/blob/main/authentication/api_key_authentication_provider.go), [Azure](https://github.com/microsoft/kiota-authentication-azure-go/) | [](https://github.com/microsoft/kiota-http-go/) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/go) |
| Java | ✔ | [✔](https://github.com/microsoft/kiota-java/tree/main/components/abstractions) | [FORM](https://github.com/microsoft/kiota-java/tree/main/components/serialization/form), [JSON](https://github.com/microsoft/kiota-java/tree/main/components/serialization/json), [MULTIPART](https://github.com/microsoft/kiota-java/tree/main/components/serialization/multipart), [TEXT](https://github.com/microsoft/kiota-java/tree/main/components/serialization/text) | [Anonymous](https://github.com/microsoft/kiota-java/blob/main/components/abstractions/src/main/java/com/microsoft/kiota/authentication/AnonymousAuthenticationProvider.java), [API Key](https://github.com/microsoft/kiota-java/blob/main/components/abstractions/src/main/java/com/microsoft/kiota/authentication/ApiKeyAuthenticationProvider.java), [Azure](https://github.com/microsoft/kiota-java/tree/main/components/authentication/azure) | [✔](https://github.com/microsoft/kiota-java/tree/main/components/http/okHttp) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/java) |
| PHP || [](https://github.com/microsoft/kiota-abstractions-php) | [JSON](https://github.com/microsoft/kiota-serialization-json-php), [❌ FORM](https://github.com/microsoft/kiota/issues/2074), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3029), [TEXT](https://github.com/microsoft/kiota-serialization-text-php) | [Anonymous](https://github.com/microsoft/kiota-abstractions-php/blob/main/src/Authentication/AnonymousAuthenticationProvider.php), [✔️ PHP League](https://github.com/microsoft/kiota-authentication-phpleague-php) | [](https://github.com/microsoft/kiota-http-guzzle-php) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/php) |
| Python || [](https://github.com/microsoft/kiota-abstractions-python) | [FORM](https://github.com/microsoft/kiota/issues/2075), [JSON](https://github.com/microsoft/kiota-serialization-json-python), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3030), [TEXT](https://github.com/microsoft/kiota-serialization-text-python) | [Anonymous](https://github.com/microsoft/kiota-abstractions-python/blob/main/kiota_abstractions/authentication/anonymous_authentication_provider.py), [Azure](https://github.com/microsoft/kiota-authentication-azure-python) | [](https://github.com/microsoft/kiota-http-python) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/python) |
| Python || [](https://github.com/microsoft/kiota-abstractions-python) | [FORM](https://github.com/microsoft/kiota-serialization-form-python), [JSON](https://github.com/microsoft/kiota-serialization-json-python), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3030), [TEXT](https://github.com/microsoft/kiota-serialization-text-python) | [Anonymous](https://github.com/microsoft/kiota-abstractions-python/blob/main/kiota_abstractions/authentication/anonymous_authentication_provider.py), [Azure](https://github.com/microsoft/kiota-authentication-azure-python) | [](https://github.com/microsoft/kiota-http-python) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/python) |
| Ruby || [](https://github.com/microsoft/kiota-abstractions-ruby) | [❌ FORM](https://github.com/microsoft/kiota/issues/2077), [JSON](https://github.com/microsoft/kiota-serialization-json-ruby), [❌ MULTIPART](https://github.com/microsoft/kiota/issues/3032), [❌ TEXT](https://github.com/microsoft/kiota/issues/1049) | [Anonymous](https://github.com/microsoft/kiota-abstractions-ruby/blob/main/lib/microsoft_kiota_abstractions/authentication/anonymous_authentication_provider.rb), [✔️ OAuth2](https://github.com/microsoft/kiota-authentication-oauth-ruby) | [](https://github.com/microsoft/kiota-http-ruby)| |
| CLI || (see CSharp) + [](https://github.com/microsoft/kiota-cli-commons) | (see CSharp) | (see CSharp) | (see CSharp) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/cli) |
| Swift | [](https://github.com/microsoft/kiota/issues/1449) | [](./abstractions/swift) | [❌ FORM](https://github.com/microsoft/kiota/issues/2076), [❌ JSON](https://github.com/microsoft/kiota/issues/1451), [❌ FORM](https://github.com/microsoft/kiota/issues/3033), [❌ TEXT](https://github.com/microsoft/kiota/issues/1452) | [Anonymous](./abstractions/swift/Source/MicrosoftKiotaAbstractions/Authentication/AnonymousAuthenticationProvider.swift), [❌ Azure](https://github.com/microsoft/kiota/issues/1453) | [](https://github.com/microsoft/kiota/issues/1454)| |
Expand Down
5 changes: 4 additions & 1 deletion it/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"./tests/Kiota.Builder.IntegrationTests/GeneratesUritemplateHints.yaml": {
"MockServerITFolder": "query-params"
},
"apisguru::github.com:api.github.com": {
"MockServerITFolder": "gh"
},
"apisguru::notion.com": {
"ExcludePatterns": [
{
Expand Down Expand Up @@ -325,4 +328,4 @@
}
]
}
}
}
14 changes: 7 additions & 7 deletions it/csharp/dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.7.6" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.1.2" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.3.4" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.1.1" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.1.3" />
<PackageReference Include="Microsoft.kiota.Serialization.Multipart" Version="1.1.1" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.1.1" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.7.11" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.1.3" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.3.6" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.1.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.1.5" />
<PackageReference Include="Microsoft.kiota.Serialization.Multipart" Version="1.1.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.1.4" />

<Compile Remove="basic\**" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions it/exec-cmd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Kill-MockServer {
Pop-Location
}

$mockSeverITFolder = $null
$mockSeverITFolder = "inexistent-it-folder"
$configPath = Join-Path -Path $PSScriptRoot -ChildPath "config.json"
$jsonValue = Get-Content -Path $configPath -Raw | ConvertFrom-Json
$descriptionValue = $jsonValue.psobject.properties.Where({ $_.name -eq $descriptionUrl }).value
Expand All @@ -63,10 +63,10 @@ if ($null -ne $descriptionValue) {
}
}

$mockServerTest = false
$mockServerTest = $false
$itTestPath = Join-Path -Path $testPath -ChildPath $mockSeverITFolder
if (Test-Path -Path $itTestPath) {
$mockServerTest = true
$mockServerTest = $true
}

# Start MockServer if needed
Expand Down
74 changes: 74 additions & 0 deletions it/java/gh/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0"?>
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>io.kiota</groupId>
<artifactId>kiota-gh-api</artifactId>
<version>0.1.0-SNAPSHOT</version>

<properties>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<kiota-java.version>0.12.1</kiota-java.version>
</properties>

<dependencies>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-abstractions</artifactId>
<version>${kiota-java.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-json</artifactId>
<version>${kiota-java.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-text</artifactId>
<version>${kiota-java.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-form</artifactId>
<version>${kiota-java.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-multipart</artifactId>
<version>${kiota-java.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-http-okHttp</artifactId>
<version>${kiota-java.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M9</version>
</plugin>
</plugins>
</build>
</project>
23 changes: 23 additions & 0 deletions it/java/gh/src/test/java/GHAPITest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import apisdk.ApiClient;
import com.microsoft.kiota.ApiException;
import com.microsoft.kiota.authentication.AnonymousAuthenticationProvider;
import com.microsoft.kiota.http.OkHttpRequestAdapter;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.util.concurrent.TimeUnit;

public class BasicAPITest {

@Test
void basicTest() throws Exception {
var adapter = new OkHttpRequestAdapter(new AnonymousAuthenticationProvider());
adapter.setBaseUrl("http://127.0.0.1:1080");
var client = new ApiClient(adapter);

client.repos().byOrgId("my-owner").byRepoId("my-repo").get();
client.repos().byOrgId("my-owner").byRepoId("my-repo").generate().post(null);
}

}
2 changes: 1 addition & 1 deletion it/java/query-params/src/test/java/BasicAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void includesAllTheQueryParameters() throws Exception {
});
reqInf.pathParameters.put("baseurl", "http://test");

assertEquals("http://test/api/something/v1?startDateTime=START&EndDateTime=END", reqInf.getUri().toString());
assertEquals("http://test/api/something/v1?EndDateTime=END&startDateTime=START", reqInf.getUri().toString());
}

}
11 changes: 6 additions & 5 deletions it/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ name = "integration-test"
authors = [{name = "Microsoft", email = "[email protected]"}]
dependencies = [
"uritemplate >=4.1.1",
"microsoft-kiota-abstractions >= 0.6.0",
"microsoft-kiota-http >= 0.4.4",
"microsoft-kiota-authentication-azure >= 0.2.0",
"microsoft-kiota-serialization-json >= 0.3.7",
"microsoft-kiota-serialization-text >= 0.2.1"
"microsoft-kiota-abstractions >= 1.0.0",
"microsoft-kiota-http >= 1.0.0",
"microsoft-kiota-authentication-azure >= 1.0.0",
"microsoft-kiota-serialization-json >= 1.0.0",
"microsoft-kiota-serialization-text >= 1.0.0",
"microsoft-kiota-serialization-form >= 0.1.0",
]
license = {file = "LICENSE"}
readme = "README.md"
Expand Down
38 changes: 20 additions & 18 deletions it/python/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-i https://pypi.org/simple

astroid==3.0.2 ; python_full_version >= '3.7.2'
astroid==3.1.0 ; python_full_version >= '3.7.2'

certifi==2023.11.17 ; python_version >= '3.6'
certifi==2024.2.2 ; python_version >= '3.6'

charset-normalizer==3.3.2 ; python_full_version >= '3.7.0'

Expand Down Expand Up @@ -40,11 +40,11 @@ platformdirs==4.2.0 ; python_version >= '3.7'

pluggy==1.4.0 ; python_version >= '3.7'

pylint==3.0.3
pylint==3.1.0

pytest==7.4.4
pytest==8.0.2

pytest-asyncio==0.23.4
pytest-asyncio==0.23.5

requests==2.31.0 ; python_version >= '3.7'

Expand All @@ -54,11 +54,11 @@ tomli==2.0.1 ; python_version < '3.11'

tomli-w==1.0.0 ; python_version >= '3.7'

tomlkit==0.12.3 ; python_version >= '3.7'
tomlkit==0.12.4 ; python_version >= '3.7'

typing-extensions==4.9.0 ; python_version >= '3.7'
typing-extensions==4.10.0 ; python_version >= '3.7'

urllib3==2.2.0 ; python_version >= '3.7'
urllib3==2.2.1 ; python_version >= '3.7'

wrapt==1.15.0 ; python_version < '3.11'

Expand All @@ -70,19 +70,19 @@ aiohttp==3.9.3 ; python_version >= '3.6'

aiosignal==1.3.1 ; python_version >= '3.7'

anyio==4.2.0 ; python_version >= '3.7'
anyio==4.3.0 ; python_version >= '3.7'

async-timeout==4.0.3 ; python_version >= '3.6'

attrs==23.2.0 ; python_version >= '3.7'

azure-core==1.29.7 ; python_version >= '3.7'
azure-core==1.30.0 ; python_version >= '3.7'

azure-identity==1.15.0

cffi==1.16.0

cryptography==42.0.2 ; python_version >= '3.7'
cryptography==42.0.5 ; python_version >= '3.7'

frozenlist==1.4.1 ; python_version >= '3.7'

Expand All @@ -92,27 +92,29 @@ h2==4.1.0

hpack==4.0.0 ; python_full_version >= '3.6.1'

httpcore==1.0.2 ; python_version >= '3.7'
httpcore==1.0.4 ; python_version >= '3.7'

httpx[http2]==0.26.0
httpx[http2]==0.27.0

hyperframe==6.0.1 ; python_full_version >= '3.6.1'

microsoft-kiota-abstractions==1.1.0
microsoft-kiota-abstractions==1.2.0

microsoft-kiota-authentication-azure==1.0.0

microsoft-kiota-http==1.2.1
microsoft-kiota-http==1.3.0

microsoft-kiota-serialization-json==1.0.1

microsoft-kiota-serialization-text==1.0.0

msal==1.26.0
microsoft-kiota-serialization-form==0.1.0

msal==1.27.0

msal-extensions==1.1.0

multidict==6.0.4 ; python_version >= '3.7'
multidict==6.0.5 ; python_version >= '3.7'

portalocker==2.8.2 ; python_version >= '3.5' and platform_system == 'Windows'

Expand All @@ -128,7 +130,7 @@ rfc3986[idna2008]==2.0.0

six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'

sniffio==1.3.0 ; python_version >= '3.7'
sniffio==1.3.1 ; python_version >= '3.7'

uritemplate==4.1.1 ; python_version >= '3.6'

Expand Down
2 changes: 1 addition & 1 deletion it/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gem "rubocop", "~> 1.21"

gem "microsoft_kiota_abstractions", "~> 0.14.3"

gem "microsoft_kiota_faraday", "~> 0.12.0"
gem "microsoft_kiota_faraday", "~> 0.15.0"

gem "microsoft_kiota_serialization_json", "~> 0.9.1"

Expand Down
Loading

0 comments on commit b1bdf76

Please sign in to comment.