Skip to content

Commit

Permalink
Merge branch 'fix/null-reference-method-parameters' of https://github…
Browse files Browse the repository at this point in the history
….com/microsoft/kiota into fix/null-reference-method-parameters
  • Loading branch information
calebkiage committed Jan 31, 2023
2 parents 3ff857d + 8e135fe commit 8e21ff5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
19 changes: 9 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Fixed a bug where most of the Java fields have been prefixed with an underscore.
- Using fully qualified identifier for java.util.function.Consumer to avoid conflicts in Java.
- Removed response handler parameter from PHP request executor methods. [1856](https://github.com/microsoft/kiota/issues/1856)
- Fixed minor typo in adding Accept header for PHP.
Expand Down Expand Up @@ -220,7 +221,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Added support for range (2XX) responses. [#1699](https://github.com/microsoft/kiota/issues/1699)
- Added none output formatter to CLI commons. (Shell)
- Added 'Accept' field of http request header in Ruby. [#1660](https://github.com/microsoft/kiota/issues/1660)
- Added 'Accept' field of http request header in Ruby. [#1660](https://github.com/microsoft/kiota/issues/1660)
- Added support for text serialization in Python. [#1406](https://github.com/microsoft/kiota/issues/1406)
- Added support for composed types (union, intersection) in CSharp, Java and Go. [#1411](https://github.com/microsoft/kiota/issues/1411)
- Added support for implicit discriminator mapping.
Expand All @@ -229,9 +230,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Fixed a bug where Go clients would panic in case of nil response value.
- Fixed a bug to properly add request headers to Nethttp requests in Ruby.
- Fixed a bug to properly add request headers to Nethttp requests in Ruby.
- Fixed a bug to properly reject invalid URLs in Ruby.
- Fixed an issue with require statements being generated instead of require relative in Ruby.
- Fixed an issue with require statements being generated instead of require relative in Ruby.
- Updated AdditionDataHolder with the correct namespace. (Ruby)
- Removed/fixed passing in the current instance to fields deserializers in Ruby. [#1663](https://github.com/microsoft/kiota/issues/1663)
- Fix issue with duplicate variable declaration in command handlers (Shell)
Expand Down Expand Up @@ -283,7 +284,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Defined the Access Token Provider Interface for Ruby authentication. [#1638](https://github.com/microsoft/kiota/issues/1638)
- Reduce code verbosity on Go Getters and Setters. [G0#26][https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/26]


## [0.3.0] - 2022-07-08

### Added
Expand Down Expand Up @@ -539,12 +539,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fixed a bug in Go generator where temporary url template parameters would not be used preventing the use of raw urls.
- Fixed a bug where the Go http client configuration would impact non-kiota requests.
- Fixed bug where installing python abstractions failed due to missing dependencies #1289
- Modified python test matrix to include python 3.10 #1289
- Added return statement to AnonymousAuthenticationProvider in python abstractions #1289
- Fixed bug in enabling backing store for parse node factory by passing ParseNodeFactoryRegistry to method call #1289
- Fixed bug where installing python abstractions failed due to missing dependencies #1289
- Modified python test matrix to include python 3.10 #1289
- Added return statement to AnonymousAuthenticationProvider in python abstractions #1289
- Fixed bug in enabling backing store for parse node factory by passing ParseNodeFactoryRegistry to method call #1289
- Fixed errors in python serialization due to to responses as json instead of json strings #1290
- Added python version 3.10 to testing matrix #1290
- Added python version 3.10 to testing matrix #1290
- Fixed bug with inconsistent Java namespace and directory name casing #1267
- Fixed typeOf string check in JsonParseNode Typescript.
- Fixed shell stream output getting processed by output formatters when no file path is provided #1291
Expand All @@ -565,7 +565,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Adds PHP League Authentication Provider for PHP #1201
- Added Shell language support #738


### Changed

- Fixed a bug where request body would get dropped by the compression handler in Go
Expand Down
3 changes: 2 additions & 1 deletion src/Kiota.Builder/Refiners/JavaRefiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public override Task Refine(CodeNamespace generatedCode, CancellationToken cance
_configuration.UsesBackingStore,
true,
"get",
"set"
"set",
string.Empty
);
ReplaceReservedNames(generatedCode, new JavaReservedNamesProvider(), x => $"{x}_escaped");
AddPropertiesAndMethodTypesImports(generatedCode, true, false, true);
Expand Down
21 changes: 21 additions & 0 deletions tests/Kiota.Builder.Tests/Refiners/JavaLanguageRefinerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,27 @@ public async Task CorrectsCoreType()
Assert.Contains(additionalDataHolderDefaultName[1..], model.StartBlock.Implements.Select(static x => x.Name).ToList());
}
[Fact]
public async Task ProduceCorrectNames()
{
var model = root.AddClass(new CodeClass
{
Name = "model",
Kind = CodeClassKind.Model
}).First();
var custom = new CodeProperty
{
Name = "custom",
Kind = CodePropertyKind.Custom,
Type = new CodeType
{
Name = "string",
}
};
model.AddProperty(custom);
await ILanguageRefiner.Refine(new GenerationConfiguration { Language = GenerationLanguage.Java }, root);
Assert.True(string.IsNullOrEmpty(model.Properties.First(static x => "custom".Equals(x.Name))!.NamePrefix));
}
[Fact]
public async Task AddsMethodsOverloads()
{
var builder = root.AddClass(new CodeClass
Expand Down

0 comments on commit 8e21ff5

Please sign in to comment.