Search in sources :

Example 1 with DiscoConfigTransformer

use of com.google.api.codegen.configgen.transformer.DiscoConfigTransformer in project toolkit by googleapis.

the class DiscoConfigGeneratorApi method generateConfig.

private Map<String, Doc> generateConfig(String outputPath) {
    Document document = setupDocument();
    ViewModel viewModel = new DiscoConfigTransformer().generateConfig(new DiscoApiModel(document, ""), outputPath);
    Doc generatedConfig = new CommonSnippetSetRunner(new CommonRenderingUtil()).generate(viewModel);
    return ImmutableMap.of(outputPath, generatedConfig);
}
Also used : DiscoApiModel(com.google.api.codegen.config.DiscoApiModel) CommonRenderingUtil(com.google.api.codegen.util.CommonRenderingUtil) CommonSnippetSetRunner(com.google.api.codegen.rendering.CommonSnippetSetRunner) Doc(com.google.api.tools.framework.snippet.Doc) ViewModel(com.google.api.codegen.viewmodel.ViewModel) DiscoConfigTransformer(com.google.api.codegen.configgen.transformer.DiscoConfigTransformer) Document(com.google.api.codegen.discovery.Document)

Aggregations

DiscoApiModel (com.google.api.codegen.config.DiscoApiModel)1 DiscoConfigTransformer (com.google.api.codegen.configgen.transformer.DiscoConfigTransformer)1 Document (com.google.api.codegen.discovery.Document)1 CommonSnippetSetRunner (com.google.api.codegen.rendering.CommonSnippetSetRunner)1 CommonRenderingUtil (com.google.api.codegen.util.CommonRenderingUtil)1 ViewModel (com.google.api.codegen.viewmodel.ViewModel)1 Doc (com.google.api.tools.framework.snippet.Doc)1