problem with open api maven generator plugin

Viewed 10

I am trying to generate my API but I get this error when i run MVN clean install.

java.lang.RuntimeException: Unknown library: spring-boot
Available libraries:
  jersey1
  jersey2
  jersey3
  feign
  okhttp-gson
  retrofit2
  resttemplate
  webclient
  resteasy
  vertx
  google-api-client
  rest-assured
  native
  microprofile
  apache-httpclient

I have tried to find something similar but I can't find anything in Stackoverflow

My pom.xml, I have added the openapi dependencies but what seems strangest to me is it shows me in the console that it does not recognize the spring dependencies

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.9.2</version>
    </dependency>

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.9.2</version>
    </dependency>

    <dependency>
        <groupId>io.swagger.core.v3</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>2.1.12</version>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>

    <dependency>
        <groupId>com.github.joschi.jackson</groupId>
        <artifactId>jackson-datatype-threetenbp</artifactId>
        <version>2.6.4</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.threeten</groupId>
        <artifactId>threetenbp</artifactId>
        <version>1.6.0</version>
    </dependency>
</dependencies>


<build>
    <plugins>
        <plugin>
            <groupId>io.swagger.codegen.v3</groupId>
            <artifactId>swagger-codegen-maven-plugin</artifactId>
            <version>3.0.34</version>

            <dependencies>
                <dependency>
                    <groupId>com.github.jknack</groupId>
                    <artifactId>handlebars</artifactId>
                    <version>4.3.0</version>
                </dependency>
            </dependencies>

            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <inputSpec>${project.basedir}/src/main/resources/test.yaml</inputSpec>
                        <artifactId>contract-service</artifactId>
                        <output>${project.basedir}/src/main/java</output>
                        <language>spring</language>
                        <generateModels>true</generateModels>
                        <generateSupportingFiles>false</generateSupportingFiles>
                        <modelPackage>com.empresa.proyecto.model</modelPackage>
                        <apiPackage>com.empresa.proyecto.api</apiPackage>
                        <invokerPackage>com.empresa.proyecto</invokerPackage>
                        <generateApiTests>false</generateApiTests>
                        <generateApiDocumentation>false</generateApiDocumentation>
                        <generateModelTests>false</generateModelTests>
                        <generateModelDocumentation>false</generateModelDocumentation>
                        <configOptions>
                            <interfaceOnly>true</interfaceOnly>
                            <skipDefaultInterface>true</skipDefaultInterface>
                            <sourceFolder>/</sourceFolder>
                            <library>spring-boot</library>
                            <dateLibrary>java17</dateLibrary>
                        </configOptions>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
0 Answers
Related