springdoc / springdoc-openapi-maven-plugin

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
141 stars 37 forks source link

missing required property version #10

Closed cervenf closed 4 years ago

cervenf commented 4 years ago

Hi, I have following configuraiton:

`

org.springdoc
            <artifactId>springdoc-openapi-maven-plugin</artifactId>
            <version>1.0</version>
            <executions>
                <execution>
                    <id>integration-test</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <apiDocsUrl>http://localhost:8080/v3/api-docs</apiDocsUrl>
                <outputFileName>openapi.json</outputFileName>
                <outputDir>${project.build.directory}</outputDir>
            </configuration>
        </plugin>

then following json is generated: "openapi": "3.0.1", "info": { "title": "License plate 'reactive version' ", "description": "" }, ..... `

In intellij idea and also openapi-generator-maven-plugin, I'm getting error that required property version is missing.

I need to manually change it to: "info": { "title": "License plate 'reactive version' ", "description": "", "version": "0.1" }, Do I miss something? Thank you.

randyhbh commented 4 years ago

Could you post the logs?

randyhbh commented 4 years ago

Also, @ferinoc could you check if in your pom.xml you have something like this

         <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <wait>1000</wait>
                    <maxAttempts>180</maxAttempts>
                    <jvmArguments>
                        -Dspring.application.admin.enabled=true
                    </jvmArguments>
                </configuration>
                <executions>
                    <execution>
                        <id>pre-integration-test</id>
                        <goals>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-integration-test</id>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
bnasslahsen commented 4 years ago

@ferinoc,

This certainly comes from your version of OpenAPI Info section, which is not set in your code. If you are still having this issue, you can attach or add the link to the sample code to reproduce it and we will give you the guidance, how you can resolve it.