swagger-codegen Questions

2

We are able to use openApi documentation and generate our Java Input classes using the spring swagger-codegen. Also, we can inject the javax.validation annotations when input is generated for commo...

3

I need to generate spring controller source code using swagger codegen gradle plugin with Jakarta packages but I could not see an option in config to do so I have tried to use below options to gene...
Cristionna asked 15/2, 2023 at 5:37

4

I'm building a fuzzer for a REST API that has an OpenAPI (Swagger) definition. I want to test all available path from the OpenAPI definition, generate data to test the servers, analyse responses c...
Croce asked 31/12, 2016 at 13:35

3

Solved

Why is swagger-codegen generating project with missing dependencies? Running: java -jar swagger-codegen-cli.jar generate -l java -i swagger.json Generates a project with this for example: @javax.an...
Revegetate asked 27/4, 2021 at 10:53

3

I have a .Net Core v2.1 Web API which uses NSwag to generate its Swagger Json. I have a response model as such - public class LoginResponse { public LoginResult LoginResult { get; set; } } publ...
Frightened asked 4/10, 2018 at 14:18

1

Let's assume I have this definition in my openapi.yml (this is just a madeup example to depict the issue I have): components: schemas: Address: type: object properties: name: type: string zi...

3

Solved

I'm digging here around trying to find a solution, how to merge several OpenApi v3 component definitions in one file. Let's imagine a situation: You decided to split your OpenApi into multiple f...
Declination asked 17/4, 2020 at 1:9

2

Solved

When i generate code for Spring from my swagger yaml , usually controller layer is generated using delegate pattern , such that for a single model three files are generated . For example , if i def...
Raman asked 20/2, 2021 at 17:41

4

Solved

How can I get the swagger codegen to use an existing class instead of creating a new class? Is this possible? For instance I want to use org.springframework.data.domain.Page instead of swagger crea...
Apostrophe asked 18/6, 2017 at 5:40

3

I have a variable in yml file startDate: type:string format:date I'm using swagger-generater to generate java code from yml. It's generating a startDate variable as below @JsonProperty("star...
Foregut asked 29/3, 2019 at 21:24

2

I'm generate a java client using swagger codegen cli tool (version 3.0.25) in gradle: task doCodeGenSdk(type: JavaExec) { main = "io.swagger.codegen.v3.Codegen" classpath = configurations...
Competition asked 19/8, 2021 at 6:58

1

I want to respond with different result objects in a Swagger generated API. The type of object is dependent on the result code. But it seems that the Swagger codegen generates only code that allows...
Marxism asked 25/8, 2021 at 15:22

3

Solved

I've generated a Python client library for this API by using the online Swagger Codegen at https://generator.swagger.io/. The API uses Bearer authentication: openapi: 3.0.0 ... paths: /sandbox/r...
Jarrett asked 13/9, 2019 at 8:35

10

As described in CORS preflight request fails due to a standard header if you send requests to OPTIONS endpoints with the Origin and Access-Control-Request-Method headers set then they get intercept...
Wraparound asked 22/6, 2017 at 11:19

4

I have created apis endpoint with Swaggerhub and successfully exported to run with asp.net core. I want to test the same apis with nestjs but i found documenting with openapi but not the other way ...
Gower asked 26/8, 2019 at 3:41

2

Our project uses multiple swagger files for a single API, yet it appears swagger-codegen only accepts one. How do we generate code with swagger-codegen in this case?
Fitz asked 6/12, 2016 at 4:52

3

Solved

I have a method to download a binary file. This currently has the following spec in openapi.yaml: /processing/getZippedReports: post: tags: - ProcessingRest description: Get the reports oper...
Troytroyer asked 14/11, 2018 at 22:5

2

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 ser...
Footcandle asked 15/2, 2018 at 4:22

2

How do you set a default discriminator for each child class? For example, take this schema: components: schemas: Pet: type: object required: - petType properties: petType: type: string dis...

3

Solved

I'm currently playing around with my jersey2 rest service. For a better overview of the given service (description, types and so on) I make heavily use of swagger (swagger-jersey2-jaxrs). So I'm a...
Stickleback asked 27/9, 2016 at 11:58

4

Solved

What does the term Server Stub mean in the context of the Swagger ecosystem? How is it used?
Worsen asked 2/8, 2018 at 15:3

4

I'm trying to adjust the "displayName" of the model being used in an automatically generated Swagger definition. This will only affect the Swagger names, meaning the namespace in code would be le...
Duester asked 13/3, 2017 at 0:21

5

I have two yaml file, customer.yaml and employee.yaml. How do I generate java code from these two yaml file in single project. I'm using gradle, I know the task specification for single yaml but ho...
Thelen asked 26/9, 2019 at 14:6

0

I have a micro service architecture with spring cloud gateway and each micro service has its own Open Api Spec. I need to merge all of them into 1 Open Api Spec ( yaml or json ). I am not talking a...
Gardenia asked 14/7, 2022 at 22:7

5

I'm using OpenAPI 3.0 inheritance in components schemas and I have the (Java) classes generated by openapi-generator (which uses Jackson). Why the discriminator property gets serialized twice in th...
Fetich asked 29/8, 2019 at 8:35

© 2022 - 2024 — McMap. All rights reserved.