Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the ShortenFileName() function to have only 100 characters #4906

Merged
merged 4 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/Kiota.Builder/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static string TrimQuotes(this string? original) =>
/// </summary>
/// <param name="fileName">The file name to shorten</param>
/// <param name="maxFileNameLength">The maximum length of the file name. Default 251 = 255 - .ext</param>
public static string ShortenFileName(this string name, int length = 251) =>
public static string ShortenFileName(this string name, int length = 100) =>
baywet marked this conversation as resolved.
Show resolved Hide resolved
#pragma warning disable CA1308
(!string.IsNullOrEmpty(name) && name.Length > length) ? HashString(name).ToLowerInvariant() : name;
#pragma warning restore CA1308
Expand Down