Class JavaVertXServerCodegen

All Implemented Interfaces:
io.swagger.codegen.v3.CodegenConfig, BeanValidationFeatures, NotNullAnnotationFeatures

public class JavaVertXServerCodegen extends AbstractJavaCodegen implements BeanValidationFeatures, NotNullAnnotationFeatures
  • Field Details

    • RX_INTERFACE_OPTION

      public static final String RX_INTERFACE_OPTION
      See Also:
    • USE_DATAOBJECT_OPTION

      public static final String USE_DATAOBJECT_OPTION
      See Also:
    • MOUNT_OPERATION_FROM_OPTION

      public static final String MOUNT_OPERATION_FROM_OPTION
      See Also:
    • MOUNT_OPERATION_FROM_EXTENSIONS

      public static final String MOUNT_OPERATION_FROM_EXTENSIONS
      See Also:
    • MOUNT_OPERATION_FROM_INTERFACE

      public static final String MOUNT_OPERATION_FROM_INTERFACE
      See Also:
    • SPEC_LOCATION_OPTION

      public static final String SPEC_LOCATION_OPTION
      See Also:
    • USE_FUTURE_OPTION

      public static final String USE_FUTURE_OPTION
      See Also:
    • rootPackage

      protected String rootPackage
    • apiVerticle

      protected String apiVerticle
    • apiVersion

      protected String apiVersion
    • useDataObject

      protected boolean useDataObject
    • mountFromExtensions

      protected boolean mountFromExtensions
    • mountFromInterface

      protected boolean mountFromInterface
    • title

      protected String title
    • useBeanValidation

      protected boolean useBeanValidation
    • notNullJacksonAnnotation

      protected boolean notNullJacksonAnnotation
  • Constructor Details

    • JavaVertXServerCodegen

      public JavaVertXServerCodegen()
      A Java Vert.X generator. It can be configured with CLI options :
      • rxInterface : type Boolean if true, API interfaces are generated with RX and methods return Single and Comparable. default : false
      • useDataObject : type Boolean if true, models objects are generated with @DataObject
      • mountOperationFrom : type String, define how routes are mounted.
      • specLocation : define spec location, default as SPEC_LOCATION.
      • useFuture : define use services as future, default false.
  • Method Details

    • getTag

      public io.swagger.codegen.v3.CodegenType getTag()
      Configures the type of generator.
      Specified by:
      getTag in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      the CodegenType for this generator
      See Also:
      • CodegenType
    • getName

      public String getName()
      Configures a friendly name for the generator. This will be used by the generator to select the library with the -l flag.
      Specified by:
      getName in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      the friendly name for the generator
    • getHelp

      public String getHelp()
      Returns human-friendly help for the generator. Provide the consumer with help tips, parameters here
      Specified by:
      getHelp in interface io.swagger.codegen.v3.CodegenConfig
      Returns:
      A string value for the help message
    • getDefaultTemplateDir

      public String getDefaultTemplateDir()
      Specified by:
      getDefaultTemplateDir in class DefaultCodegenConfig
    • processOpts

      public void processOpts()
      Specified by:
      processOpts in interface io.swagger.codegen.v3.CodegenConfig
      Overrides:
      processOpts in class AbstractJavaCodegen
    • postProcessModelProperty

      public void postProcessModelProperty(io.swagger.codegen.v3.CodegenModel model, io.swagger.codegen.v3.CodegenProperty property)
      Specified by:
      postProcessModelProperty in interface io.swagger.codegen.v3.CodegenConfig
      Overrides:
      postProcessModelProperty in class AbstractJavaCodegen
    • fromModel

      public io.swagger.codegen.v3.CodegenModel fromModel(String name, io.swagger.v3.oas.models.media.Schema schema, Map<String,io.swagger.v3.oas.models.media.Schema> allSchemas)
      Description copied from class: DefaultCodegenConfig
      Convert Swagger Model object to Codegen Model object
      Specified by:
      fromModel in interface io.swagger.codegen.v3.CodegenConfig
      Overrides:
      fromModel in class AbstractJavaCodegen
      Parameters:
      name - the name of the model
      schema - Swagger Model object
      allSchemas - a map of all Swagger models from the spec
      Returns:
      Codegen Model object
    • preprocessOpenAPI

      public void preprocessOpenAPI(io.swagger.v3.oas.models.OpenAPI openAPI)
      Specified by:
      preprocessOpenAPI in interface io.swagger.codegen.v3.CodegenConfig
      Overrides:
      preprocessOpenAPI in class AbstractJavaCodegen
    • setUseBeanValidation

      public void setUseBeanValidation(boolean useBeanValidation)
      Specified by:
      setUseBeanValidation in interface BeanValidationFeatures
    • setNotNullJacksonAnnotation

      public void setNotNullJacksonAnnotation(boolean notNullJacksonAnnotation)
      Specified by:
      setNotNullJacksonAnnotation in interface NotNullAnnotationFeatures
    • isNotNullJacksonAnnotation

      public boolean isNotNullJacksonAnnotation()
      Specified by:
      isNotNullJacksonAnnotation in interface NotNullAnnotationFeatures