Class DefaultGenerator

    • Field Detail

      • LOGGER

        protected final org.slf4j.Logger LOGGER
      • swagger

        protected io.swagger.models.Swagger swagger
      • isGenerateApis

        protected Boolean isGenerateApis
      • isGenerateModels

        protected Boolean isGenerateModels
      • isGenerateSupportingFiles

        protected Boolean isGenerateSupportingFiles
      • isGenerateApiTests

        protected Boolean isGenerateApiTests
      • isGenerateApiDocumentation

        protected Boolean isGenerateApiDocumentation
      • isGenerateModelTests

        protected Boolean isGenerateModelTests
      • isGenerateModelDocumentation

        protected Boolean isGenerateModelDocumentation
      • isGenerateSwaggerMetadata

        protected Boolean isGenerateSwaggerMetadata
      • basePath

        protected String basePath
      • basePathWithoutHost

        protected String basePathWithoutHost
      • contextPath

        protected String contextPath
    • Constructor Detail

      • DefaultGenerator

        public DefaultGenerator()
    • Method Detail

      • setGenerateSwaggerMetadata

        public void setGenerateSwaggerMetadata​(Boolean generateSwaggerMetadata)
        Programmatically disable the output of .swagger-codegen/VERSION, .swagger-codegen-ignore, or other metadata files used by Swagger Codegen.
        Parameters:
        generateSwaggerMetadata - true: enable outputs, false: disable outputs
      • setGeneratorPropertyDefault

        public void setGeneratorPropertyDefault​(String key,
                                                String value)
        Set generator properties otherwise pulled from system properties. Useful for running tests in parallel without relying on System.properties.
        Parameters:
        key - The system property key
        value - The system property value
      • getGeneratorPropertyDefaultSwitch

        protected Boolean getGeneratorPropertyDefaultSwitch​(String key,
                                                            Boolean defaultValue)
      • getScheme

        protected String getScheme()
      • configureGeneratorProperties

        protected void configureGeneratorProperties()
      • configureSwaggerInfo

        protected void configureSwaggerInfo()
      • generateModels

        protected void generateModels​(List<File> files,
                                      List<Object> allModels)
      • generateSupportingFiles

        protected void generateSupportingFiles​(List<File> files,
                                               Map<String,​Object> bundle)
      • processOperation

        protected void processOperation​(String resourcePath,
                                        String httpMethod,
                                        io.swagger.models.Operation operation,
                                        Map<String,​List<CodegenOperation>> operations,
                                        io.swagger.models.Path path)
      • generateParameterId

        protected static String generateParameterId​(io.swagger.models.parameters.Parameter parameter)