Skip to content

Commit

Permalink
Merge pull request #3418 from microsoft/fix/classname-casing
Browse files Browse the repository at this point in the history
Fix casing and ignore errors with hashmap keys.
  • Loading branch information
SilasKenneth authored Oct 4, 2023
2 parents beadfaa + 72f9789 commit 149c984
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove `--json-no-indent` option in favor of `RAW_JSON` output format which does the same job. (CLI)

### Changed

- Fix class name casings when reference in the errorMappings in PHP.
- Fixed imports for enum type properties with default values in Python. [#3367](https://github.com/microsoft/kiota/issues/3367)
- Updated constructor for request builders in Python to set passed path parameters. [#3352](https://github.com/microsoft/kiota/issues/3352)
- Fixed inherited type definition generation where some cases would not generate properly. [#2745](https://github.com/microsoft/kiota/issues/2745)
Expand Down
2 changes: 1 addition & 1 deletion it/php/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ parameters:
- src
ignoreErrors:
- '#Parameter [\w\W]+ \$errorMappings of method [\w\\]+RequestAdapter::send[\w]+\(\) expects [\w\W\s]+ given\.#'
- '#getFieldDeserializers\(\) should return array\<string, callable\(Microsoft\\Kiota\\Abstractions\\Serialization\\ParseNode\)\: void\> but returns array\{[\d]\: Closure\(Microsoft\\Kiota\\Abstractions\\Serialization\\ParseNode\)\: void.+#'
- '#getFieldDeserializers\(\) should return array\<string, callable\(Microsoft\\Kiota\\Abstractions\\Serialization\\ParseNode\)\: void\> but returns array\{[\d]+\: Closure\(Microsoft\\Kiota\\Abstractions\\Serialization\\ParseNode\)\: void.+#'
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ private void WriteRequestExecutorBody(CodeMethod codeElement, CodeClass parentCl
writer.IncreaseIndent(2);
errorMappings.ToList().ForEach(errorMapping =>
{
writer.WriteLine($"'{errorMapping.Key}' => [{errorMapping.Value.Name}::class, '{CreateDiscriminatorMethodName}'],");
writer.WriteLine($"'{errorMapping.Key}' => [{errorMapping.Value.Name.ToFirstCharacterUpperCase()}::class, '{CreateDiscriminatorMethodName}'],");
});
writer.DecreaseIndent();
writer.WriteLine("];");
Expand Down

0 comments on commit 149c984

Please sign in to comment.