1,206 questions
0
votes
1
answer
82
views
How to generate PowerShell Module with TypeSpec from OpenAPI?
I generate PowerShell Module from OpenAPI with autorest, but as Microsoft announced this tool's deprecated and TypeSpec replaces it.
I cannot find any docs on how to generate PowerShell Module from ...
1
vote
1
answer
276
views
Using "System.Text.Json.JsonSerializer" to generate OpenAPI source code
I am binding an OpenAPI 3.0 JSON file in my C# project with .NET Framework 4.8.
While doing this, I want to adjust the .json configuration to make the code generated using OpenAPI code generator use ...
-3
votes
1
answer
185
views
Disabling donation banner of openapi-generator-gradle-plugin
I am using the Maven repository openapi-generator-gradle-plugin version 7.14.0
I want to disable the console banner of openapi-generator-gradle-plugin.
I have this code to generate my code from api ...
0
votes
0
answers
57
views
OpenAPI Spec client fail to compile with ambiguous types
I downloaded the OpenAI's OpenAPI Spec file and tried to generate and compile the client and faced a few issues and wonder if anyone knows the fix for it.
This is the specification: https://app....
1
vote
1
answer
140
views
Generate Open API spec from Pydantic with references to discriminators
I am trying to create a set of POJOs from an OpenAPI specification that is generated from a pydantic data model. The problem I'm hitting is with discriminators. I am currently using the following ...
0
votes
1
answer
288
views
java.net.URISyntaxException: Illegal character in opaque part at index 2: after upgrading open api from 3.0.3 to 3.1.0
I have spring boot application written in Kotlin lang.
We have REST API contract described in open api file. We use API first approach.
So we use open api generator:
plugins {
...
id("org....
0
votes
1
answer
42
views
Configuring openapi-generator-gradle-plugin in toml file for Gradle
I am using Gradle 8.2.0 and Gradle Plugin openapi-generator-gradle-plugin 7.2.0
When I use the old format like:
buildscript {
repositories {
mavenLocal()
mavenCentral()
...
0
votes
0
answers
269
views
How to correctly configure credentials in OpenAPI generated services
I have an Angular service, generated via @openapitools/openapi-generator-cli. OpenAPI offers possibility to customize its configuration via provideApi method. I want to provide Basic auth in case, ...
0
votes
0
answers
74
views
Unable to retrieve custom properties in customized openAPI generator
I'm developing a custom OpenAPI Generator and would like to execute specific logic based on custom configuration properties defined in the openapi-generator-maven-plugin configuration.
Here’s an ...
7
votes
4
answers
396
views
Swift OpenAPI Package Generator ClientMiddleware Protocol Never Conforms
When creating a new Authentication Middleware class that conforms to the ClientMiddleware protocol defined in the swift-openapi-runtime library, Xcode reports that the class does not conform to the ...
1
vote
0
answers
95
views
Make openapi-generator models package private
I am writing a library which uses openapi-generator generated models and I don't want to expose these models to the consumers of my library.
Is there a way to make my models package-private and ...
0
votes
1
answer
191
views
OpenApi Generator - vendor extension tags not working
I'm using the OpenAPI Generator Maven plugin to generate Java models from an OpenAPI 3.0 spec. I've defined vendor extensions like x-model-debug and x-implements in my schema:
components:
schemas:
...
0
votes
0
answers
48
views
OpenAPI code generation using classes previously generated
As per current methodology, deploying multiple micro services. Of course there are shared models.
common.yaml:
...
components:
schemas:
Address:
type: "object"
properties:
...
0
votes
0
answers
116
views
How can I avoid a bootstrap deadlock in a Melos project with a dynamically generated package?
I’m setting up a Flutter monorepo using Melos. Inside the repo:
A Flutter app (/apps/my_app)
A package that is generated by openapi-generator (/packages/my_api_client)
The problem:
My app depends ...
0
votes
1
answer
132
views
Python openapi-python-client runtime error when deserializing
I am attempting to consume the API at https://api.oemserver.com/swagger/index.html
I have run the tool at https://github.com/openapi-generators/openapi-python-client to create an API client
Trying a ...
0
votes
0
answers
67
views
How to keep backward-compatible method signatures when adding optional parameters with OpenAPI Generator (Spring Boot, v7.2.0)
I’m using OpenAPI Generator in a Spring Boot application. I’ve added a new optional parameter to an existing REST API by marking it with required: false in the api.yaml file.
This works fine for ...
1
vote
1
answer
89
views
How to only generate library (models and abstract controller) for .NET Core using Open API generator
I'm trying to create a separate .NET Core library project for all generated files which I can implement in my API code.
That way generation does not delete/change my actual API like it does if you ...
1
vote
0
answers
46
views
OpenAPI multi-part definition with schema reference
I am using openapi-generator-maven-plugin to generate Java code from my definition.
How can I get OpenAPI Generator to generate a reusable request object for a multipart requestBody? (instead of being ...
0
votes
1
answer
259
views
OpenAPI Generator 7.9.0 generates methods with _0 as suffix. How to work around that issue?
Why does OpenAPI Generator generate some of the methods with _<Number>, even though operation IDs in my spec are unique?
Is there any workaround (by using properties) in OpenAPI 7.9.0? There is ...
0
votes
1
answer
195
views
Angular 19 ApplicationConfig use Configuration in factory
In GitOp I want to replace config.json for each environment and with this internal app I want to keep it as simple as possible (e.g. no ngrx)
My problem is that config.json is loaded in a ...
0
votes
0
answers
55
views
Springboot Web mapping same controller as 2 beans
I'm generating controller code from openapi3 spec using gradle openapi generator plugin 6.3.0.
Generate, compile works fine, but getting a runtime error:
Caused by: java.lang.IllegalStateException: ...
0
votes
0
answers
80
views
OpenAPI Generator: Conflicting Kotlin property names with case-sensitive JSON properties
I'm using OpenAPI Generator to generate Kotlin DTOs from an OpenAPI specification. I have a schema where I need to handle two JSON properties that differ only in case: inventoryCharacteristics (...
0
votes
0
answers
354
views
How to configure openapi-generator-cli to include examples in Pydantic models
I have examples associated to my models.
"components": {
"schemas": {
"Algorithm": {
"properties": {
"id": {
...
1
vote
0
answers
84
views
Hide parameter in Swagger doc but keep it for OpenAPI jar generation
I have a situation where I would like to not see a HTTP method parameter in the Swagger UI documentation, but still have it generated in my method signature by OpenAPI Java client generation.
I tried ...
0
votes
0
answers
104
views
How to ignore field generation without specified type in openapi generator for Android Kotlin project
I am writing an Android application in Kotlin. To generate models, I use the swagger.yaml file provided to me and kotlinx.serialization. Some models in this file contain a field:
delivery_data:
...
0
votes
0
answers
85
views
How to design a Java project to enable dynamic class loading based on the api version
I am currently trying to create a custom java api project which I can use in my other project. The project will try to call api endpoints to a server. This server has different api version support. ...
0
votes
0
answers
45
views
Ionic/Capacitor: Call a .NET REST API locally from a mobile
I have a REST API developed in .NET that runs locally on a MacBook.
It is accessible via:
https://192.168.1.10:9000
http://192.168.1.10:9001
It uses a self-signed certificate, and for CORS:
builder....
0
votes
0
answers
143
views
Quarkus OpenAPI generator generates invalid code
Using version 2.10.0-lts of the quarkus-openapi-generator for server side, my code is generated with an error. The swagger file that I use contains a coffee break event, which is denoted as "...
3
votes
0
answers
119
views
OpenAPI generator fails create nullable array items
I have such a component in swagger.json (OpenAPI version: "3.0.1")
"ids": {
"type": "array",
"items": {
"type": "string",
...
1
vote
0
answers
186
views
Use custom OpenAPI generator within Docker
Following OpenAPI documentation and some random guides through the Internet I have managed to develop my own custom API files generator.
I have tested it locally and works as expected, so far.
My ...
1
vote
1
answer
213
views
Swagger Editor shows multiple "Structural error at [path] should have required property 'description' missingProperty: description"
So I have a bunch of these errors in the title when I try to put my generated openapi.json in the Swagger Editor. Since I don't want to write any description where the description is required and ...
1
vote
2
answers
690
views
How to generate FeignClient interfaces and Lombok-annotated models using OpenAPI Generator?
I am using openapi-generator-maven-plugin to generate Feign clients and models from an OpenAPI spec.
Example OpenAPI file:
openapi: 3.0.1
info:
title: ReviewApis
version: 1.0.0
paths:
/create-...
0
votes
0
answers
31
views
Android OpenAPI generator client can not connect to Django Rest API made with rest framework
I just generated a android client for an schema of a API built by myself and enabled internet connection permission with:
<uses-permission android:name="android.permission....
1
vote
0
answers
256
views
How to add specific Lombok annotations to individual models when using OpenAPI Generator?
I'm using OpenAPI Generator (openapi: 3.0.3) to autogenerate my Java model classes with Lombok annotations.
This is part of my generator config:
{
"apiPackage": "com.francislainy....
0
votes
0
answers
82
views
ASP.NET Core openapi-generator --import-Mappings not working. Looking for some inputs
Has anyone ever tried using the OpenAPI generator for ASP.NET Core and faced this issue where it doesn't honor --import-mappings option to map a type to custom model?
More details in
https://github....
0
votes
0
answers
375
views
OpenApi generator for the client not generating JsonNullable<?>
I'm generating the client from the api.yaml.
Key entries in the maven pom open api plugin are:
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</...
0
votes
1
answer
363
views
How can I generate a more usable Java client with multiple optional query params?
I am using org.openapi.generator to generate a Java client for an openapi.json document using this configuration:
openApiGenerate {
generatorName.set("java")
// https://openapi-generator....
1
vote
1
answer
668
views
Can I force a specific Spring Boot version when using OpenAPI Generator Maven plugin?
I'm using the Maven plugin from OpenAPI Generator (version 7.12.0) in my project. It works fine and everything is well generated, but it uses Spring Boot version 3.1.3 (which come with some nice ...
0
votes
1
answer
214
views
Models are not generated when specific apis are selected through the gradle plugin
I am trying to generate java code from the following openapi example spec
openapi: "3.0.3"
info:
title: Demo API
version: "1.0"
servers:
- url: http://localhost:8080/api
...
1
vote
0
answers
78
views
How to specificy custom serialization code for a specific query parameter when generating a python wrapper with openapi-generator-cli?
In a OpenAPI v3 specification file, one query parameter expects a comma-separated list of strings:
paths:
/content:
get:
description: Returns data for all given ids
parameters:
...
1
vote
0
answers
61
views
Spring boot maven integration test shuts down abruptly added in pom.xml for openapi swagger documentation
Relating to my first question which is this I supplied the data in application.properties file and then somehow the app started and then suddenly it shut down without any reason.
Please check below ...
1
vote
2
answers
216
views
OpenAPI generated getters for method and URL
I'm utilizing openapi-generator-maven-plugin to generate Java classes for an API. We are using Nimbus to help with some related interactions, e.g. authentication.
The use of the OpenAPI-generated ...
4
votes
0
answers
208
views
Swift (Vapor) OpenAPI Generator and Multipart PUT
I am trying to play around with OpenAPI and the Vapor framework. I'm looking to use Apple's swift-openapi-generator along with the Vapor bindings for it to generate stubs for my REST APIs. My ...
0
votes
1
answer
247
views
OpenAPI typescript angular generator with no enumNameSuffix
I want to upgrade openapi-generator-maven-plugin from 4.x to 7.12.0.
There is one change in the generated enum-models. With the new version they are always created with a suffix (default: Enum). To ...
1
vote
0
answers
128
views
Customising ApiClient class generated by OpenApi3 generator
I am looking at a Microservices Gradle project which has got flagged by CodeQL scan with the alert: "'TrustManager' that accepts all certificates".
When I looked into the alert, the class ...
2
votes
1
answer
265
views
Model (DTO) generation using Kiota
I'm using Kiota to generate client models from an OpenAPI specification. However, I only need the models and not the rest of the generated code. Is there a way to extract only the models?
0
votes
1
answer
631
views
Issue in Data class generation using open api generator with kotlin and spring
There is an issue with one of the data files that is being generated.
I have upgraded my open-api-generator version from 5.1.1 to 7.11.0.
Below are the current versions that I am working on:
...
0
votes
1
answer
86
views
OpenApi-generator, how to achieve similar behaviour as with @JsonSerialize(customSerialized)?
I try to use OpenApi generated (spring generator) DTOs in a project (instead of handwritten DTOs), however some existing DTOs have custom serializers, e.g. @JsonSerialize(using = TwoDecimalSerializer....
0
votes
1
answer
177
views
Generate Serenity-BDD Rest-Assured tests using OpenAPI Generator
In order to write tests for a given OpenAPI specification (which I do not have under control) I want to generate the RestAssured-Tests decorated by the Serenity-BDD framework using openapi-generator.
...
0
votes
0
answers
70
views
Better control over the interface name when generating from OpenAPI spec 3.1
We want to generate our server interfaces based on the OpenAPI specs. We want all REST interfaces to start with /api. So as an example we have the following api path:
paths:
/api/welcome/v1:
get:...