Skip to content

Commit

Permalink
Merge branch 'main' into java-name-mangling-in-refiner
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP authored Sep 19, 2023
2 parents 202dd7d + bad8722 commit 93879ad
Show file tree
Hide file tree
Showing 120 changed files with 1,583 additions and 3,248 deletions.
8 changes: 4 additions & 4 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ stages:
- pwsh: $(Build.SourcesDirectory)/scripts/get-version-from-csproj.ps1
displayName: "Get Kiota's version-number from .csproj"

- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version $(artifactVersion) -check
- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version $(artifactVersion)
condition: eq(variables['isPrerelease'], 'false')
displayName: "Get release notes from CHANGELOG.md"

- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version Unreleased -check
- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version Unreleased
condition: eq(variables['isPrerelease'], 'true')

# Build the Product project
Expand Down Expand Up @@ -600,10 +600,10 @@ stages:
displayName: "Set version suffix"
- pwsh: $(Build.SourcesDirectory)/scripts/get-version-from-csproj.ps1
displayName: "Get Kiota's version-number from .csproj"
- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version $(artifactVersion)
- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version $(artifactVersion) -createNotes
condition: eq(variables['isPrerelease'], 'false')
displayName: "Get release notes from CHANGELOG.md"
- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version Unreleased
- pwsh: $(Build.SourcesDirectory)/scripts/get-release-notes.ps1 -version Unreleased -createNotes
condition: eq(variables['isPrerelease'], 'true')
displayName: "Get release notes from CHANGELOG.md"
- task: GitHubRelease@1
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ jobs:
shell: pwsh
name: "Get Kiota's version-number from .csproj"

- run: ./scripts/get-release-notes.ps1 -version "${{ steps.getversion.outputs.version }}"
if: ${{!contains(github.ref, env.PREVIEW_BRANCH)}}
name: "Get release notes from CHANGELOG.md"
shell: pwsh

- run: ./scripts/get-release-notes.ps1 -version Unreleased
if: contains(github.ref, env.PREVIEW_BRANCH)
name: "Get release notes from CHANGELOG.md"
shell: pwsh

