Releases: OpenAPITools/openapi-generator
v4.2.0 released
v4.2.0 (containing breaking changes with fallbacks) comes with 3 new generators: dart-dio
, php-slim4
, java-vertx-web
. As always, we're very grateful for the contributions from the awesome community.
List of breaking changes with fallbacks
Below is the summary:
General
- [docs] Custom template clarifications and other minor enhancements #4167
- [core] Update Swagger-Parser to '2.0.15' #4145
- Sanitizes model names so they're valid class/interface names #4127
- Fix readonly with isReadOnly #4102
- Serializer object mapper setting fix #4093
- Remove unused property (SecuritySchemeDefinition) #4081
- Add
style
andexplode
#4042 - [CLI] Initial implementation for batch generation #3789
Avro
Bash
- [Bash] Minor improvements #4274
C
- [C] Update build-and-test.bash to fix CI errors #4312
C#
- [C#][NetCore] Rename local variables #4297
- Deprecated netstandard, uwp support in csharp generator #4214
- [CSharp] add optional flag "optionalEmitDefaultValues" and update template #4010
C++
- [C++] Enable Qt5 Petstore tests #4164
- [C++] [Qt5] Add generation of cmake files to qt5 client #4133
- [C++] [Qt5] Add missing supporting files when prefix is provided #4132
- [C++][Pistache] Use optional when required #4082
Confluence wiki
- Fix Confluence wiki format issue #4064
Dart
- [dart-dio] Correctly handles import of Uint8List #4313
- [Dart] [Bug] Handle model names starting with number #4276
- Fix conflict if paramName is data #4266
- fix(dart-dio): enum class generation is not implemented #4235
- Adds Dart Dio generator #4018
Elm
- [elm] fix code generation for nullable types #4136
- Fix NPE in Elm path parameter #4116
- [elm] Add toString for all types #3983
Go
- [go-server] Return Router interface from controller constructor #4196
- Fix boolean operators precedence #4158
- [Go] Upgrade dependencies #4126
- [Go] Fix go.mod and go.sum for 1.13 #4084
- [Go] Fix enum value which is not string #4077
- [go-server] Enhance Go API server with interfaces router binding and services #4038
- [go-experimental] export required fields without pointer #3989
- [Golang] Allow retrieving the underlying configuration for APIClient #3976
- Do not check status code for default response #3322
Haskell
- [FEATURE][Haskell] Haskell-Servant serves static files #4058
- [FEATURE][Haskell] Add Middleware support for the haskell servant generator #4056
- [haskell-http-client] Bump deps to LTS 14.7 #4068
- [haskell-http-client] add dateTimeParseFormat CLI option - overrides the format string used to parse a datetime #4037
- [haskell-http-client] disable unused import warning in Core.hs #4020
- Fix trailing comma wrong in template for haskell-http-client #4013
Java
- Implement Server Stub Code for Vert.x Web #4286
- Add bearer token authentication documentation to template #4278
- okhttp-gson: fix SSL settings with okhttp3 #4226
- [jaxrs-spec][quarkus] update to 0.25.0 #4185
- Update to jackson-datatype-threetenbp 2.9.10 #4176
- [Java] Support cookie-based security schemas in Java clients #4155
- [Java] fix jackson-databind-nullable version variable due to Gradle Incompatibility (Template Update) #4148
- [JaxRS-Java] use @FormParam for form parameters when it is not Multipart #4125
- [Java] fix jackson-databind-nullable version variable due to Gradle Incompatibility #4092
- [jaxrs-spec][quarkus] update to 0.23.2 and fixes for Dockerfile #4053
- Make Java Resttemplate client thread safe by using the withHttpInfo pattern (Breaking change (with fallback)) #4049
- [java][client] Fix regression in Java XML serialization #4023
- [java] Don't import oltu when not necessary #3950
- [java][client] Don't include nullable attributes twice in serialized JSON #3923
- [java] allow to use setArtifactVersion() programmatically #3907
- [JAVA][JAXRS] Fix parameters validation #3862
- [Java][Fix #3310] Respect discriminator case for @JsonTypeInfo #3320
JavaScript
- [JavaScript][ES6] Added a check if response is undefined #4298
Kotlin
- [Kotlin][multiplatform] better authentication support #4284
- Fix Kotlin query collection format #4248
- [Kotlin] Add kotlin.collections.Set support for unique item arrays #4247
- [kotlin][client] only use authentication tokens when they are not null #4238
- Fixes Kotlin client property names that include a dollar sign #4229
- [Kotlin][client] Add nullable query parameter support #4197
- Update to jackson-datatype-threetenbp 2.9.10 #4176
- [Kotlin][Client] fix missing curly bracket when the model contains enum property #4118
- [kotlin] add option for non public API #4089
- Add DELETE with body to kotlin client #4047
- [kotlin-client][kotlin-server] kotlin data class serial version uid #4021
- [kotlin-client] Add support okhttp3 and Android 4.x #4008
- Fix generation of query parameters for optional/nullable function arguments #3903
PHP
PowerShell
- Update API and model path when packageName is updated #4108
- Fix nullable for arrays and complex types #4106
Python
- [Python] Remove redundant else statement #4311
- Python: Flask: Fix: Update setup.py to match requirements.txt #4205
- [Python] Minor fix to code format #4172
- [python] Remove post_params and body from OPTIONS request #4163
- [python] Skip adding None value in query parameters #4161
- [Python-experimental] types now classes, adds additionalProperties handling #4154
- [python] Add ability to get allowed values #4138
- [python] Add option to skip client validations #4137
- [python] Add missing keywords python #4134
- Test Python aiohttp first in Travis #4117
- Fixed Readonly Docs for python #4085
R
- [r][license]: Better license and contact information #4317
Rust
- [Rust] Better support for optional and nullable parameters #4016
- [Rust] Add support for discriminator #3895
- [Rust Server] Support parameters correctly in response headers #3669
- [Rust Server] Support types with additional properties #3666
- [rust] Make it easier to test rust client generator #3543
Swift
- [swift] Add missing keywords in Swift #4153
- [swift4] Add swift package manager and update dependencies #4141
TypeScript
- [TS] Fixes typescript-axios "File custom.d.ts not found" when building consumer TS project #4230
- typescript-angular: Allow for custom naming of ApiModule #4209
- [typescript-rxjs] improve HttpQuery typing #4198
- typescript-rxjs: fix query parameters type #4160
- [typescript-inversify] Fix multipart form uploads #4131
- Disabling linting for typescript-fetch #4110
- typescript-fetch: fix empty URLSearchParams request body #4103
- [typescript-axios] Fix api generating incorrect serialization type check #4051
- typescript-jquery: Update to work with Typescript strict mode #3969
- typescript-angular: set angular version 8 as default for ngVersion (Breaking change (with fallback)) #3680
v4.1.3 released
v4.1.3 (last patch release before the upcoming minor release v4.2.0) comes with 4 new generators:
- asciidoc markup generator #3845
- Add F# Functions server generator #3933
- [Kotlin][server] Add kotlin-vertx-server #3031
- Add Nim client code generator #3879
As always we're grateful for all the contributions by the awesome community.
General
- Update mockito to 3.1.0 #4035
- [FIX][CORE] Repaired Checkstyle #4029
- Update maven-compiler-plugin version #3956
- Fix jackson-databind security issue #3945
- Add a global option to customize the API name suffix #3918
- Add gradle repository for using gralde dependency in plugin #3867
AsciiDoc
- asciidoc markup generator #3845
C++
- [C++] [rest-sdk] Add missing enum processing in C++ Abstract codegen #3986
- [C++] [Pistache] Removed deprecated warnings #3985
- [C++] [cpprest] Fixed wstring on linux #3892
- [C++] bug fix for ishttpcontent not set properly #3888
- [C++] [Qt5] Add initial version of File upload and download for Qt5 client #3853
- [C++][Pistache] Simplified model template #3417
F#
- Add F# Functions server generator #3933
Dart
- Dart fix template tests #4015
- Change Uint8list by List because it cause trouble with last versions of jaguar #3871
Go
- go: add os import in case of File return type #3996
- Import time when properties are slices of time.Time #3973
- Support Multiple API Keys #3450
Java
- [Java][Client][Feign] fix a bug when encoding query parameters using a parameter map #3948
- [jaxrs-spec] add Eclipse MicroProfile file based approach #3901
- updated google-api-client version from 1.23.0 to 1.30.2. #3882
- java-spring: Spring Boot fails to parse LocalDate query parameter #3860
- [spring] Resolve regression on RequestParam for non-objects #3855
Kotlin
- [kotlin] mark 'parcelize' as a stable option #4003
- [kotlin-client][kotlin-server] feature: allow creation of kotlin data classes that implement java.io.Serializable #3997
- Fixes invalid Kotlin client variable names for reserved words #3993
- [Kotlin] add multiplatform support #3900
- [Kotlin][server] Add kotlin-vertx-server #3031
Nim
- Add Nim client code generator #3879
PHP
- [PHP] Correctly format JSON in headers #4024
- Fix wrong variable name in LessThan and LessThanOrEqual asserts #3971
Scala
- [scala][akka] Removed hardcoded baseUrl #3964
- [scala] add [date-time] field to codegen unit test #3939
- [scala][client] ScalaAkkaClientCodegenTest: refactor assertions #3893
Swift
- [Swift4] update swift4 samples with swiftlint, update test scripts #4009
- [swift4] update Alamofire from 4.7.0 to 4.9.0 #3999
- [Swfit4] better support for type=string, format=number #3910
TypeScript
- typescript-node: Add options to specify a form data file #3967
- typescript-fetch: fix return type of primitive value #4028
- [typescript][node]: Add accept header if produces is not empty #3966
- typescript-fetch: Add application/x-www-form-urlencoded content support #3934
- typescript-node: Fix cookie auth, fix multiple API key auth #3927
- [typescript][fetch] Fix null typing errors #3919
- typescript-fetch: fix missing comma in multiple imports #3881
- typescript-node: Use HttpError class when rejecting promises #3876
v4.1.2 released
Another bi-weekly patch release. v4.1.2 comes with a new generator to convert OpenAPI (v2, v3) into Protobuf schemas & gRPC service definition to help with the migration from REST APIs to gRPC services.
For a full list of changes, please refer to the Pull Request page. Below are the highlights:
General
- Fix remote spec handling and hash calculation #3826
- [core] do not always cast to ArraySchema #3780
- [Maven plugin] Allow configuring User-Agent via maven plugin, update readme #3777
- [core] [regression] set parentName when a single possible parent exists #3771
- [core] change JSON serialisation to be deterministic #3763
- Support custom git repository #3757
C++
- [C++][Pistache] Add missing setter for arrays #3837
C#
- [C#] [netcore] Add missing files to the form request #3834
- Fix warnings in the csharp-netcore client #3831
Dart
- Adds Http Info To Dart Api #3851
- [Dart] Fix README template and update testing doco #3809
- [Dart] Don't create redundant samples #3800
- Fix Dart2 default template #3790
- Add flutter web support on jaguar dart #3786
- Fix dart2 custom templates #3656
- Manage enum properly on Dart Jaguar generator #3654
Haskell
- [haskell-http-client] bump deps to LTS 14.3 #3762
Go
- [client][go] Avoid duplicated reflect imports #3847
Java
- [Java][okhttp-gson] fix failure to deserialize floats #3846
- Fixed bug where nullApi.java is generated instead of DefaultApi.java #3821
- [java-client][rest-assured] add jackson support in addition to gson #3795
- [java] add jackson-databind-nullable dependency to the gradle.build file #3793
- [java-client][java-jaxrs-server][jackson] Add @JsonPropertyOrder to models #3778
- [java] fix ClassCastException in toDefaultValue() #3765
- [java][client] Add a "serializationLibrary" option #3759
JavaScript
- Fix regexp fails on Windows because of backslashes in the path #3802
Kotlin
- [Kotlin][client] Support gson and moshi as serialization libraries #3734
Protobuf
- Add gRPC Protobuf schema generator #3818
TypeScript
- typescript-axios: Fix base options #3866
- typescript-inversify: improve check for required parameters, support multiple media types #3849
- typescript-fetch: add option for TypeScript 3.6+ compatible generation #3801
- typescript-angular: Set Content-Type for multipart requests in angular #3779
- [typescript-fetch] fix serialization/deserialization with inheritance #3767
- [typescript-rxjs] support HEAD method, improve formatting #3766
- [typescript-axios] @ts-ignore possible unused imports #3742
- [typescript-angular] allow empty string basePath #3489
v4.1.1 released
v4.1.1 (patch release) comes with 90+ PRs from the community. Thank you.
For a full list of changes, please refer to the Pull Request page. Below are the highlights:
General
- [core] Set isMultipart=true for multipart operations, fix possible NPE #3750
- Better support for multipart #3736
- [core] process TRACE operation #3648
- Fix imports and property name when using anyof/oneof in services #3639
- autoupdating generator script: userdef cache dir #3631
- Fix composed properties missing from allVars #3616
- Fix callback request and response not being flattened to InlineObjects #3398
- [CLI][GENERATOR] NullPointer when not setting outputDir (updated) #3752
- [maven] Support user overrides for serverVariables (carryover from #3363) #3609
- [cli][gradle] filter deprecated generators by default when listing available generators #3612
- [core][maven][gradle] User-defined server variable substitutions #3363
- Update to swagger-parser to 2.0.14-OpenAPITools.org-1 #3737
- Update Mockito to the latest stable version 3.0.0 #3732
Avro Schema
C++
- cpp-qt5-client: Improve tests #3667
- cpp-qt5-client: add valgrind memory test #3663
- cpp-qt5-client: fix memory leak in api-body #3661
C#
- [csharp] Update UserAgent in the async version of ClientAPI execute method #3723
- [csharp-netcore] Making HTTP response headers dictionary case-insensitive #3707
- [aspnetcore] Fix nullable enum and duplicate model #3622
- [aspnetcore] Add max/min length attributes for models #3588
- [aspnetcore] Add TypeConverter for enum string conversion #3557
Dart
- [Dart] Avoid redundant null checking in fromJson #3632
- [Dart] Make clients crossplatform #3608
- [Dart Jaguar] manage nullable definition #3599
Go
- [Go] add option to use class as enum prefix #3675
- Guarantee a unique name for the constants that represent enum values #3644
- [Go] URLEncode path parameters #3643
- Import Go package with leading underscore #3634
- [Golang][Client] Fix collectionFormat=multi request bug #3390
Java
- [java][client][java11-native] Https protocol schema is not handled correctly in java 11 native code #3730
- [java][client][resteasy] support bearer authentication #3706
- [java][client][resteasy][jersey2][google-api-client][okhttp-json] several fixes to make sent requests more accurate #3703
- [java][client][vertx] Two tiny fixes for Java Vertx client #3683
- [java][client][java11-native] Use javax.annotation.processing.Generated for Java 11 native client #3637
- [java][client] set collection to null when not required #3615
- [java][client] make it possible to send explicit nulls for nullable fields #3474
JavaScript
- Use the latest version of superagent #3579
Kotlin
- [Kotlin-client] Fix null assignation to header/query param map #3749
- [Kotlin-client] Authentication support #3722
- [kotlin] Change Kotlin client exceptions to expose lack of support as UnsupportedOperationException rather than NotImplementedException #3611
- Various fix for Kotlin templates #3504
PHP
- [Slim] Distinction between basicBasic and basicBearer authentication #3621
Python
- [BUG][Python-Flask] Primitive type bytearray deserialization missing in util.py #3642
- [Python] support api key refresh in configuration module #3594
- [Python] avoid unnecessary dictionary lookup in get_api_key method #3592
R
- [R] Updating api docs to include HTTP response codes and their corresponding headers #3699
- [R] feat(r): handling error response for 3xx cases #3571
Ruby
- Fix runtime error in the model's
valid?
of Ruby client #3671 - [Ruby][faraday] Properly pass verify_mode to faraday #3652
Rust
- [Rust Server] Support Bearer based Authentication #3606
- [Rust Server] Frunk - LabelledGeneric - support #3552
TypeScript
- [typescript-fetch] prefix request interface #3740
- [typescript-angular] Encode objects for multipart/form-data with JSON #3738
- [typescript-fetch] namespacing the generated request object types #3695
- [typescript-fetch] Add nullable support #3645
- typescript-angular: Add correct library versions for Angular 8.0.0 #3619
- typescript-axios: If the return type is empty, it should be void instead of Response #3617
- [Typescript] Fix typescript-inversify compiler errors #3607
- typescript-fetch: Fix type errors in generated code #3605
v4.1.0 released
v4.1.0 (breaking changes with fallback) released with 4 new generators/libraries:
- OCaml client generator:
ocaml
- NodeJS Express server generator (alpha):
nodejs-express-server
- Java 11 native HTTP client library:
--additional-properties library=native
- Ruby Faraday client library:
--additional-properties library=faraday
Thanks for the OpenAPI Generator community to help move the project forward with another minor release.
We've also launched a new Slack workspace. Please join to discuss OpenAPI Generator.
For a full list of changes, please refer to the Pull Request page. Below are the highlights:
General
- Better handling of dot in inline model name #3498
- [fix] Assign template directory to additional properties #3385
- Updates to address recent lodash Object prototype vulnerability #3348
- [openapi-yaml] Prerequisities for Swagger 2 template #3202
- [core] Initial implementation of a validation framework in core #3183
Bash
- Bash skip empty query param fix #3290
C#
- [C#][client][csharp-netcore] Fix csharp netcore defaultheaders #3562
- Fix logic of
getNullableType
of csharp server and client #3537 - Fix DateTimeOffset nullable issue #3530
- [aspnetcore] Support cookie parameter #3490
- Adds default property values in ASP .NET Core models #3369
C++
- [C++][Pistache] Do not use JSON for primitive types in request body #3509
- [C++][Qt5] Remove QRandomGenerator #3508
- Add modelNamePrefix option for qt5 #3431
- qt5 client: strip whitespace #3406
- [C++][Pistache] Add compatibility for nlohmann-json 3.5.0 #3306
- Fix issue deserializing to nullptr #3572
Dart
- [dart-jaguar] Fixes error accessing default converters #3361
- [dart-jaguar] Adds option to customise the generated API client name #3234
Go
- [Go][experimental-client]: make struct members pointers, provide custom marshalling #3371
Java
- [java][client][jax-rs] Add a constant for Jackson @JsonProperty #3560
- [java-client][okhttp-gson] fixes for interceptors in ApiClient.java #3502
- Expand path templates via resttemplate's uriTemplateHandler #3500
- [Java][RestTemplate] remove wrong Null Check #3481
- [Java] Replace "useNullForUnknownEnumValue" option with the nullable attribute #3455
- [Java] add nullable support to the clients #3453
- [Java] Fix numeric field names #3436
- Java 11 native HTTP client library #3434
- [Java] add nullable annotation to pojo template for non-required fields #3409
- [java rest-assured] prevent reqSpec reuse between requests #3375
- [JaxRS-Spec] add openApiSpecFileLocation parameter #3344
- [java] Support for number enum #3328
- java-springcloud: No dependency management if parent overridden #3301
- Enable async option for spring-cloud library #2670
- Fix invalid spring properties prefix #3501
- [java-client][okhttp-gson] support bearer authentication #3236
JavaScript/NodeJS
- Add a new NodeJS Express server generator #3567
- Upgrade babel packages for Javascript ES6 generator #3424
OCaml
- [OCaml] Add file post-processing #3568
- [OCaml] Response headers were not processed for enums collection #3526
- [OCaml] various enhancements #3483
- [OCaml] new client generator #3446
PHP
- Fix PHP Symfony non-primitive return type being forced to be an array #3515
Python
- [Python][server] Use range for dependencies in python-flask #3470
Rust
- [rust] Stop deriving Eq for models #3463
- [Rust][Client] Correct the Rust client generated documentation #3419
- Better Rust client imports #3332
- Fix enum types in structs #3309
- [Rust Server] Support multipart/form_data request bodies #2846
- [Rust Server] Generate valid Rustdocs for lazy_static items #3556
- [Rust Server] Allow more than 32 configured paths #3494
R
- [R] updated example in doc(.md) file #3429
Ruby
- [Ruby] clean up Ruby dev dependencies #3551
- [Ruby] remove auto-generated Gemfile.lock #3541
- [Ruby][faraday] add TLS setting support #3527
- [Ruby][Faraday] Various improvements #3520
- [Ruby] add support for "faraday" #3405
- Ruby-client: Don't encode slashes if strict-spec false #3204
Swift
- [Swift4] Introduce XcodeGen #3396
Scala
- [scala-play-server] Correct CLI option name #3340
TypeScript
- typescript-fetch: allow configuration of headers and credentials #3586
- [typescript-angular] fix string casting #3558
- [typescript] change accessToken name parameter to optional #3555
- typescript-fetch: Properly detect and encode container request body param #3517
- [typescript-rxjs]: support reponseType blob #3437
- typescript-axios string date format #3423
- [typescript-rxjs] runtime and api cleanup #3316
- [typescript-angular] use correct package with http-client #3465
- [Typescript Axios] fix Content-type not set properly #2695
- [typescript-node] fixed enum generator for top level enums #2266
- Added serialization support for typescript on complex object headers #1874
- Support importMapping definitions for TypeScriptNodeClientCodegen #3469
- [typescript-angular] add flag for using string enums #3464
- [typescript-node] Promise-based Authentication interface #3408
- Fix NPM build for Typescript-fetch #3403
- [typescript-angular] Add encoder configuration, fix default encoder #3389
- typescript-fetch: fix basic type errors #3380
- [typescript-fetch] support custom stringify for query string #3327
- [typescript-fetch] Fix collection formats reference #3324
- [typescript-fetch] Fix access token type #3323
v4.0.3 released
The last patch release before 4.1.0 (minor release). Below please find the highlight of the changes. For a full list, please refer to the Pull Request page
Once again, thanks for all the contributions from the awesome community.
Note: we'll also talk about this release in Open Summit Japan 2019. Please join our presentation on Jul 19 (Friday) 14:00 - 14:30 (GMT+9) if you want to learn more about developer experience for open-source projects.
General
- [online] Remove GENERATOR_HOST defaults #3289
- Handle discriminator mapping non-ref name #3247
- [core] consider content in parameters and headers when computing unused schemas #3243
- Update to swagger-parser to 2.0.13-OpenAPITools.org-2 #3239
- [online generator] integrate with rapidoc (interactive explorer) #3229
- Fix inheritance with modelPrefix #3151
- Update DefaultCodeGen to allow additional primitive types #2799
C++
C#
- [csharp] Adding http response details on api_docs and making example snippet compilable #3129
- [csharp-netcore] Add http response details in api_docs to make example snippet compilable #3128
- [aspnetcore] Add API key authentication support to aspnetcore server #3089
- [aspnetcore] Preliminary support for ASP.NET 3.0 Core preview 5 #2824
Dart
- [dart-jaguar] Makes converters publicly accessible #3245
Documentation
- [openapi-yaml] fix config option outputFile ignored by the generator #3199
Elm
- [elm][haskell-servant] fix StringIndexOutOfBoundsException #3262
Go
- Add new Go client (experimental) generator #3268
- [Go][Client] Use configured Scheme and Host in requests #3115
- [go] Serialize multipart array of complex objects as JSON #2965
Haskell
- [elm][haskell-servant] fix StringIndexOutOfBoundsException #3262
Java
- [Java] fix javadoc configuration #3302
- [Java][Rest-assured] Bump rest-assured version #3282
- Update dependency with jsr250-api #3279
- Added RxJava2 to java-vertx server codegen #3240
- Add missing javax dependencies for Java > 8 #3188
- Added special handling for 'string' types with format 'uri' #3161
- [java][jesery2] fix "InjectionManagerFactory not found" issue #3153
- [Spring] fix documentation containing argument "java8" twice #3122
- Check classVarName against reserved keywords, renamed snakeCase to lowerCamelCase #3079
- Only enable Spring default interface for
java8
#3022 - Add
throws Exception
directive to Spring operation methods #2482
JavaScript
- Update JS flow dependencies to fix security issues #3296
- Fix typo in Javascript generator template #3249
Kotlin
- Ktor Fix KtorExperimentalAPI import #3108
- Add Flow import to kotlin spring reactive #3107
- [KOTLIN Spring] add interfaceOnly option #3050
Perl
PHP
- Set error_reporting(E_ALL) in phpunit.xml settings, to crash on undefined variables #3266
Python
- [Python] Adds new client generator, python-experimental #3244
- [Python] configurable limit of simultaneous connections (python/asyncio) #3200
- [Python] Make example code snippet compilable #3148
R
- [R] Added handling exception with ApiException class and better documentation #3217
- [R] Alternate PR for serialization fixes along with WithHttpInfo method enhancement #3099
- [R] Inclusion of useragent, timeout and serialization #3084
Ruby
- [Ruby][Client] Add "send" to ruby reserved word list #3146
TypeScript
v4.0.2 released
Even though v4.0.2 is the regular bi-weekly patch release, it still comes with enhancements, bug fixes covering many languages. For a full list, please refer to the Pull Request page. Below please find the highlight of the changes:
General
- [gradle] Document consuming via gradle plugin portal #3125
- Import inner items for map #3123
- [maven-plugin] fix strictSpec parameter without alias #3095
- [core] GeneratorSettings, WorkflowSettings, and cleanup in CodegenConfigurator #2946
- Link query parameter to model object #2710
C#
- Update C# client dependency #2678
- [ASP.Net Core] General support to add scopes for bearer authentication #1984
C++
- [C++] [cpprestsdk] Add examples and test for cpprestsdk #3109
- [C++][Qt5] Add Q_DECLARE_METATYPE to the generated models and remove ref in signals #3091
- [C++] [Qt5] Add API timeout handling #3078
- [cpp-pistache-server] Fix wrong include path in api-header template #3062
- [C++][Qt5]Map number to double since float is also parsed as double in Qt5 #3046
Go
- refactor(golang): Use http provided constants for http methods #3028
- [Golang][client] Allow generating go client code as a submodule #3012
Java
- [Java][okhttp-gson] Update dependencies #3103
- [Java][jersey2] Making response headers case-insensitive #3072
- [Java][jersey2] Documentation changes and making example snippet compilable #3056
- [Java][jersey2] Fixing javadocs wark #3040
- [Java][okhttp-gson] Making API response headers case insensitive #3029
Javascript/NodeJS
- Bump up babel-cli version to fix security alert #3121
- Mark nodejs-server as deprecated #3083
- [JavaScript] Remove default parameters syntax as it's an ES6 feature #2848
Kotlin
- [KOTLIN Spring] fix generation with modelNamePrefix/Suffix #3038
- [Kotlin-Spring] template fixes/improvements #3007
- [Kotlin-Spring] add reactive behavior via Kotlin coroutines #2934
Ruby
- Fix rubocop obsolescence #3175
- Ruby: Avoid double escaping path items #3093
- Ruby client: escape path parameters #3039
Rust
- Idiomatic Rust returns for Error conversions #2812
- Add enum support to
rust
and skip none option serialization in clients #2244
Scala
- [scala-play-server] Fix API doc url #3096
- [scala-play-server] Fix generated enums named after a reserved word #3080
TypeScript
- [typescript-fetch] add bearer token support #3097
v.4.0.1 released
The first patch release (v4.0.1) since the major version v4.0.0 released 2 weeks ago. Please refer to the milestone for a full list of changes. Below are the highlights:
General
Apex
- [Apex] Set namedCredential file name from the property #2937
C++
- [C++][Restbed] Add handler callback methods #2911
- [C++] [Qt5] Set default base path and change constructor to const ref #2973
- [C++][Pistache] Separate exception types when handling requests #2930
C#
- [C#] Remove null checks for C# value types #2933
- [aspnetcore] Added support for patterns on model properties #2948
- [csharp] Make API response headers dictionary case insensitive #2998
- [csharp] Add an option to make API response headers dictionary case insensitive #2998
- [csharp-netcore] Enabling XML documentation on csharp-netcore client #2996
- [C#] Enabling XML documentation in the C# client #2953
Dart
- [Dart][Jaguar] fix wrong import on object #3000
- Add auto-generated tests and Travis config to Dart clients #3006
- dart2: update to work with dart 2.3.0 #2894
Elm
- Add support for enums in Elm operations #2982
F#
- [F#][Giraffe] Remove unused import #2893
Go
- [Go] Check error of XML Encode in the API client #3027
Groovy
- [Groovy] improve code parsing body/form params #2879
Java
- [java-okhttpgson]: Include API's Http response codes and their corresponding description and response headers in the documentation #2995
- Update Java Feign client to the latest stable version #2999
- Fix for Java JAX-RS tests in Windows platform #2927
- Disable jdk8 when using responseWrapper #2873
- [Spring] Disable jdk8 when using responseWrapper #2873
Kotlin
- [KOTLIN client] fix Moshi (Serializer/Deserializer) duplicated #3013
- [kotlin] add testFolder configuration for kotlin #2975
- [Kotlin client] Improve JSON parser #2981
- Improve Kotlin code quality #2988
- [Kotlin] Fix parse error when using custom field names with @JSON #2944
PHP
- [PHP] Fix group parameters in WithHttpInfo method #2951
Python
- [python-server] Support python 3.5+ for all server-generators #2884
- [Python] fix ModuleNotFoundError when packageName contains dots #2992
- [Python] Remove unnecessary if else #2985
Ruby
- Add support of Bearer Basic Authorization to Ruby client #2856
TypeScript
- [typescript-fetch] Fix uploading files #2900
- [TS][Inverisify] Adding support for RxJS 6 #2793
- [TS][Axios] To fix conflict params name 'url' #2921
- [Typescript] remove deprecated typings #2880
- [TS][Fetch] Add support for openapi maps/dictionaries to be generated as typescript map #2913
- [Typescript] gets package npm version from API specification #2920
v4.0.0 release
4.0.0 is the first major release since the project's public debate in May 2018. Once again we appreciate all the contributions from the community to make this happen. This release comes with breaking changes with fallbacks and without fallbacks. Please refer to the following lists for more information:
For a full list of changes, please refer to the "Pull requests" tab.
New Generators 🆕 :
- csharp-netcore
- fsharp-giraffe-server
- graphql-nodejs-express-server
- typescript-rxjs
Here are some highlights:
📕 = Breaking changes without fallback
📒 = Breaking changes with fallback
General
- [core] add support for model as query params #2489
- Correct issue with OAuth scopes not propogated correctly #1982
- Better handling of inline composed schemas in InlineModelResolver #2112
- Update swagger-parser-version to 2.0.13-OpenAPITools.org-1 #2775
- [docs] Document new templating engine, adding ability to reference templates #2773
- [all] Adds strict spec option #2783
- [general] Remove swagger-codegen "lang" mappings #2785 📒
- [templating] Load TemplatingEngineAdapter via Service Provider #2755
- Improve InlineModelResolver: MapSchema support #1800
- Better support for composed schema (allOf) #1842
- Better handling of OAuth security schema #1838
- Refactor InlineModelResolver #1788
- Deprecated initialCaps #1821
- Delete unused method #1744 📕
- Remove self-reference import #1758
- Better handling of allOf (composition) #1757
- Various fixes for free-form objects #1751
- [OAS 3.0] Fix composed oneOf type #1750
- Add support for multiple inheritance #1664
- Fix alias to free form object & map #1638
- Remove isNotContainer (mustache tag)#1629 📒
- Introduced GeneratorProperties as a thread-safe clone of System Properties #1598
- Delete
--lang
option #1592 📕 - Better OpenAPI spec v3 support: allOf, anyOf, oneOf #1360
Android
- [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix Vulnerability #2416
C
- [C] C generator refactored #2463 📕
C#
- Add warning about .net 2.0 framework reached EOL #2804
- [C#][.NET Core] fix map instantiation in models extending Dictionary #2776
- Remove emitDefaultValue option from C# generators #2559 📒
- [aspnetcore] Support async tasks and some code cleanups #2629
- [Aspnetcore] add nullable support to parameters and properties #2529
- [Csharp] add nullable support to API client #2528
- Rename generator: csharp-refactor => csharp-netcore #2348
- [aspnetcore] more configurable and generate abstract class library #2282
- [aspnetcore] migrate the docker image for the aspnetcore generator #2281
- C# refactor improvements: .NET Standard and .NET Core #2187
- Fix C# discriminator's mapping name #1942
- Use CompareNetObject for object comparison in C# client (refactor) #1765
C++
- [C++][Qt5] Fix generation of optional file when model name prefix is selected #2341
- [C++][Qt5] Add enum support for client and server #2339
- [C++][Qt5 Server] Add support for free form object in requests #2288
- [C++] Use super class methods for Model and Api Filenames #2787
- [C++][Pistache] Allow socket address reuse option #2780
- [C++][Qt5 Server] Process server port #2782
- [C++][RESTSDK] support enums #2749
- [C++][RestSDK] Windows vcpkg vs2017 support #2751
- [C++][Pistache]Add server port processing #2743
- [C++][QT5] Emit worker also in response signal #1829
- [C++][Pistache] Fix missing const keyword in array and maps #1828
- [cpp-qt5] client response headers and validation of properties for client and server #1508
Clojure
- [Clojure] Fix tests: stop dashizing props names #1310
- [Clojure] Add model generation and conforming #122 📕
Dart
- [Dart] Fix authentication for HTTP basic, API keys #2419
- [Dart] query arguments of requests are now url encoded #2250
- dart2: Do not add non-nullable fields to JSON string of models #2777
Elixir
- [Elixir] update to 1.6 version #2741
- [Elixir] Deserialize responses based on status code #2355
- [Elixir] Update Tesla dependency to version 1.0 #2326
Elm
- [elm] Update ISO 8601 library (fixes missing time zone designator) #2545
- [elm] Import types in operations #2488
- [Elm] Bugfix .encode in modelTypeDiscriminator #2807
- [Elm] Fix repetitive enum prefixes #2784
- [elm] Enable setting Http request trackers #1609
- [elm] Allow setting base path for each request #1538
- Add support for UUIDs #1516 📕
- Update Elm for elm/http 2.0.0 #1510 📕
Erlang
- Introduce optional weight function for commands and other improvements #1618
- Upgrade the erlang-server dependency from cowboy1.x to cowboy2.x #1364 📕
F#
Go
- [Golang][client] Make it possible to generate go.mod and go.sum files #2813
- [go] fix multipart for non-file inputs #2792
- [go] support decoding plain string responses #2414
- [Go] Fix up json check regexp and support vendor-specific mime types #2322
GraphQL
- New Generator: GraphQL Server #1603
Haskell
- [haskell-servant] Fix parsing of special characters #2676
- [haskell-servant] Add some missing types to the generated modules #2675
- [haskell-http-client] add cli option
customTestInstanceModule
#2406 - [haskell-http-client] add support for import-mappings #2381
- haskell-http-client: update katip version bound #2305
- [haskell-http-client] Allow logger selection via cabal flags. Emit Consumes / for requestBody when not specified #2258
HTML
- Update StaticHtmlGenerator to allow snake_case property names #2612
- [html] Use ModelUtils to avoid NullPointerException #1948
Java
- [JAVA][KOTLIN] fix var Naming for all uppercase with Numbers #2794
- Mark Java (jersey1) client as deprecated #2767
- [JAX-RS] Fix JSON polymorphism #2602
- Fix JaxRS-Jersey template for files upload #2570
- [Java][Feign] Support OAuth without 'expires_in' data #2563
- Update Java Vertx client dependency #2507
- [Java - OkHttp] Fix for the added interceptor and tests #2420
- [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix Vulnerability #2416
- Update Java client (okhttp-gson) dependencies #2368
- [Java][okhttp-gson] Fix incorrect use of OkHttp interceptors #2356
- rest-template: allow array parameters in path using collectionFormat #2177
- okhttp-gson: allow array parameters in path using collectionFormat #2137
- Add nullable array support in Java Spring generator #2660
- [Java] Generate OAuth related files only if OAuth security schema is used #1907
- [Java] Update okhttp version to the latest #1897
- Improve Java model with instantiated lists #1683
- Add nullable support to JAXRS-CXF parameters #1679
- Add mavenCentral to build.gradle #1674
JavaScript
- [Documentation] Add instructions to build the javascript client module #2806
- [JavaScript] fix index.js, ApiClient.js and test files generated to incorrect location (invokerPackage) #2511
- [JS][Flow] Fix body serialization when body is falsy #2499
- Add build script and remove babel #2439
- Add "servers" support to operation, path in the JS client #2060
- Add Bearer authentication support to JS client #2020
- Add multiple servers support to JS API client #1974
- Use JS ES6 as the default #1825 📒
Kotlin
- [Kotlin] add apiSuffix configuration #2690
- [Kotlin SpringBoot Server] alternative: fix optional parameter not correctly declared in service #2539
- [kotlin-spring] use spring resource for file handling #2455
- [Kotlin] Add ability to use modelNamePrefix/modelNameSuffix #2349
- [kotlin-spring] Allow DateTime to be remapped to others (LocalDateTIme) #1740
Perl
- Perl: Better Support for hash in deserialization #2713
- Use 4-space instead of tab in Perl templates #1830
- Add "nullable" support to Perl operation's parameters #1690
- Add multiple inheritance support to Perl client #1681
PHP
- [Slim] Fix AbstractAuthenticator constructor TypeError #2641
- [Symfony] Replace deprecated Controller with new one #2146
- [PHP-Symfony] Use Symfony Validator service #2143
- Add "servers" support to the operation, path in PHP API client #2072
- Add
controller.service_arguments
tag to controllers to make them public #2059 - Enable serialization of non-null negative values (array, false, etc) #2032
- Add Bearer authentication to PHP API client #2013
- Add multiple servers support to PHP client #1964
- [PHP] Bump minimum required version to PHP7.1 #1491 📕
- [Slim] Abstract API controllers #1483 📕
- [Slim] Migration to PHP7 #1263 📕
- [PHP-Lumen] Lumen 5.6 support #212 📕
PowerShell
- Add process utils class to add index to properties #1796
Python
- [Python] add the multipart files after sanitization in api_client #2122
- [Python Connexion Servers] BUGFIX: handle . in package names #2508
- Added proxy headers option for urllib3 #2467
- Adding retries option to override default value 3 of urllib3 #2460
- Adds exceptions module to python clients #2393
- [Python] add cookie support for authentication in the client #2367
- Add python-blueplanet server generator #2184
- [Python] Add "servers" support in path, o...
v4.0.0-beta3 release
General
- Update TestNG Version #2582
- Change default inline object name #2569
- Deprecate initialCaps and replace with camelize #2546 Breaking change (without fallback)
- Fix out-of-memory issue with nested objects with arrays with maxItems set #2536
- Add rule to maven-enforcer-plugin to prevent usage of SNAPSHOT versions #2509
- Better handling of operationId with slashes #2469 Breaking change (without fallback)
- Update documentation mustache templates for proper linting #2458
- Option to overwrite only changed files #2451
- Implement yamlsample config help output #2443
- Implemented yaml parsing for config file #2434
- Add packageName configuration to maven plug-in #2429
- [Maven plug-in] fix failure to read schema from the classpath #2409
- [MAVEN PLUGIN] fix javadoc, fix sonarlint issues in module openapi-generator-cli #2399
- PR for ability to easily debug newly created codegen classes #2388
- Fixing various issues reported by Sonar (part 2) #2295
- Update swagger-parser to '2.0.11-OpenAPITools.org-1' #2262
- Fix NPE when array item is undefined #2247
- Better info message about using generateAliasAsModel #2246
- Fix various issues reported by SonarCloud reports #2229
- Refactor and use some Java 7 features #2225
- Fix missing nullable #2189
- Gradle - make GenerateTask properties optional #2185
- [core] fix referenced enum case #2175
- [core] consider schema in headers when computing unused schemas #2138
- [core] Fix NullPointer when schema is not set in header #2133
- Add servers support to the path and operation #2048
- Add methods to name interfaces (allOf, anyOf, oneOf) #2046
- Fix isFreeFormObject check for allOf, oneOf, anyOf #2044
- Making completion work with openapi-generator-cli or openapi-generator #2027
Android
- [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix vulnerabilities #2416
C#
- Remove emitDefaultValue option from C# generators #2559 Breaking change (with fallback)
- [C#][ASP.NET] fix "EmitDefaultValue" default value with false #2558
- [Aspnetcore] add nullable support to parameters and properties #2529
- [Csharp] add nullable support to API client #2528
- [aspnetcore] Feature/cleanup (contributor rebase) #2506
- [Java][C#][JS] remove localVariablePrefix #2423 Breaking change (without fallback)
- Updates the toInstantiationType method in the csharp generator, Adds spec additionalProperties + nullable examples #2405
- [C#][netcore] Fix package name in the localVar types #2378
- Rename generator: csharp-refactor => csharp-netcore #2348
- [aspnetcore] more configurable and generate abstract class library #2282
- [aspnetcore] migrate the docker image for the aspnetcore generator #2281
- C# refactor improvements: .NET Standard and .NET Core #2187
C++
- [C++][Qt5] Fix generation of optional file when model name prefix is selected #2341
- [C++] [Qt5] Add enum support for client and server #2339
- [C++] [Qt5 Server] server allow api handler override of generated code #2308
- [C++] [Qt5 Server] Add support for free form object in requests #2288
- [C++][Qt5] Fix import for models with underscore #2168
Elixir
- [Elixir] Deserialize responses based on status code #2355
- [Elixir] Update Tesla dependency to version 1.0 #2326
Elm
- [elm] Update ISO 8601 library (fixes missing time zone designator) #2545
- [elm] Import types in operations #2488
Dart
- [Dart] Fix authentication for HTTP basic, API keys #2419
- [Dart] query arguments of requests are now url encoded #2250
Go
- [go] support decoding plain string responses #2414
- [Go] Fix up json check regexp and support vendor-specific mime types #2322
- Apply
GIN_MODE=release
for the Dockerfile ofgo-gin-server
#2283
Haskell
- [haskell-http-client] add cli option
customTestInstanceModule
#2406 - [haskell-http-client] fix bug in test for Maybe A.Value #2382
- [haskell-http-client] add support for import-mappings #2381
- [haskell-http-client] use a decreasing size for Gen (Maybe a), to prevent infinite recursion #2343
- haskell-http-client: fix indentation in .cabal file #2306
- haskell-http-client: update katip version bound #2305
- [haskell-http-client] Allow logger selection via cabal flags. Emit Consumes / for requestBody when not specified #2258
Java
- [Java][Feign] Support OAuth without 'expires_in' data #2563
- Minor improvements to Java API clients (feign, okhttp, retrofit, retrofit2) #2521
- Fix JavaDoc errors in ApiClient for resttemplate #2515
- Update Java Vertx client dependency #2507
- [Java] Instantiate HttpBearerToken authentications if so declared #2485
- [Java] Jersey2 - Always render setBearerToken no matter if OAuth2 is in use #2479
- [Java] Fix Javadoc issue in the client #2435
- [Java][C#][JS] remove localVariablePrefix #2423 Breaking change (without fallback)
- [Java - OkHttp] Fix for the added interceptor and tests #2420
- [GRADLE] upgrade to 2.14.1 in java/scala/androit client to fix Vulnerability #2416
- Update Java client (okhttp-gson) dependencies #2368
- Add more tests to the Java client #2365
- [Java] Update Javadocs for HttpBearerAuth #2364
- [Java][okhttp-gson] Fix incorrect use of OkHttp interceptors #2356
- [JAVA] Use specified data type in enum's fromValue instead of string #2347
- [java-server-msf4j] fix and upgrade #2303
- [Spring] fix datatype for non-multipart file request body #2271
- Java RESTEASY : fix defaultValue annotation double quoted in API operation #2268
- Java Spring : fix defaultValue annotation double quoted in api operation #2267
- [Java][JaxRs] bean validation annotation (e.g. NotNull) is applied to body param of api interface #2239
- rest-template: allow array parameters in path using collectionFormat #2177
- okhttp-gson: allow array parameters in path using collectionFormat #2137
- [Java] Bean Validation for decimalmin/max incorrect when exclusive set #2115
- [Java] Getter/Setter naming convention not followed in generated models #2095 Breaking change (without fallback)
- Remove localVarPrefix from Java client #2045 Breaking change (without fallback)
- [Java] adds snapshotVersion CLI option and uses API version as artifactVersion by default #2033
- Update CXF and Jackson to latest version #2017
JavaScript
- [JS] fix NPE for null string and improve Travis config file #2553
- [JavaScript] fix index.js, ApiClient.js and test files generated to incorrect location (invokerPackage) #2511
- [JS][Flow] Fix body serialization when body is falsy #2499
- Add build script and remove babel #2439
- [JS][Flow] various improvements #2298
- [JavaScript] Add petstore integration test to JS ES6 client (OAS3) #2245
- [JavaScript] fix JS default ot ES6 #2084
- Add "servers" support to operation, path in the JS client #2060
- Add Bearer authentication support to JS client #2020
Kotlin
- [Kotlin SpringBoot Server] alternative: fix optional parameter not correctly declared in service #2539
- [KOTLIN] fix variable name not correctly sanitized #2537
- Fix Kotlin default value #2513
- [Kotlin client] fix warning when else all covered #2470
- [kotlin-spring] use spring resource for file handling #2455
- [Kotlin] Add optional parameters to the method of api #2432
- Kotlin model name camelize #2430
- [BUG][Kotlin Client] API using case other than camelCase not generated properly #2391
- [KOTLIN Client] Update to latest kotlin version #2375 Breaking change (without fallback)
- [Kotlin] Add ability to use modelNamePrefix/modelNameSuffix #2349
- [Kotlin Server Ktor] upgrade to stable version (1.1.3) #2333
- [kotlin][client] bytearray conversion #2166
PHP
- Remove global options from PHP generators #2403
- [PHP] fix bad links in Model docs #2316
- [Symfony] Replace deprecated Controller with new one #2146
- [PHP-Symfony] Validate input objects #2144
- [PHP-Symfony] Use Symfony Validator service #2143
- [PHP] remove deprecated options #2083
- [PHP-Symfony] Catch serializer exception #2074
- [PHP-Symfony] Don't try to detect response format if method return nothing #2073
- Add "servers" support to the operation, path in PHP API client #2072
- Add
controller.service_arguments
tag to controllers to make them public #2059 - [PHP-Symfony] Fix JMSSerializerBundle version #2057
- Enable serialization of non-null negative values (array, false, etc) #2032
- [PHP] Replace File.seperator with slashes in PHP projects #2007
Python
- Added proxy headers option for urllib3 #2467
- Adding retries option to override default value 3 of urllib3 #2460
- Adds exceptions module to python clients #2393
- [python-flask] Do not skip unit tests when underlying type defines json #2390
- [Python][Flask] pythonic params #2374
- [Python] add cookie support for authentication in the client #2367
- Fix regex in Python server model code #2314
- Removal of number being default to example in python client #2228
- [Python] remove default value from being fallback to example #2213
- Add python-blueplanet server generator #2184
- [Python] Add "servers" support in path, operation #2052
- [python-flask] [python-aiohttp] [bug] Fixed handling of dotted module names #2041
- [Python] handle nullable parameters with None added to allowed_values #2034
- [python] [bug] Fixed handling of dotted module names #2016
- [python] [bug]Use actual value of generateSourceCodeOnly #2015
R
- Add better example code for R object #2492
- [R] url-encode path parameters #2397
- [R] skip error when directory already exists in the test script #2379
- [R sample] fix CircleCI error of outdated sample #2313
- [R] Fix NPE issue due to default value using example value #2231
- R client refactoring #2215 Breaking change (without fallback)
- [R] Fix query parameters in the API client #2214