Forum Discussion

bogdanp's avatar
bogdanp
Occasional Contributor
5 years ago
Solved

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

Hello SmartBear community,

 

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

 

There is a problem with the enumeration annotation (enums): 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?

Smiley Happy

Bogdan