swagger-codegen

How to open Swagger-ui from vert.x

烂漫一生 提交于 2019-12-04 03:18:15
I want to implement Swagger-UI in Vert.X app. I have listed all routes and I want to see them in swagger-ui like in SpringBoot. I have also manually edited them in swagger-editor. So, how to open localhost:8080/swagger-ui.html from vert.x app and there to see all routers. I read that i need to save the json from swagger-editor and to put it in src/resources. After that what? Also i found a great stuff here: https://github.com/phiz71/vertx-swagger and http://vertx.io/blog/presentation-of-the-vert-x-swagger-project/ But how to implement it? Well, you started in the wrong direction a bit. Those

Swagger Codegen (with maven plugin) for OpenAPI 3.0

最后都变了- 提交于 2019-12-04 02:53:08
问题 I want to use Swagger Codegen for OpenAPI 3.0 YAML file. And I see Swagger Codegen 3.0.0-rc0 is available. But when I try to use that I run into issues. Following are the details: My pom.xml file with swagger-codegen plugin: <plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>3.0.0-rc0</version> <executions> <execution> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>${basedir}/src/main/resources/mySpec.yaml</inputSpec>

Generating Java classes for Request and Response objects from Yaml file

夙愿已清 提交于 2019-12-03 20:03:28
问题 We have created a Yaml file using Swagger editor for our APIs specification which includes Base URL, endpoint, Request, Response and Header information etc.. Now I want to implement RESTful web service for these APIs. For that I am thinking of generating my Request and Response Java classes from this Yaml file and was looking for some kind of code generator, preferably a maven plugin/dependency which I could use in my Maven project. I came across this rest client with swagger which talks

How to use Swagger Codegen with .net core

白昼怎懂夜的黑 提交于 2019-12-03 14:52:27
I am able to integrate the Swagge UI in my web api using Swashbuckle. I also want to explore the swagger codegen feature. Can somebody help in - how I can integrate swagger codegen into my web api project? Or do I need to download any tool? I want to be able it to host the codegen and pass the json/raml form specs to generate client in .net core. I am not able to find enough docs on above. EDIT : I want to know how I can host codegen in my WEBAPI. Thanks! You should install " Swashbuckle.AspNetCore.Swagger " nuget package by right click your project and click manage nuget packages. Then you

How can I set a description and an example in Swagger with Swagger annotations?

拟墨画扇 提交于 2019-12-03 06:23:34
问题 I am creating a REST Api using Spring boot, and auto generating the swagger documentation in controllers using swagger codegen. However, I am not able to set a description and example for a parameter of type String in a POST request. Here is mi code: import io.swagger.annotations.*; @Api(value = "transaction", tags = {"transaction"}) @FunctionalInterface public interface ITransactionsApi { @ApiOperation(value = "Places a new transaction on the system.", notes = "Creates a new transaction in

How to filter generated Swagger JSON (yaml)

被刻印的时光 ゝ 提交于 2019-12-02 20:12:00
问题 I have over 5k lines long swagger.json file describing hundreds of paths and objects. I want to generate a TypeScript client (using swagger-codegen) using only a part of the endpoints. I don't want the generated TypeScript application to contain classes or interfaces connected with unused part of the swagger.json How to filter out only a part of the Swagger documentation, describing the specified group of paths (e.g. all paths starting with /api/* )? Especially I want the filtered JSON to not

How can I set a description and an example in Swagger with Swagger annotations?

岁酱吖の 提交于 2019-12-02 18:54:16
I am creating a REST Api using Spring boot, and auto generating the swagger documentation in controllers using swagger codegen. However, I am not able to set a description and example for a parameter of type String in a POST request. Here is mi code: import io.swagger.annotations.*; @Api(value = "transaction", tags = {"transaction"}) @FunctionalInterface public interface ITransactionsApi { @ApiOperation(value = "Places a new transaction on the system.", notes = "Creates a new transaction in the system. See the schema of the Transaction parameter for more information ", tags={ "transaction", })

How to filter generated Swagger JSON (yaml)

人走茶凉 提交于 2019-12-02 08:24:39
I have over 5k lines long swagger.json file describing hundreds of paths and objects. I want to generate a TypeScript client (using swagger-codegen) using only a part of the endpoints. I don't want the generated TypeScript application to contain classes or interfaces connected with unused part of the swagger.json How to filter out only a part of the Swagger documentation, describing the specified group of paths (e.g. all paths starting with /api/* )? Especially I want the filtered JSON to not contain definitions for unused data structures. I think you can do it, using task automation (grunt,

How do I update RestTemplate to correctly map Java Dates?

◇◆丶佛笑我妖孽 提交于 2019-12-02 07:43:55
问题 I have an issue where my RestTemplate.postForEntity(url, restRequest, RepoResponse.class) call is failing because it can't deserialise dates of the form: 2019-02-01T12:00:00.000-0500 because of the missing colon in the timezone. Based on this answer, it looks like I want to change the date formatting of my RestTemplate 's ObjectMapper . I've tried a solution here: https://stackoverflow.com/a/38286322/14250 Which gives me the following code: restTemplate = new RestTemplate(); ObjectMapper

Generated Swagger REST client does not handle + character correctly for query parameter

ぃ、小莉子 提交于 2019-12-02 05:18:26
问题 I have this Spring REST controller method: @ApiOperation("My method") @RequestMapping(method = RequestMethod.POST, value = "/myMethod") public void myMethod(@RequestParam("myParam") String myParam) { ... } The REST client is generated using swagger codegen CLI with language Java and library resttemplate : public void myMethod(String myParam) throws RestClientException { ... return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType,