Skip to content

Commit

Permalink
Merge branch 'main' into it-initial-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman authored Oct 22, 2024
2 parents 7dacd03 + 37e9542 commit 5954807
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Fixed an issue where multipart request content would be ignored if other unstructured content was present in the description. [#5638](https://github.com/microsoft/kiota/issues/5638)
- Fixed an issue where when generating Go code the deserializer for unions was using `CodeClass` as a filter and not `CodeInterface`. [#4844](https://github.com/microsoft/kiota/issues/4844)
- Fixes mapping of `int16` format to the `integer` type rather than `double` when the type is `integer` or `number` [#5611](https://github.com/microsoft/kiota/issues/5611)
- Fixed a bug where default boolean values with quotes would fail in Java/PHP/CSharp/Go.
Expand Down
6 changes: 3 additions & 3 deletions it/python/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ lazy-object-proxy==1.10.0 ; python_version >= '3.7'

mccabe==0.7.0 ; python_version >= '3.6'

mypy==1.12.0
mypy==1.12.1

mypy-extensions==1.0.0 ; python_version >= '3.5'

Expand Down Expand Up @@ -82,7 +82,7 @@ azure-identity==1.19.0

cffi==1.17.1

cryptography==43.0.1 ; python_version >= '3.7'
cryptography==43.0.3 ; python_version >= '3.7'

frozenlist==1.4.1 ; python_version >= '3.7'

Expand Down Expand Up @@ -136,5 +136,5 @@ sniffio==1.3.1 ; python_version >= '3.7'

uritemplate==4.1.1 ; python_version >= '3.6'

yarl==1.15.4 ; python_version >= '3.7'
yarl==1.15.5 ; python_version >= '3.7'

32 changes: 16 additions & 16 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,11 +20,11 @@
"devDependencies": {
"@es-exec/esbuild-plugin-start": "^0.0.5",
"@stylistic/eslint-plugin-ts": "^2.9.0",
"@types/node": "^22.7.6",
"@types/node": "^22.7.7",
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"esbuild": "^0.24.0",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"minimist": "^1.2.8",
"prettier": "^3.3.3",
Expand Down
4 changes: 2 additions & 2 deletions src/Kiota.Builder/Extensions/OpenApiOperationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal static IEnumerable<OpenApiSchema> GetResponseSchemas(this OpenApiOperat
return operation.RequestBody?.Content
.GetValidSchemas(structuredMimeTypes).FirstOrDefault();
}
private static readonly StructuredMimeTypesCollection multipartMimeTypes = new(new string[] { "multipart/form-data" });
private static readonly StructuredMimeTypesCollection multipartMimeTypes = new(["multipart/form-data"]);
internal static bool IsMultipartFormDataSchema(this IDictionary<string, OpenApiMediaType> source, StructuredMimeTypesCollection structuredMimeTypes)
{
return source.GetValidSchemas(structuredMimeTypes).FirstOrDefault() is OpenApiSchema schema &&
Expand All @@ -53,7 +53,7 @@ internal static bool IsMultipartTopMimeType(this IDictionary<string, OpenApiMedi
ArgumentNullException.ThrowIfNull(structuredMimeTypes);
if (structuredMimeTypes.Count == 0) return false;
if (!source.ContainsKey(multipartMimeTypes.First())) return false;
if (source.Count == 1) return true;
if (source.Count == 1 || !source.Keys.Where(static x => !multipartMimeTypes.Contains(x)).Any(structuredMimeTypes.Contains)) return true;
return structuredMimeTypes.First() == multipartMimeTypes.First();
}
internal static IEnumerable<OpenApiSchema> GetValidSchemas(this IDictionary<string, OpenApiMediaType> source, StructuredMimeTypesCollection structuredMimeTypes)
Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Kiota.Builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<PackageReference Include="Microsoft.OpenApi" Version="1.6.22" />
<PackageReference Include="Microsoft.OpenApi.ApiManifest" Version="0.5.5-preview" />
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.6.22" />
<PackageReference Include="Microsoft.Plugins.Manifest" Version="1.0.0-preview" />
<PackageReference Include="Microsoft.Plugins.Manifest" Version="1.0.0-preview2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
10 changes: 10 additions & 0 deletions tests/Kiota.Builder.Tests/KiotaBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7658,6 +7658,16 @@ public async Task SupportsMultiPartFormAsRequestBodyWithDefaultMimeTypesAsync()
post:
requestBody:
content:
text/csv:
schema:
type: object
properties:
file:
type: string,
format: binary
encoding:
file:
style: form
multipart/form-data:
schema:
type: object
Expand Down
30 changes: 15 additions & 15 deletions vscode/microsoft-kiota/package-lock.json

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

2 changes: 1 addition & 1 deletion vscode/microsoft-kiota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"@vscode/test-electron": "^2.4.1",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"glob": "^11.0.0",
"mocha": "^10.7.3",
"ts-loader": "^9.5.1",
Expand Down

0 comments on commit 5954807

Please sign in to comment.