- run: ./scripts/update-versions.ps1
shell: pwsh
name: "Update dependencies versions"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added auto-generated comment for TypeScript generation. [#3244](https://github.com/microsoft/kiota/issues/3244)

### Changed

- Localhost based descriptions are not cached anymore to facilitate development workflows. [#3316](https://github.com/microsoft/kiota/issues/3316)
- Changed parameter order in with_url method body to match the signature of RequestBuilder constructor in Python. [#3328](https://github.com/microsoft/kiota/issues/3328
- Removed redundant undefined qualifier in TypeScript for properties. [#3244](https://github.com/microsoft/kiota/issues/3244)

## [1.6.1] - 2023-09-11

### Changed
Expand Down
4 changes: 2 additions & 2 deletions it/python/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ wrapt==1.15.0 ; python_version < '3.11'

yapf==0.40.1

zipp==3.16.2 ; python_version >= '3.7'
zipp==3.17.0 ; python_version >= '3.7'

aiohttp==3.8.5 ; python_version >= '3.6'

Expand Down Expand Up @@ -102,7 +102,7 @@ microsoft-kiota-abstractions==0.8.5

microsoft-kiota-authentication-azure==0.3.0

microsoft-kiota-http==0.6.0
microsoft-kiota-http==0.6.1

microsoft-kiota-serialization-json==0.4.0

Expand Down
100 changes: 50 additions & 50 deletions it/typescript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions it/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"devDependencies": {
"@es-exec/esbuild-plugin-start": "^0.0.5",
"@types/node": "^20.6.2",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"esbuild": "^0.19.3",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
4 changes: 2 additions & 2 deletions scripts/get-release-notes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ param (
$version,
[switch]
[bool]
$check
$createNotes
)

$version = $version.TrimStart("v")
Expand All @@ -23,7 +23,7 @@ $releaseNotes = $changeLogContent.Substring($headerLineNumber, $endLineNumber -
if ($version -eq "Unreleased" -and [string]::IsNullOrWhiteSpace($releaseNotes.Replace("### Changed", "").Replace("### Added", ""))) {
throw "Version $version not found in CHANGELOG.md make sure you've updated the changelog"
}
if ($check -eq $false) {
if ($createNotes -eq $true) {
$targetFile = Join-Path (Split-Path $changelogPath -Parent) "release-notes.txt"
Set-Content -Path $targetFile -Value $releaseNotes -Verbose
}
13 changes: 9 additions & 4 deletions src/Kiota.Builder/Caching/DocumentCachingProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,17 @@ private async Task<Stream> DownloadDocumentFromSourceAsync(Uri documentUri, stri
responseMessage.EnsureSuccessStatusCode();
content = new MemoryStream();
await responseMessage.Content.CopyToAsync(content, token).ConfigureAwait(false);
if (documentUri.IsLoopback)
Logger.LogInformation("skipping cache write for URI {Uri} as it is a loopback address", documentUri);
else
{
#pragma warning disable CA2007
await using var fileStream = File.Create(target);
await using var fileStream = File.Create(target);
#pragma warning restore CA2007
content.Position = 0;
await content.CopyToAsync(fileStream, token).ConfigureAwait(false);
await fileStream.FlushAsync(token).ConfigureAwait(false);
content.Position = 0;
await content.CopyToAsync(fileStream, token).ConfigureAwait(false);
await fileStream.FlushAsync(token).ConfigureAwait(false);
}
content.Position = 0;
return content;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,46 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
// <auto-generated/>
using Kiota.Builder.SearchProviders.GitHub.GitHubClient.Repos;
using Kiota.Builder.SearchProviders.GitHub.GitHubClient.Search;
using Kiota.Builder.SearchProviders.GitHub.GitHubClient.User;
using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Serialization.Form;
using Microsoft.Kiota.Serialization.Json;
using Microsoft.Kiota.Serialization.Text;
namespace Kiota.Builder.SearchProviders.GitHub.GitHubClient
{
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System;
namespace Kiota.Builder.SearchProviders.GitHub.GitHubClient {
/// <summary>
/// The main entry point of the SDK, exposes the configuration and the fluent API.
/// </summary>
public class GitHubClient : BaseRequestBuilder
{
public class GitHubClient : BaseRequestBuilder {
/// <summary>The repos property</summary>
public ReposRequestBuilder Repos
{
get =>
public ReposRequestBuilder Repos { get =>
new ReposRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The search property</summary>
public SearchRequestBuilder Search
{
get =>
public SearchRequestBuilder Search { get =>
new SearchRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>The user property</summary>
public UserRequestBuilder User
{
get =>
public UserRequestBuilder User { get =>
new UserRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new GitHubClient and sets the default values.
/// </summary>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public GitHubClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>())
{
public GitHubClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>()) {
ApiClientBuilder.RegisterDefaultSerializer<JsonSerializationWriterFactory>();
ApiClientBuilder.RegisterDefaultSerializer<TextSerializationWriterFactory>();
ApiClientBuilder.RegisterDefaultSerializer<FormSerializationWriterFactory>();
ApiClientBuilder.RegisterDefaultDeserializer<JsonParseNodeFactory>();
ApiClientBuilder.RegisterDefaultDeserializer<TextParseNodeFactory>();
ApiClientBuilder.RegisterDefaultDeserializer<FormParseNodeFactory>();
if (string.IsNullOrEmpty(RequestAdapter.BaseUrl))
{
if (string.IsNullOrEmpty(RequestAdapter.BaseUrl)) {
RequestAdapter.BaseUrl = "https://api.github.com";
}
PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl);
Expand Down
Loading

0 comments on commit 93879ad

Please sign in to comment.