Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/gitversion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 0.9.0
next-version: 0.9.1
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatchTag
assembly-informational-format: '{InformationalVersion}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public static ApiRequestV2 MapInsomniaResourceToApiRequestV2(Resource resource)
{
return new ApiRequestV2()
{
Name = resource.Name?.Substring(0,60) ?? string.Empty,
Name = !string.IsNullOrEmpty(resource.Name)
? (resource.Name.Length > 60 ? resource.Name.Substring(0, 60) : resource.Name)
: string.Empty,
ServerURLs = new string[] { resource?.Url?.Split("?")[0] ?? string.Empty },
Description = $"Imported via Explore.CLI from Insomnia Collection. {resource?.Description ?? string.Empty}",
};
Expand Down
4 changes: 3 additions & 1 deletion src/Explore.Cli/MappingHelpers/MappingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public static ApiRequestV2 MapStagedApiToApiRequestV2(StagedAPI stagedApi)
{
return new ApiRequestV2
{
Name = stagedApi.APIName.Substring(0, 60),
Name = !string.IsNullOrEmpty(stagedApi.APIName)
? (stagedApi.APIName.Length > 60 ? stagedApi.APIName.Substring(0, 60) : stagedApi.APIName)
: string.Empty,
ServerURLs = new string[] { stagedApi.APIUrl }
};
}
Expand Down
Loading