use of com.palantir.conjure.postman.PostmanCollectionGenerator in project conjure-postman by palantir.
the class ConjurePostmanCli method generate.
static void generate(File target, File outputDirectory, GeneratorConfiguration config) {
try {
ConjureDefinition conjureDefinition = OBJECT_MAPPER.readValue(target, ConjureDefinition.class);
PostmanCollectionFileWriter writer = new DefaultPostmanCollectionFileWriter(outputDirectory.toPath());
PostmanCollectionGenerator generator = new PostmanCollectionGenerator(config);
writer.write(generator.generate(conjureDefinition));
} catch (IOException e) {
throw new RuntimeException(String.format("Error parsing definition: %s", e.toString()));
}
}
Aggregations