enums not generated in YAML file using swagger-maven-plugin
Hello SmartBear community, I am usingswagger-maven-pluginto 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 theenumerationannotation (enums): I do not know how to write it usingio.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? BogdanSolved4.2KViews0likes2CommentsIssue with creating a documentation when using re-usable enums
My yaml file looks like this openapi: 3.0.2 components: schemas: Countries: type: string enum: - Unknown - Afghanistan - Albania - Algeria - AmericanSamoa - "\u00c5landIslands" - NotOtherwiseSpecified , when I compile it it creates the java classes correctly, however is not creating the documentation, just gives me: GeopoliticalAffiliation - and nothing more is displayed for that praticular scheme. For the other schemes enum options are displayed, etc. Can you help me with this problem? Is this an issue of swagger or I am mistaken somehwere.The example in the swagger website and my code are following the same rules:https://swagger.io/docs/specification/data-models/enums/. P.S. I tought the problem is comming because of the special caracter, but is not. I tried without that specific enum entry and also I have another similar way reusable enum that behaves the same way.824Views0likes1Comment