org.openapitools.codegen.languages.MarkdownDocumentationCodegen Maven / Gradle / Ivy
The newest version!
package org.openapitools.codegen.languages;
import org.openapitools.codegen.*;
import io.swagger.models.properties.ArrayProperty;
import io.swagger.models.properties.MapProperty;
import io.swagger.models.properties.Property;
import io.swagger.models.parameters.Parameter;
import java.io.File;
import java.util.*;
import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.meta.GeneratorMetadata;
import org.openapitools.codegen.meta.Stability;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MarkdownDocumentationCodegen extends DefaultCodegen implements CodegenConfig {
public static final String PROJECT_NAME = "projectName";
static Logger LOGGER = LoggerFactory.getLogger(MarkdownDocumentationCodegen.class);
public CodegenType getTag() {
return CodegenType.DOCUMENTATION;
}
public String getName() {
return "markdown";
}
public String getHelp() {
return "Generates a markdown documentation.";
}
public MarkdownDocumentationCodegen() {
super();
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
.stability(Stability.BETA)
.build();
outputFolder = "generated-code" + File.separator + "markdown";
modelTemplateFiles.put("model.mustache", ".md");
apiTemplateFiles.put("api.mustache", ".md");
embeddedTemplateDir = templateDir = "markdown-documentation";
apiPackage = File.separator + "Apis";
modelPackage = File.separator + "Models";
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
// TODO: Fill this out.
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy