Ask a Question

tags not generated in YAML file using swagger-maven-plugin

SOLVED
bogdanp
Occasional Contributor

tags not generated in YAML file using swagger-maven-plugin

Hello,

 

I am using swagger-maven-plugin to generate a YAML file based on openAPI annotations.

https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-maven-plugin

The issue is that tags are not generated.

I am using

org.eclipse.microprofile.openapi.annotations.tags

Any suggestions on how I can solve this issue: what I need to change in the pom.xml file?

My pom.xml looks like this:

<plugin>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>2.0.8</version>
<configuration>
<openapiFilePath>${project.basedir} --this is a PATH to my configuration.yaml file</openapiFilePath>
<outputFileName>result</outputFileName>
<outputFormat>JSONANDYAML</outputFormat>
<outputPath>${project.build.directory}</outputPath>
<prettyPrint>true</prettyPrint>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>

Thanks a lot,

Bogdan

2 REPLIES 2
frantuma
Staff

 

org.eclipse.microprofile.openapi.annotations.tags
are part of a different project, please use instead

 

io.swagger.v3.oas.annotations.tags

 

bogdanp
Occasional Contributor

I used your suggestion and it worked.

Thanks a lot for helping me Smiley Happy

 

However, now I have other issues, like the one below.

 

Before I used org.eclipse.microprofile.openapi.annotations and now I am using io.swagger.v3.oas.annotations.

 

There is a problem with the enumeration annotation: I do not know how to write it using io.swagger.v3.oas.annotations, so in the end the YAML output file is not generated properly.

 

public Response methodName(
@Parameter(description = ".....")
@Parameter(in = ParameterIn.QUERY, description = FILTER_DESCRIPTION,
example = ".....",
schema = @Schema(
type = "string",
description = ".....",
enumeration = "{\".....\", \".....\", \".....\"}"))
example = "{\".....\", \".....\", \".....\"}"))
.............

Do you have any suggestion in how to solve this?

Thanks a lot for your help so far Smiley Happy

Bogdan

 

cancel
Showing results for 
Search instead for 
Did you mean: