Skip to content

Commit

Permalink
Merge branch 'main' into feat/runtime-command-pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
calebkiage committed Mar 6, 2024
2 parents 32f0645 + 35ce3f8 commit 0294b67
Show file tree
Hide file tree
Showing 201 changed files with 7,784 additions and 2,446 deletions.
1,347 changes: 695 additions & 652 deletions .azure-pipelines/ci-build.yml

Large diffs are not rendered by default.

20 changes: 4 additions & 16 deletions .github/workflows/build-vscode-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,10 @@ on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- "abstractions/**"
- "authentication/**"
- "serialization/**"
- "http/**"
- "**.md"
- ".vscode/**"
- "**.svg"
pull_request:
paths-ignore:
- "abstractions/**"
- "authentication/**"
- "serialization/**"
- "http/**"
- "**.md"
- ".vscode/**"
- "**.svg"

permissions:
contents: read

jobs:
build_extension:
Expand All @@ -36,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
21 changes: 1 addition & 20 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,7 @@ on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
[
"abstractions/**",
"authentication/**",
"serialization/**",
"http/**",
"**.md",
".vscode/**",
"**.svg",
]
pull_request:
paths-ignore:
[
"abstractions/**",
"authentication/**",
"serialization/**",
"http/**",
"**.md",
".vscode/**",
"**.svg",
]

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
Expand Down Expand Up @@ -77,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
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,20 @@
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Launch Migrate",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/kiota/bin/Debug/net8.0/kiota.dll",
"args": ["config", "migrate"],
"cwd": "${workspaceFolder}/samples/msgraph-mail/dotnet",
"console": "internalConsole",
"stopAtEntry": false,
"env": {
"KIOTA_CONFIG_PREVIEW": "true"
}
},
{
"name": "Launch Login (github - device)",
"type": "coreclr",
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,55 @@ 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)
- Added support for multipart form data request body in Python. [#3030](https://github.com/microsoft/kiota/issues/3030)

### Changed

- BREAKING - Removed the async suffix from request adapter methods in TypeScript. [microsoft/kiota-typescript#992](https://github.com/microsoft/kiota-typescript/issues/992)
- 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)
- Generate enum array for query parameters. [#4225](https://github.com/microsoft/kiota/issues/4225)

## [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)

### Changed

- Fixed serialization of scalar members in union types for Python. [#2828](https://github.com/microsoft/kiota/issues/2828)
- Fixed a bug where scalar error mappings would be generated even though it's not supported by the http request adapter. [#4018](https://github.com/microsoft/kiota/issues/4018)
- Switched to proxy generation for TypeScript, leading to about ~44% bundle sizes reduction. [#3642](https://github.com/microsoft/kiota/issues/3642)
- Required query parameters are now projected as `{baseurl+}foo/bar?required={required}` instead of `{baseurl+}foo/bar{?required}` so they are automatically populated if no value is provided. [#3989](https://github.com/microsoft/kiota/issues/3989)
- Fixed a bug where TypeScript models factory methods would be missing return types.
- Fixed a bug where generated paths would possibly get too long. [#3854](https://github.com/microsoft/kiota/issues/3854)
- The vscode extension now also displays the children nodes when filtering. [#3998](https://github.com/microsoft/kiota/issues/3998)

## [1.10.1] - 2024-01-12

Expand Down Expand Up @@ -1227,3 +1270,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial GitHub release




4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ 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) |
| 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)| [link](https://learn.microsoft.com/openapi/kiota/quickstarts/ruby) |
| 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-serialization-multipart-python), [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)| |
| TypeScript/JavaScript | ✔ | [✔](https://github.com/microsoft/kiota-typescript/tree/main/packages/abstractions) | [FORM](https://github.com/microsoft/kiota-typescript/tree/main/packages/serialization/form), [JSON](https://github.com/microsoft/kiota-typescript/tree/main/packages/serialization/json), [MULTIPART](https://github.com/microsoft/kiota-typescript/tree/main/packages/serialization/multipart), [TEXT](https://github.com/microsoft/kiota-typescript/tree/main/packages/serialization/text) | [Anonymous](https://github.com/microsoft/kiota-typescript/blob/main/packages/abstractions/src/authentication/anonymousAuthenticationProvider.ts), [API Key](https://github.com/microsoft/kiota-typescript/blob/main/packages/abstractions/src/authentication/apiKeyAuthenticationProvider.ts), [Azure](https://github.com/microsoft/kiota-typescript/tree/main/packages/authentication/azure), [SPFx](https://github.com/microsoft/kiota-typescript/tree/main/packages/authentication/spfx) | [✔](https://github.com/microsoft/kiota-typescript/tree/main/packages/http/fetch) | [link](https://learn.microsoft.com/openapi/kiota/quickstarts/typescript) |
Expand Down
28 changes: 28 additions & 0 deletions guardian/SDL/common/.gdnbaselines
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"hydrated": true,
"properties": {
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines",
"hydrationStatus": "This file contains identifying data. It is **NOT** safe to check into your repo. To dehydrate this file, run `guardian dehydrate --help` and follow the guidance."
},
"version": "1.0.0",
"baselines": {
"default": {
"name": "default",
"createdDate": "2024-02-06 16:30:49Z",
"lastUpdatedDate": "2024-02-06 16:30:49Z"
}
},
"results": {
"b3736a918ff8d688843a2c76bfce1661c484e260144140c9df23f1147da102c0": {
"signature": "b3736a918ff8d688843a2c76bfce1661c484e260144140c9df23f1147da102c0",
"alternativeSignatures": [],
"target": "spotbugs.xml",
"memberOf": [
"default"
],
"tool": "spotbugs",
"ruleId": "gdn.unknownFormatResult",
"createdDate": "2024-02-06 16:30:49Z"
}
}
}
28 changes: 28 additions & 0 deletions guardian/SDL/common/.gdnsuppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"hydrated": true,
"properties": {
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/suppressions",
"hydrationStatus": "This file contains identifying data. It is **NOT** safe to check into your repo. To dehydrate this file, run `guardian dehydrate --help` and follow the guidance."
},
"version": "1.0.0",
"suppressionSets": {
"default": {
"name": "default",
"createdDate": "2024-02-06 16:30:49Z",
"lastUpdatedDate": "2024-02-06 16:30:49Z"
}
},
"results": {
"b3736a918ff8d688843a2c76bfce1661c484e260144140c9df23f1147da102c0": {
"signature": "b3736a918ff8d688843a2c76bfce1661c484e260144140c9df23f1147da102c0",
"alternativeSignatures": [],
"target": "spotbugs.xml",
"memberOf": [
"default"
],
"tool": "spotbugs",
"ruleId": "gdn.unknownFormatResult",
"createdDate": "2024-02-06 16:30:49Z"
}
}
}
17 changes: 16 additions & 1 deletion it/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,22 @@
]
},
"./tests/Kiota.Builder.IntegrationTests/GeneratesUritemplateHints.yaml": {
"MockServerITFolder": "query-params"
"MockServerITFolder": "query-params",
"Suppressions": [
{
"Language": "ruby",
"Rationale": "https://github.com/microsoft/kiota/issues/4262"
}
]
},
"apisguru::github.com:api.github.com": {
"MockServerITFolder": "gh",
"Suppressions": [
{
"Language": "all",
"Rationale": "https://github.com/microsoft/kiota/issues/4241"
}
]
},
"apisguru::notion.com": {
"ExcludePatterns": [
Expand Down
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.5" />
<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.2" />
<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.4" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.3.7" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.1.5" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.1.8" />
<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
Loading

0 comments on commit 0294b67

Please sign in to comment.