22 lines
586 B
C#
22 lines
586 B
C#
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);
|
|
}
|
|
} |