Skip to content
Snippets Groups Projects

WIP: APIv2 CodeGen

Closed Benedikt Heinrichs requested to merge APIv2 into main
1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
@@ -40,7 +40,7 @@ public class CoscineCodeGenerator : CodeGenerator
var apiPrefix = "coscine/apis/";
var keys = await _configuration.KeysAsync(apiPrefix);
return keys.Select((entry) => entry.Split('/')[2]).Distinct();
return keys.Select((entry) => entry.Split('/')[2]).Distinct().Where(x => x == "Coscine.Api");
}
internal async override Task<string> GetOutputPath()
@@ -50,6 +50,10 @@ public class CoscineCodeGenerator : CodeGenerator
internal override Task<string> GetSwaggerUrl(string domainName, string hostName, string key)
{
if (key == "Coscine.Api")
{
return Task.FromResult($"https://{hostName}.{domainName}/coscine/api/swagger/v2/swagger.json");
}
return Task.FromResult($"https://{hostName}.{domainName}/coscine/api/{key}/swagger/v1/swagger.json");
}
@@ -94,4 +98,4 @@ const getHostName = () => {
";
return Task.FromResult(combinationFileText);
}
}
}
\ No newline at end of file
Loading