swagger-codegen

Why error in Angular 5 as : has no exported member 'OpaqueToken'.?

微笑、不失礼 提交于 2019-12-18 07:03:19
问题 I have an Angular 4 application, which I am upgrading to Angular 5. I am getting the following error. ERROR in src/app/application/services/generated/variables.ts(1,10): error TS2305: Module '"..../node_modules/@angular/core/core"' has no exported member 'OpaqueToken'. Code snippet is : import { OpaqueToken } from '@angular/core'; export const BASE_PATH = new OpaqueToken('basePath'); export const COLLECTION_FORMATS = { 'csv': ',', 'tsv': ' ', 'ssv': ' ', 'pipes': '|' } This code is been

cleanest way to glue generated Flask app code (Swagger-Codegen) to backend implementation

落花浮王杯 提交于 2019-12-17 18:49:43
问题 I have: a library that does [Stuff] a swagger API definition, which is roughly #1 with minor differences to map cleanly to a REST service a flask app generated #2 using Swagger-Codegen - eg results in python controller functions roughly one-to-one with #1. My intent is that the flask app (all generated code) should only handle mapping that actual REST api and parameter parsing to match the API spec coded in swagger. After any parameter parsing (again, generated code) it should call directly

How to minimize maven pom.xml

非 Y 不嫁゛ 提交于 2019-12-13 03:04:34
问题 I am working on a spring-boot maven project (Maven 3.5, Java 8). Because of using Swagger Codegen in my project to generate classes, "plugins" tag of the pom.xml is getting bigger: <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>2.2.3</version> <executions> <execution> <id>file1</id> <goals> <goal>generate<

Include client SDK usage sample in SwaggerUI

天大地大妈咪最大 提交于 2019-12-12 22:21:08
问题 I've been searching for a tool which could help me parse my JSON swagger file (or even YAML file) and generate code sample resources in my UI based on this example of API doc. I've already tried : codegen (So I do have the code samples in a github repo, but I don't know how to get it on my UI dynamically) slate, but i'm trying to go on with swagger Widdershins Does someone knows about a third-party-tool able to produce such a feature or did I miss something from codegen or swagger-UI ? Or

How do I use the public swagger-generator docker image to generate a client?

隐身守侯 提交于 2019-12-12 08:35:09
问题 We have a fully dockerized web app with a valid Swagger definition for the API. The API runs in its own docker container, and we're using docker-compose to orchestrate everything. I want to generate a Ruby client based on the Swagger definition located at http://api:8443/apidocs.json . I've poured through the documentation here, which led me to Swagger's public docker image for generating client and server code. Sadly the documentation is lacking and offers no examples for actually generating

Open api 3.0 mock Generator [closed]

房东的猫 提交于 2019-12-12 06:21:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am learning Open API Specification. Is there any tools to perform mocking on API based on the open API specification in YAML file. Thanks in Advance ps: I am using the currently released draft version of open API (OpenAPI 3.0) 回答1: SwaggerHub includes a mock server for OpenAPI 2.0 and 3.0 specs. Mocking is

Swagger-codegen: error building Pet Store example for .NET Core

血红的双手。 提交于 2019-12-12 04:55:29
问题 I am trying out swagger-codegen to generate the Pet Store example for .NET Core. When I try to build the project, I see this error: /home/username/test/src/IO.Swagger/IO.Swagger.xproj(7,5): error MSB4019: The imported project "/usr/share/dotnet/sdk/1.0.4/Microsoft/VisualStudio/v14.0/ DotNet/Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. The exact steps I ran were: $ java -jar swagger-codegen-cli.jar

Swagger UI example data

江枫思渺然 提交于 2019-12-12 02:35:59
问题 Is there a way in swagger to show example data for; model, both input & output, query parameters, headers, etc? I have been unable to find anything related to this in the annotations documentation; https://github.com/swagger-api/swagger-core/wiki/Annotations-1.5.X 回答1: If you look at the documentation for some of the annotations mentioned in the wiki you will see they have among their optional parameters one called example or examples . You can use this parameter to add a single example or

How to add several examples to response in Swagger without breaking Codegen?

人盡茶涼 提交于 2019-12-11 13:15:30
问题 I've been trying to add examples to my Swagger API according to the official docs (see last codeblock of Request and Response Body Examples ) but it does not seem to work as expected. Considering the following minimal example: swagger: "2.0" info: description: Desc version: "1" title: Title paths: /stuff: post: produces: - application/json responses: 201: description: It worked content: application/json: schema: $ref: "#/definitions/StatusMessage" examples: Success without message: value:

Use Swagger/OpenAPI discriminator so that Jackson serializes object correctly

天涯浪子 提交于 2019-12-10 16:40:09
问题 We're having trouble using the OpenAPI 2.0 discriminator in way that makes both the Swagger tools and the Jackson serializer happy. Problem: during serialization Jackson currently generates two JSON properties for the discriminator, one of them having a null value. OpenAPI 2.0 definition swagger: '2.0' info: version: v1 title: Error API paths: /errors: get: description: Stack Overflow test responses: '200': description: OK schema: $ref: '#/definitions/SpecificError' definitions: GeneralError: