зеркало из https://github.com/microsoft/kiota.git
Merge branch 'main' into andrueastman/revertTrimming
This commit is contained in:
Коммит
682a646afe
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -11,7 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Added
|
||||
|
||||
- Adds generation of default 'color.png`and`outline.png` files when generating plugins. [#4993](https://github.com/microsoft/kiota/issues/4993)
|
||||
### Changed
|
||||
|
||||
- Reverts modification of responses in output openApi file when generating plugings [#4945](https://github.com/microsoft/kiota/issues/4945)
|
||||
|
||||
## [1.17.0] - 2024-08-09
|
||||
|
||||
### Added
|
||||
|
||||
- Adds generation of default `color.png` and `outline.png` files when generating plugins. [#4993](https://github.com/microsoft/kiota/issues/4993)
|
||||
|
||||
### Changed
|
||||
|
||||
|
@ -23,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Exclude the `x-openai-isConsequential` extension from cleanup. [#4962](https://github.com/microsoft/kiota/issues/4962)
|
||||
- Fixed file name and namespace sanitization when generating plugins. [#5019](https://github.com/microsoft/kiota/issues/5019)
|
||||
- Added TypeScript typecheck suppression to generated method prototype, where anused arguments can cause build fail in projects which use `noUnusedLocals: true` compiler option. [#5095](https://github.com/microsoft/kiota/issues/5095)
|
||||
- Reverts modification of responses in output openApi file when generating plugings [#4945](https://github.com/microsoft/kiota/issues/4945)
|
||||
- Fixed a bug where defensive programming would consider some default values as invalid in Python.
|
||||
|
||||
## [1.16.0] - 2024-07-05
|
||||
|
||||
|
@ -1406,3 +1414,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Added
|
||||
|
||||
- Initial GitHub release
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<None Include="../../README.md" Pack="true" PackagePath="" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="../../resources/color.png"/>
|
||||
<EmbeddedResource Include="../../resources/outline.png"/>
|
||||
<EmbeddedResource Include="../../resources/color.png" />
|
||||
<EmbeddedResource Include="../../resources/outline.png" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -43,7 +43,7 @@ public class CodeMethodWriter : BaseElementWriter<CodeMethod, PythonConventionSe
|
|||
foreach (var parameter in codeElement.Parameters.Where(static x => !x.Optional).OrderBy(static x => x.Name))
|
||||
{
|
||||
var parameterName = parameter.Name;
|
||||
writer.StartBlock($"if not {parameterName}:");
|
||||
writer.StartBlock($"if {parameterName} is None:");
|
||||
writer.WriteLine($"raise TypeError(\"{parameterName} cannot be null.\")");
|
||||
writer.DecreaseIndent();
|
||||
}
|
||||
|
|
|
@ -2086,7 +2086,7 @@ public sealed class CodeMethodWriterTests : IDisposable
|
|||
});
|
||||
writer.Write(method);
|
||||
var result = tw.ToString();
|
||||
Assert.Contains("if not original_name:", result);
|
||||
Assert.Contains("if original_name is None:", result);
|
||||
Assert.Contains("if original_name == \"select\":", result);
|
||||
Assert.Contains("return \"%24select\"", result);
|
||||
Assert.Contains("if original_name == \"expand\":", result);
|
||||
|
@ -2124,7 +2124,7 @@ public sealed class CodeMethodWriterTests : IDisposable
|
|||
});
|
||||
writer.Write(method);
|
||||
var result = tw.ToString();
|
||||
Assert.Contains("if not original_name:", result);
|
||||
Assert.Contains("if original_name is None:", result);
|
||||
Assert.Contains("if original_name == \"start_date_time\":", result);
|
||||
Assert.Contains("return \"startDateTime\"", result);
|
||||
Assert.Contains("return original_name", result);
|
||||
|
|
Загрузка…
Ссылка в новой задаче