diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d740cb11c..81e0dbe606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Implemented partial class model declarations. [4894](https://github.com/microsoft/kiota/issues/4894) +- Fixed a bug where the Go file names were too long - Fixes bug with model names in Go generated from camel case namespace. [https://github.com/microsoftgraph/msgraph-sdk-go/issues/721] - Plugins OpenAPI extensions are only added when generating plugins to reduce the risk of parsing errors. [#4834](https://github.com/microsoft/kiota/issues/4834) - TypeScript imports are now using ES6 imports with the .js extension. diff --git a/src/Kiota.Builder/PathSegmenters/GoPathSegmenter.cs b/src/Kiota.Builder/PathSegmenters/GoPathSegmenter.cs index 90306fab87..c13a48e7d9 100644 --- a/src/Kiota.Builder/PathSegmenters/GoPathSegmenter.cs +++ b/src/Kiota.Builder/PathSegmenters/GoPathSegmenter.cs @@ -85,7 +85,7 @@ public override string NormalizeFileName(CodeElement currentElement) return currentElement switch { CodeNamespace => "go", - _ => GetLastFileNameSegment(currentElement).ToSnakeCase().EscapeSuffix(specialFileNameSuffixes).ShortenFileName(), + _ => GetLastFileNameSegment(currentElement).ToSnakeCase().EscapeSuffix(specialFileNameSuffixes).ShortenFileName(100), }; } public override string NormalizeNamespaceSegment(string segmentName) => segmentName?.ToLowerInvariant() ?? string.Empty;