Skip to content

Commit

Permalink
[JSApiClient] Fix chemin mal converti
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed May 7, 2024
1 parent 7a8c64c commit 2a2cd66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion TopModel.Generator.Javascript/GeneratorRegistration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void Register(IServiceCollection services, JavascriptConfig config, int n
TrimSlashes(config, c => c.ApiClientFilePath);
if (!config.ApiClientFilePath.Contains("{fileName}"))
{
config.ApiClientFilePath = config.ApiClientFilePath + "/{fileName}";
config.ApiClientFilePath = Path.Combine(config.ApiClientFilePath, "{fileName}").Replace("\\", "/");
}
}
else if (config.ApiMode == TargetFramework.ANGULAR)
Expand Down
3 changes: 1 addition & 2 deletions TopModel.Generator.Javascript/JavascriptConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ public string GetEndpointsFileName(ModelFile file, string tag)
return Path.Combine(
OutputDirectory,
ResolveVariables(ApiClientRootPath!, tag),
ResolveVariables(ApiClientFilePath!, module: file.Namespace.ModulePathKebab)
.Replace("{fileName}", file.Options.Endpoints.FileName.ToKebabCase())) + ".ts"
ResolveVariables(ApiClientFilePath!, module: file.Namespace.ModulePathKebab).Replace("{fileName}", file.Options.Endpoints.FileName.ToKebabCase()) + ".ts")
.Replace("\\", "/");
}

Expand Down

0 comments on commit 2a2cd66

Please sign in to comment.