Import from internal git
This commit is contained in:
22
Generator/Repo/PreGenerationRepo.cs
Normal file
22
Generator/Repo/PreGenerationRepo.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Core.Process;
|
||||
using Core.SpecConfig;
|
||||
using Generator.Daos;
|
||||
using Generator.DataSource.Yaml;
|
||||
|
||||
namespace Generator.Repo;
|
||||
|
||||
public class PreGenerationRepo
|
||||
{
|
||||
private readonly YamlDirector _specDirector;
|
||||
|
||||
public PreGenerationRepo(OpenApiDao openApiDao)
|
||||
{
|
||||
_specDirector = new YamlDirector(openApiDao);
|
||||
}
|
||||
|
||||
public GenerationProcess GetProcess(string specPath, GenerationType? generationType, PublishType publishType)
|
||||
{
|
||||
var file = _specDirector.BuildYaml(specPath);
|
||||
return new GenerationProcess(file, publishType, generationType);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user