Class CodeGenMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="generate",
          defaultPhase=GENERATE_SOURCES,
          threadSafe=true)
    public class CodeGenMojo
    extends org.apache.maven.plugin.AbstractMojo
    Goal which generates client/server code from a OpenAPI json/yaml definition.
    • Field Detail

      • inputSpec

        @Parameter(name="inputSpec",
                   property="openapi.generator.maven.plugin.inputSpec")
        protected String inputSpec
        Location of the OpenAPI spec, as URL or file.
      • inputSpecRootDirectory

        @Parameter(name="inputSpecRootDirectory",
                   property="openapi.generator.maven.plugin.inputSpecRootDirectory")
        protected String inputSpecRootDirectory
        Local root folder with spec files
      • environmentVariables

        @Parameter
        protected Map<String,​String> environmentVariables
      • globalProperties

        @Parameter
        protected Map<String,​String> globalProperties
    • Constructor Detail

      • CodeGenMojo

        public CodeGenMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException