0

Unable to render this definition The provided definition does not specify a valid version field.

Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0)

I have found similar posts but they are based on spring boot

eg. Swagger..Unable to render this definition The provided definition does not specify a valid version field

My SwaggerConfiguration is based on the repo from: https://github.com/frehov/micronaut-swagger-server

Does it has to do with some pom dependency/version?

Dependencies

<dependency>
    <groupId>io.swagger.core.v3</groupId>
    <artifactId>swagger-annotations</artifactId>
    <scope>compile</scope>
</dependency>

AnnotationProcessorPaths

                <annotationProcessorPaths>
                    <path>
                        <groupId>io.micronaut</groupId>
                        <artifactId>micronaut-inject-java</artifactId>
                        <version>${micronaut.version}</version>
                    </path>
                    <path>
                        <groupId>io.micronaut</groupId>
                        <artifactId>micronaut-validation</artifactId>
                        <version>${micronaut.version}</version>
                    </path>
                    <path>
                        <groupId>io.micronaut.configuration</groupId>
                        <artifactId>micronaut-openapi</artifactId>
                        <version>${micronaut.version}</version>
                    </path>
                </annotationProcessorPaths>
marhg
  • 659
  • 1
  • 17
  • 30
  • Hello, your imports seems to be correct. I'm not used to maven annotations since I use micronaut only with gradle, but you are unsing swagger 3 and you have micronaut-openapi plugin and micronaut version is the same as micronaut-openapi version. Can you link the application class and some swagger documentation ? – Anorgar Feb 22 '21 at 13:57
  • I think another problem, I will post another question – marhg Feb 23 '21 at 09:59
  • here https://stackoverflow.com/questions/66331458/micronaut-swagger-configuration-url-with-null-values – marhg Feb 23 '21 at 10:34

0 Answers0