Contributions
Resources are generated randomly 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 All methods in every resource Java class are annoted properly, but each time I generate the YAML file, all the methods in every resource Java class are generated randomly. I would like that all the methods in a Java resource class to be generated in the order in which they appear in the class. I tried several parameters from here, but none of them work https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-maven-plugin#parameters Do you have any suggestion in how to solve this (I would like that all the methods in a Java resource class to be generated in the order in which they appear in the class.) ? 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 million for any hints. frantuma Do you have any solution? :) Bogdan1.2KViews0likes1Commentenums 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.1KViews0likes2CommentsRe: tags not generated in YAML file using swagger-maven-plugin
I used your suggestion and it worked. Thanks a lot for helping me :smileyhappy: 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 :smileyhappy: Bogdan3.7KViews0likes0Commentstags 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, BogdanSolved3.8KViews0likes2Comments